[Google Maps Library] Change Marker Color

Forge Component
(17)
Published on 2 Oct (12 days ago) by Labs
17 votes
Published on 2 Oct (12 days ago) by Labs

Hi,

How can I change the color of one marker using google maps mobile?

Solution

Hi Mário,

You can not change the color. But you can change the icon:

  • Import an icon to the Images in the Interface layer.
  • Add in the MarkerOptions of the marker the following:
"{
icon: '<Runtime Path of the Image>'
}
"

The Runtime Path of the Image, you can get it from the properties of the imported image.

You can find markers in here:

https://www.benjaminkeen.com/google-maps-coloured-markers/

Cheers,

José

Solution

Thanks a lot. Problem solved

Hello,


This worked fine for me too. But the icon I uploaded is of larger display. Is there a way I could control this in outsystems?