问题
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?
回答1:
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)
来源:https://stackoverflow.com/questions/12081160/after-importing-kml-to-google-maps-point-is-showing-in-antartica