Closed GoogleCodeExporter closed 8 years ago
Hi,
GETourPlayer needs to take a KmlTour object... with most KML, the KmlTour is the
first or second child of the KmlDocument... in the basic sample, the KmlTour is
the
actual document-level object in the KML file.
You can find the KmlTour in the document by walking the DOM:
http://code.google.com/p/earth-api-samples/source/browse/trunk/lib/kmldomwalk.js
and then passing the tour to setTour
Original comment by api.roman.public@gmail.com
on 3 Apr 2009 at 5:57
Thanks for the explanation/link.
If I understand right, I have to use two different KML-files (one for the
placemarks/polygons and the second for the touring option)!? Or is it possible
to
integrate the touring option into an existing KML?
Original comment by glotter....@gmail.com
on 5 Apr 2009 at 5:16
You don't need to have two different files. Say you have the following
structure:
<Document>
<Placemark>...
<gx:Tour>...
</Document>
All you'd need to do is add the Document to the DOM via appendChild, walk the
DOM
looking for the <gx:Tour> and setTour(tour) on the tour you found during
traversal.
Original comment by api.roman.public@gmail.com
on 6 Apr 2009 at 5:18
Original issue reported on code.google.com by
glotter....@gmail.com
on 3 Apr 2009 at 6:00