Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
680 views
in Technique[技术] by (71.8m points)

xml - After importing KML to Google Maps, point is showing in Antartica

I'm trying to figure out what I'm doing wrong.

Here is a very simple version of my KML:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>SUNSHINE CHEVRON</name>
<description>HIALEAH</description>
<Point>
    <coordinates>25.872066,-80.282852,0</coordinates>
</Point>
</Placemark>
</kml>

When I try to create a map and import this point, it shows up in Antartica.

Any thoughts? I validated the file using http://kmlvalidator.com/, and it returns with no errors.

Can you tell me what I'm doing wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

See the documentation on coordinates, the coordinates are in longitude,latitude,[altitude]

A single tuple consisting of floating point values for longitude, latitude, 
and altitude (in that order). Longitude and latitude values are in degrees, 
where:

   longitude ≥ ?180 and <= 180
   latitude ≥ ?90 and ≤ 90
   altitude values (optional) are in meters above sea level

Do not include spaces between the three values that describe a coordinate.

So they should be:

<coordinates>-80.282852,25.872066</coordinates>

(Assuming you want the placemark in Florida)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...