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就会导致地图无法正确定位(例如定位北京的坐标,就会显示到北冰洋)。

 

posted on 2013-08-06 09:50  yoyo002  阅读(575)  评论(0编辑  收藏  举报