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

倖福魔咒の 提交于 2019-11-26 18:35:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!