I
I
IDMan2012-02-09 18:30:43
OpenStreetMap
IDMan, 2012-02-09 18:30:43

Get a list of markers on gmap on an already loaded map?

The site uses a Google map with markers and polygons (colored areas, in the center of which is a marker that shows the name of the area). The data is loaded from the .KML file with the function . As a result, I have a map on which the polygons are set along with markers. The task is to redefine the properties and text of the pop-up that appears when clicking on the marker. To do this, you need to redefine the function that "hung" on the marker's onClick, something like this:
map.addOverlay(new GGeoXml(fileName));

GEvent.bind(marker,”click”,marker,function() {
...
});

and accordingly - you need to somehow get a list of all markers on the map. But getting a list of markers on an already loaded map does not work, and the config does not (according to the documentation) have the corresponding properties to override the desired characteristics right there.
What do you suggest? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FIZIK, 2012-02-09
@FIZIK

Replace in KML, no?

S
Sergey Lerg, 2012-02-10
@Lerg

So get to them via the DOM (in Chrome developer tools), find the distinguishing characteristics (class gmnoprint, last div), compose an appropriate selector for jQuery, for example, and reassign the action.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question