jbdemonte / gmap3

jQuery plugin to create Google maps
http://gmap3.net
668 stars 198 forks source link

[Feature] Implement get('markers') #136

Open DevDaveo opened 7 years ago

DevDaveo commented 7 years ago

Besides providing getting objects by an index it would be great to allow getting an array of all added markers (or infowindows, polygon etc) as Array of these objects.

simonl65 commented 7 years ago

+1

matadur commented 7 years ago

I've discovered you can get the array of markers this way: $('.map').gmap3().get(1)

If using the fit() method, the array is at: $('.map').gmap3().get(2)

You can also save a reference to the map when you create it and that to access the markers