Why we have to use epsg:900913 in OpenLayers

reference:http://docs.openlayers.org/library/spherical_mercator.html

epsg:900913 is spicfy the Soherical Mercator which used by google bing and some other commercial map API, and there is another important reason is the image which request from  gis server can't by reprojection in client side. So if you want to add your WMS or WCS layer to a map which use one the commercial maps as the base layer, you must use epsg:900913 as your map's projection. By openlayers code is laye.sphericalMercator=true. I have tried that if you doesn't set  laye.sphericalMercator=true the map's default projection will be "epsg:4326", and then  the base layer will distortion and can't set right location.

Epsg:900913是指球形墨卡托投影,是用这个投影的一大原因就是google等商业地图使用这个投影。如果,你的地图不使用这个写商业地图做背景图,就没有必要使用900913。在使用900913的时候,如果你想往地图上叠加自己的WMS或者WGS服务就需要你的WMS服务器支持900913,如果不支持就不能用。当设置laye.sphericalMercator=true.的时候,Map的projection就会被设置为900913,而之前地图的projection就会被替换。如果使用GoogleMap作为baseLayer但是没事设置球形墨卡托投影为true就会导致地图无法正确定位(例如定位北京的坐标,就会显示到北冰洋)。

 

转载于:https://www.cnblogs.com/yoyogis/p/3239938.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值