Skip to content
Advertisement

Find Placemarks in kml file

I want to find all the Placemarks in a kml file:

JavaScript

This doesn’t work, i.e. it doesn’t find anything, I think because each Placemark is unique in that each has its own id, e.g.:

JavaScript

How do I do this?

Edit: changed code based on @ScottHunter comment:

JavaScript

length is 0

Advertisement

Answer

It’s hard to tell without seeing the full file, but try something like this

JavaScript

and see if it works.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement