Cant get it to draw a path

1 view
Skip to first unread message

AnthonyBradley

unread,
Feb 7, 2006, 10:59:03 AM2/7/06
to KML Discussions
Hi,

Just getting into GE, and want to draw a path. Have downloaded the sample KML file, and can see the paths ok in that, so I saved off the Transparent Purple Path section and just changed the coords to put my own in, and changed the lookat to point at the path.

When I open it, it pans and zooms to the location I epxect, but I dont see the path there. Have tried it several ways around and still no visable path.

Any ideas whats wrong on the code below? This is driving me mad :-(

Thanks! Anthony

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Placemark id="khPlacemark804">
<name>Absolute</name>
<description>Transparent purple line</description>
<LookAt>
<longitude>4.273216667</longitude>
<latitude>39.89243333</latitude>
<range>2569.386968383512</range>
<tilt>44.60763714203011</tilt>
<heading>-106.8262530024943</heading>
</LookAt>
<styleUrl>#khStyle580</styleUrl>
<Style id="khStyle1193">
<LineStyle id="khLineStyle1196">
<color>7fff00ff</color>
<width>4</width>
</LineStyle>
<PolyStyle id="khPolyStyle1195">
<color>7f00ff00</color>
</PolyStyle>
</Style>
<LineString id="khLineString1200">
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates>
38.89243333,3.273216667,2357
39.88963333,4.2767,2357
39.89243333,4.273216667,2357
39.88963333,4.2767,2357
39.88963333,4.27675,2357
39.88965,4.276983333,2357
39.88955167,4.2772,2357
39.88945167,4.2773,2357
39.89091667,4.2767,2357
39.89133333,4.274883333,2357
39.89031667,4.2695,2357
39.89025167,4.269166667,2357
39.89030333,4.269133333,2357
39.891485,4.27275,2357

</coordinates>
</LineString>
</Placemark>
</kml>

TheRealMcCoy

unread,
Feb 7, 2006, 11:22:00 AM2/7/06
to KML Discussions
Right click on your path and edit it.
Go to view and click on "Reset to default view" and you'll have a surprise

In fact you inverted Latitude and Longitude in the datas of your path between <coordinates> and </coordinates> (but not in the <LookAt> section

AnthonyBradley

unread,
Feb 7, 2006, 11:57:27 AM2/7/06
to KML Discussions
DOH, great thanks!

I noticed that the tags for the view were reversed from the 'normal' lat,long notation, but totally neglected to think that the coord pairs may also be reversed!

Many thanks!

Anthony

TheRealMcCoy

unread,
Feb 8, 2006, 7:01:10 AM2/8/06
to KML Discussions
You're welcome
Reply all
Reply to author
Forward
0 new messages