当前位置: 代码迷 >> Web前端 >> Openlayers设立ESPG900913作为影射算法
  详细解决方案

Openlayers设立ESPG900913作为影射算法

热度:259   发布时间:2012-08-25 10:06:20.0
Openlayers设置ESPG900913作为影射算法

Geoserver默认的地图影射方式是EPSG:4326,但是对于常用的WebGIS来说,常用的影射方式是EPSG:900913,下边的代码用来设置openlayers,通知geoserver使用新的映射算法

?

?

var options = {
		projection: new OpenLayers.Projection("EPSG:900913"),
        maxResolution:156543.0339,
        maxExtent: new OpenLayers.Bounds(-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892),
	    units: "m",
        numZoomLevels: 17,
        displayProjection: new OpenLayers.Projection("EPSG:4326"),
	    controls: []
    }
	
	var map = new OpenLayers.Map('map', options);
  相关解决方案