[mapserver-users] Map projection not right in Openlayers
jjwang
jaja0506 at gmail.com
Wed Aug 24 16:23:54 PDT 2011
After I set the projection of the map as epsg:900913, on client-side,
Openlayers still tells me that the projection of this layer is "EPSG:4326".
map file:
MAP
PROJECTION
"init=epsg:900913"
END
........
........
WEB
TEMPLATE global.html
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"wms_title" "My Global Map WMS Server"
"wms_srs" "EPSG:900913"
"ows_enable_request" "*"
END
END
LAYER
PROJECTION
"init=epsg:4326"
END
......
......
END
......
......
END
Js code:
var propertydata_layer = new OpenLayers.Layer.WMS(
'Property Data',
'http://localhost:9999/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/global.map&',
{layers: 'nsw', transparent:true},
{opacity: .5}
);
this.map.addLayers([propertydata_layer]);
Result: map.layers[5]
div: HTMLDivElement
events: Class
grid: Array[3]
id: "OpenLayers.Layer.WMS_77"
inRange: true
isBaseLayer: false
map: Class
maxExtent: Class
maxResolution: 0.1
maxScale: 480.6248291015625
minResolution: 0.00000152587890625
minScale: 31498228.8
name: "Property Data"
numLoadingTiles: 0
numZoomLevels: 17
opacity: 0.5
options: Object
origin: Class
params: Object
projection: "EPSG:4326"
resolutions: Array[17]
scales: Array[17]
tileSize: Class
units: "degrees"
url:
"http://localhost:9999/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/global.map&"
__proto__: Object
Is this a Mapserver issue or Openlayers?
JJ
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Map-projection-not-right-in-Openlayers-tp6722667p6722667.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list