Hello Humera,
While creating the marker you can add more properties in it
e.g.
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!', customPropertiy: 'ID'
});
and you can get this id on getting the marker object.
Thanks,
Sudip Barman
On Thursday, 30 March 2017 06:25:05 UTC+5:30, Humera Kouser wrote:
>
> Hi all,
>
> How can I set custom ID to marker in Google Maps?
> I tried with many ways, one of the way
> http://stackoverflow.com/questions/2564320/adding-ids-to-google-map-markers
>
> I get marker.get() not a function. Please anyone help on this.
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-maps-js-api-v3.
For more options, visit https://groups.google.com/d/optout.