0

I'm using Material Icons with google map to show a marker with an icon. My code works Marker with font icon and it is as below:

 // use a Material Icon as font
  new google.maps.Marker({
    position: { lat: 36.6163, lng: -100.6 },
    map,
    label: {
      text: "\ue530", // codepoint from https://fonts.google.com/icons
      fontFamily: "Material Icons",
      color: "#ffffff",
      fontSize: "18px",
    },
    title: "Material Icon Font Marker",
  });
}

I cannot seem to find any way to change the default red color on the pin. Did any one face the same issue as me please? Does anyone know how to change it to green for instance?

Thanks.

Red default pin

Dev Dev
  • 314
  • 4
  • 17

1 Answers1

0

I checked the documentation of Google Maps Platform and it doesn't have option to change the colour of the marker. I guess you can change the marker icons all together instead of the colours and use that for whatever you needed them for. Even there are other options - Map docs

Hope it helps.

Nikulsinh Sodha
  • 381
  • 3
  • 14