[mapserver-users] Meaning of PROJECTION and WMS - using OpenLayers

Michael G. michael.gajda at tu-dortmund.de
Wed Aug 10 19:41:49 EDT 2011


since a couple of days we try visualize data from a postgis database using
mapserver and openlayers. As far as we know is our postgis data in EPSG:25832
and our mapfile for mapserver looks like this:


Now we have created an index.html containing the following JS snippet:


We can test the WMS using a direct WMS URL to our MapServer and asking for
EPSG:25832 and the correct extends, and it displays the map just fine
(Everything is protected so I cannot provide this URL here).

If we try to display the map using the openlayers code above we do not see
anything at all. You can zoom and move it around but that's
everthing you get with openlayers. Networkdebugging tools tell me, that
OpenLayers by default is requesting that google projection of EPSG:3867. But
even providing coordinates that should somehow be in Dortmund it does only
display the backgroundcolor.

Maybe you can help me clearing up a few things. Like the list of projections
in 'wms_srs' is what MapServer provides via WMS. And the PROJECTION entry on
the 'LAYER' level should be set to the projection of my data. Correct? And
the PROJECTION on the MAP level is ignored? Does MapServer automatically
convert the coordinates? MapServer requires to have EXTEND set. Which
projection should I use? The one defined at MAP level?

Best regards,

More information about the mapserver-users mailing list