connecting two points

1,112 views
Skip to first unread message

Globaldyne

unread,
Feb 25, 2006, 9:44:33 PM2/25/06
to KML Discussions
I'm trying to figure out how to draw a line between 2 points. They are at different elevations so the line drawing function doesn't work. I'm guessing that it will work if I edit the xml?. I've tried editing in my lat and long in the untesselated line example but every time I try to open it with GE it wants me to specify the delimiter and none of them seem to work. I don't know what I'm doing here. They lay out right in the preview but the lat and long fields seem to be messing it up. Any Help?

PriceCollins

unread,
Mar 9, 2006, 9:10:33 AM3/9/06
to KML Discussions
Have you upgraded to Google Earth Plus?

At $20, it's a bargain.

Terry_Pinnell

unread,
Mar 9, 2006, 9:41:34 AM3/9/06
to KML Discussions
I've just tried an example. I was messing around in Cyprus, so I created two placemarks at different elevations, Point 1 and Point 2. Then I saved the KML file. At its most basic (after removing the LookAt and Style tags, and stripping blanks) it looked like this in my text editor:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Folder>
<name>Test joining 2 points</name>
<open>1</open>
<Placemark>
<name>Point 1</name>
<Point>
<coordinates>32.78173277943876,34.85302955360272,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Point 2</name>
<Point>
<coordinates>33.50950656180741,35.08924740935768,0</coordinates>
</Point>
</Placemark>
</Folder>
</kml>

I then looked up the LineString tag on page 60 of the KML 2.0 documentation, and manually changed the above to look like this:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Folder>
<name>Test joined 2 points</name>
<Placemark>
<LineString>
<coordinates>
32.78173277943876,34.85302955360272,0
33.50950656180741,35.08924740935768,0
</coordinates>
</LineString>
</Placemark>
</Folder>
</kml>

When loaded into GE Plus (with the original two placemarks also made visible, and after manually tilting and rotating), it looked like this:



Note how parts of the line are hidden by the mountains, like a string drawn tight between the two points.

--
Terry, West Sussex, UK

mcshea98

unread,
Mar 9, 2006, 1:53:04 PM3/9/06
to KML Discussions
Terry_Pinnell,

Here is the info on the <tessellate> tag. I think that if you add this in it will work.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Folder>
<name>Test joined 2 points</name>
  <open>1</open>
<Placemark>
<LineString>
<tessellate>1</tessellate>

<coordinates>
32.78173277943876,34.85302955360272,0 33.50950656180741,35.08924740935768,0
</coordinates>
</LineString>
</Placemark>
</Folder>
</kml>


Hope this helps.
Reply all
Reply to author
Forward
0 new messages