This topic has been hidden because it was flagged for abuse.

Showing 1-6 of 6 messages
This message has been hidden because it was flagged for abuse.
Re: Detect markers loaded from kml Andrei 6/15/10 9:21 AM
Once the KML contents is loaded you can loop through elements in the
KMLLayer to get the list of all available objects.
This message has been hidden because it was flagged for abuse.
Re: Detect markers loaded from kml Metafalica 11/15/12 11:08 AM
Err, so how exactly to loop through loaded elements?
I loading KML that way:
var nyLayer = new google.maps.KmlLayer("http://www.searcharoo.net/SearchKml/newyork.kml", { suppressInfoWindows: true, map: map });

Then i don't see anyway to find what objects inside. I tried to look in debugger what nyLayer contain inside, but nothing like objects array. Also tried this:
var test = nyLayer[0];

But test is undefined
Re: Detect markers loaded from kml Umapper 11/16/12 2:40 PM

Try using getObjects() on the layer like this


var nyLayer = new google.maps.KmlLayer("http://www.searcharoo.net/SearchKml/newyork.kml", { suppressInfoWindows: true, map: map });
var objects = nyLayer.getObjects();
var test = objects[0];
Re: Detect markers loaded from kml Metafalica 11/19/12 12:43 AM
Are we talking about google maps api v3? I loked in debugger into KMLayer object, but it doesn't contain getObjects() method.
Also, if we talk about something else, can you provide a link where to download it? I noticed this group called UMapper and found some site that describes this thing, but no any download links, so i don't know how to use it