vikcherniy
vikcherniy

Reputation: 680

Get markers from the already loaded map

I need yours help.

I get parameters (markers and polygons) of mine Google Map from KML file. How can I get all markers from this (already loaded) map? When I'll get these markers, I will use this array of markers in the function:

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

Thanks.

Upvotes: 0

Views: 578

Answers (1)

Mano Marks
Mano Marks

Reputation: 8819

You appear to be using Google Maps API V2, you should consider moving over to V3 since V2 is deprecated and could be shut off as early as next year. Regardless, in neither V2 nor V3 does the GGeoXml object(v2) or the KMLLayer object (v3) give you access to all the information at once. In V3, the KmlLayer object gives you some of the basic feature data when you click on it, so you may not need to parse it before hand. If that doesn't provide you with sufficient information, you'll need to parse the KML before hand as XML.

Upvotes: 1

Related Questions