Set custom markerId in Capacitor Google Maps Plugin


I want to use the Capacitor Plugin for Google Maps in Ionic and display custom Markers on the Map. So far so good, but i saw that you dont set an id when adding marker to the map… but when you use an MarkerClickListener you get an id Back, in what seems like in the Format ‘m{index}’ when you use the addMarkers(Markers[]) function.

I guess one could use that, but i rather set my own id that may come from my db, is there a way to do that? Maybe in the actual Google API and i could maybe butcher it on top of the plugin?


Don’t use Cap google maps plugin from ionic, its missing A LOT of features. use the official Angular google maps instead, here it would allow you to add an id easily and it has ALL the features google maps provide.

Answered By – StackoverBlows

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published