Coordinates from a KML file not displayed properly in Google Maps

社会主义新天地 提交于 2019-12-10 21:39:27

问题


I have a KML file and I extract the last coordinates and try to set them as a center of a Google Map but the marker is in a completely different place .

Do I have to "convert" KML coordinates into google maps coordinates ?

Thanks a lot


回答1:


KML coordinates are x,y (longitude, latitude), whereas Maps uses LatLng (or y,x / latitude, longitude).

Just switch the x and y order and you should be all set.



来源:https://stackoverflow.com/questions/9866925/coordinates-from-a-kml-file-not-displayed-properly-in-google-maps

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