1

I have a local kml file full of Placemarks.

I would like to be able to do the following with one click of a hyperlink in a locally hosted HTML file.

  1. Open Google Earth (if not already open)
  2. Load this kml file
  3. Center on a specific placemark

Just like opening an HTML document to a reference.
I've gone through the KML specifications, but can't see anything that looks like it would help.
Is there a way to do this?

1 Answer 1

2

To jump to a particular view (e.g. center on a particular placemark), create a LookAt or Camera view on the root-level Document element in the KML. The top-level view will be used as the default view when the KML is loaded.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
 <LookAt>
 </LookAt>
 ...
 </Document>
</kml>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.