E
E
Egor2018-02-14 12:10:51
JavaScript
Egor, 2018-02-14 12:10:51

How to get a list of markers on an already created Google map if there is a link to a map object?

I ask for advice. How to get a list of markers on an already created Google map?
The essence of the problem - there is a map that is created by a widget on the site, the map is filled with coordinates from the database, and each marker has its own image.
It is required to redefine the event handler (click) which, when clicking on the marker, will show additional information about the position of the marker. You cannot change the widget code, but it gives a link to the object of this map.
All the examples that can be found on the Maps JavaScript API work with markers when creating a map, or recreate markers if necessary.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stimulate, 2018-02-14
@Stimulate

Try
console.log(map.markers);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question