问题描述
我有自定义投影(对于maps.yandex.ru图块)和默认投影(Google和OSM图块)的地图。当我添加KmlLayer来映射默认投影时,它似乎可以:
但将地图切换到maps.yandex图层(在自定义投影中)...
和kml-objects错位。
我如何判断关于自定义投影的KmlLayer?
根据我的理解,任何给定的对象具有纬度/经度(a,b)在自定义投影下,墨卡托投影将具有与(a,b)不同的值。例如,如果您的自定义投影是极性的,则该对象将具有距固定点的距离和来自固定方向的角度,并且根本没有经度/纬度。因此,告诉您的KMLLayer关于自定义投影的方法是转换每个对象的坐标并重写KML。
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?
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.
这篇关于如何告诉KmlLayer关于自定义地图投影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!