[OpenLayers-Users] Help with Openlayers & Mapserver WMS

Julien-Samuel Lacroix jlacroix at mapgears.com
Mon Feb 18 18:21:26 EST 2008


Hi,

Your projection surely doesn't help. Your data don't seem to be in 
regular latlong. Your extents are in meter:
EXTENT 1999547.900000 5310286.800000 3001899.500000 6785629.600000

And you request a map in degree. OpenLayers assume that your requesting 
a regular EPSG:4326 and ask for a map of the following extents:
-180,-90,180,90
Example:
What OpenLayers ask for:
http://dev.asdf.co.nz/cgi-bin/wms?LAYERS=nz&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=epsg%3A4326&BBOX=-180,-90,180,270&WIDTH=256&HEIGHT=256
What you want it to ask:
http://dev.asdf.co.nz/cgi-bin/wms?LAYERS=nz&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=epsg%3A4326&BBOX=1999547.900000,5310286.800000,3001899.500000,6785629.600000&WIDTH=256&HEIGHT=256

Notice the BBOX?

I suggest you to find the real projection of your data (it's not 4326) 
and change that in your mapfile. You can probably use ogrinfo or QGIS to 
find it.

Julien

Neil Fincham wrote:
> Hi All,
> 
> 	This is probably something very simple but I have been going around in
> circles with this for a day or so.
> 
> 	I have set up a WMS server with MapServer, it all seems to be working
> well, you can go have a look at it at http://dev.asdf.co.nz/cgi-bin/wms
> (http://dev.asdf.co.nz/cgi-bin/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
> if you want to see all the details).  It works fine in QGIS and even
> works fine with http://dev.asdf.co.nz/cgi-bin/wms?mode=map .
> 
> 	If you want to have a look at my mapserver map it is available at
> http://dev.asdf.co.nz/temp/wms.map (minus the postgis stuff).
> 
> 	Unfortunately that is where it all falls to bits :( .  I have set
> OpenLayers up ( http://dev.asdf.co.nz/ ) and I not seeing anything but a
> white tile (the background colour of my map).
> 
> 	I suspect that it has something to do with projections so the first
> thing I did was re-import my data after changing it all to the
> openlayers default of EPSG:4326 (using ogr2ogr OUT.shp IN.shp -a_srs
> EPSG:4326).
> 
> 	Any help would be appreciated.
> 
> Thanks Heaps
> 
> Neil
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/



More information about the Users mailing list