Starting Point and Altitude for Google Earth

396 views
Skip to first unread message

mduffy215

unread,
Dec 10, 2008, 12:26:05 PM12/10/08
to KML Developer Support - Getting Started with KML
I have Googled on this topic for a solution but there is a great deal
of static in the results.

I have also gone through the KML API.

Basically, I have a KML file with hundreds of points, rather than
letting Google Earth set the starting view I would like to specify the
lat/lon and altitude.

Any suggestions?

Thx.

Mike

Nymor

unread,
Dec 10, 2008, 1:04:19 PM12/10/08
to KML Developer Support - Getting Started with KML
Hi Mike,

To get Google Earth to fly to a particular view when you open your KML
just add a LookAt within the Document tag. (You can add a LookAt
within the Document or any Feature within it).

In the example below there are 2 Placemarks (neither of which has a
LookAt itself) but when the KML is opened it flys to the view
specified in the Document's LookAt. You can set the Lat, Lon,
Altitude, Range, Tilt and Heading.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>A couple of Placemarks</name>
<open>1</open>
<LookAt>
<longitude>0.0047</longitude>
<latitude>51.499</latitude>
<altitude>0</altitude>
<range>2400</range>
<tilt>60</tilt>
<heading>140</heading>
</LookAt>
<Placemark>
<name>Placemark 1</name>
<Point>
<coordinates>-0.00034,51.5,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Placemark 2</name>
<Point>
<coordinates>0.0066,51.5,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>

Hope that's what you were after.

Regards
Nymor

mduffy215

unread,
Dec 10, 2008, 3:57:35 PM12/10/08
to KML Developer Support - Getting Started with KML
Thx Nymor.

If you are ever in Austin, TX I will buy you a beer.

Mike
Reply all
Reply to author
Forward
0 new messages