jbdemonte/gmap3

[Feature] Implement get('markers')

Opened this issue · 2 comments

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.

+1

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