Detect markers loaded from kml

73 views
Skip to first unread message

msaly

unread,
Jun 15, 2010, 7:15:16 AM6/15/10
to UMapper
hi
how to detect markers or polygons that loaded from kml files for
change it's property or etc...

Andrei

unread,
Jun 15, 2010, 12:21:40 PM6/15/10
to UMapper
Once the KML contents is loaded you can loop through elements in the
KMLLayer to get the list of all available objects.

msaly

unread,
Jun 19, 2010, 7:02:01 AM6/19/10
to UMapper


On Jun 15, 7:21 pm, Andrei <and...@umapper.com> wrote:
> Once the KML contents is loaded you can loop through elements in the
> KMLLayer to get the list of all available objects.
>
> On Jun 15, 5:15 am, msaly <mreiazis...@gmail.com> wrote:

thanks

Metafalica

unread,
Nov 15, 2012, 2:08:27 PM11/15/12
to uma...@googlegroups.com
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

Umapper

unread,
Nov 16, 2012, 5:40:32 PM11/16/12
to uma...@googlegroups.com

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];

Metafalica

unread,
Nov 19, 2012, 3:43:53 AM11/19/12
to uma...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages