How to tell KmlLayer about custom map projection?

↘锁芯ラ 提交于 2019-12-22 08:04:06

问题


I have a map with a custom projection (for maps.yandex.ru tiles) and default projection (Google and OSM tiles). When I add KmlLayer to map in the default projection it seems ok:

But switching map to maps.yandex layer (in custom projection)...

and kml-objects are misplaced.

How do I tell KmlLayer about custom projection?


回答1:


The way I understand it, any given object that has lat/lon (a,b) under a Mercator projection will have a different value than (a,b) under a custom projection. For example, if your custom projection was polar, the object would have distance from a fixed point and an angle from a fixed direction, and no lat/lon at all. So, the way to tell your KMLLayer about the custom projection would be to convert the coordinates of each object and rewrite the KML.



来源:https://stackoverflow.com/questions/10595931/how-to-tell-kmllayer-about-custom-map-projection

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