开发者

OpenLayers - Mercator projection, with decimal degree lat/lon units

I'm using OpenLayers开发者_StackOverflow to display a map of the same projection as Google Maps, Bing, etc. (that is, a square Mercator map). As I understand it, to enable this projection, I need to use the sphericalMercator flag. However, this also appears to change the units used by the LonLat method, etc. such that I have to transform from decimal degrees to metres.

Is there a way I can use the Mercator projection, but still use decimal degrees in order to specify positions on the map?

Thanks.


Depends what you mean by "specifying positions on the map": if you want to add Markers, Vector Features etc., you have to re-project their coordinates, but you can do that within OpenLayers.

If you just want specify positions in a "read-only way" (e.g. displaying the current mouse position with the MousePosition Control in a certain coordinate system), you can do so by simply specifying the "displayProjection" parameter of the map.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜