KML文件中的坐标在Google地图中显示不正确 [英] Coordinates from a KML file not displayed properly in Google Maps

查看:364
本文介绍了KML文件中的坐标在Google地图中显示不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个KML文件,我提取最后一个坐标并尝试将它们设置为Google Map的中心,但标记位于完全不同的位置。

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 .

我必须将KML坐标转换为Google地图坐标吗?

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

非常感谢

Thanks a lot

推荐答案

KML坐标是x,y经度,纬度),而地图使用LatLng(或y,x /纬度,经度)。

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

只需切换x和y顺序,您应该全部设置。

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

这篇关于KML文件中的坐标在Google地图中显示不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆