LineString does not work in google earth, it used to work

495 views
Skip to first unread message

S Tsai

unread,
Dec 15, 2011, 9:14:17 PM12/15/11
to KML Developer Support - Advanced Support for KML
I want to draw a point (mark) and with another LineString pass or near
by to the point. It used to work a few month ago under google earth.
But LineString did not work now. It draw a very long line in the
google earth. What's has been changed in earth and how to fix it?
Here is one sample of my kml.


<Placemark>
<name>Start</name>
<TimeStamp>
<when>2011-12-15T23:26.19Z</when>
</TimeStamp>
<styleUrl>rednone</styleUrl>
<Point><coordinates>-121.9144468,37.3750699,0</coordinates></Point>
<description>Nav mode: 3D, Validated, Altitude hold disabled, DR
calibration<br/></description>
</Placemark>

<Placemark>
<styleUrl>ehpecolor</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-121.9145147, 37.3750699
-121.9143789, 37.3750799
</coordinates>
</LineString>
</Placemark>

Bryan Mosher

unread,
Dec 16, 2011, 2:57:06 PM12/16/11
to kml-suppor...@googlegroups.com
I ran into this same thing a few weeks back, it seems that in the switch from version 6.0 to 6.1 of GE, they got a bit more stringent on the KML formatting of coordinates. According the KML spec, there should be no whitespace (only a comma) between the lat and long values. So if you change " -121.9145147,  37.3750699" to be " -121.9145147,37.3750699", things should work for you.

Took me some head pounding on my desk to track this one down! I dropped the white space in my code that creates coordinates (some C++ that generates KML) and everything went back to working just fine.

S Tsai

unread,
Jan 5, 2012, 4:44:44 PM1/5/12
to KML Developer Support - Advanced Support for KML
I found problems. Google Earth does not allow space between longitude
& latitude.
example:
-121.9145147, 37.3750699 // this will not work
-121.9145147,37.3750699 // this works
-121.9145147,037.3750699 // this works

This does not make any sense. I think this is Google earth bug.


On Dec 15 2011, 6:14 pm, S Tsai wrote:
> I want to draw a point (mark) and with anotherLineStringpass or near
> by to the point. It used to work a few month ago under google earth.
> ButLineStringdid not work now. It draw a very long line in the

Bryan Mosher

unread,
Jan 5, 2012, 10:44:39 PM1/5/12
to kml-suppor...@googlegroups.com
What you are describing exactly matches the KML specification for listing coordinates. It states that the coordinates should be comma separated, but not included any whitespace characters. The "bug" was really in the older versions of GE (6.0 and earlier) which did not fully enforce the requirement and let extra whitespace in your KML coordinates slide through.

Now, you may not like this format specification, but it is what it is. One could say that you should also allow slashes or some other character in between the coordinate numbers, but it's not a bug that the GE KML parser would not support these deliminators either.
Reply all
Reply to author
Forward
0 new messages