[mapserver-users] problem with MapServer as WMS client

Puneet Kishor punk.kish at gmail.com
Sat Oct 15 16:57:35 PDT 2011


I am going from OpenLayers to MapServer acting as a WMS client to a remote server. OL is requesting SRS 900913, and the remote server is sending data in 4326, and I want to send it back to OL in 900913. My layer definition is like so

	LAYER
		NAME "foo"
		TYPE POLYGON
		STATUS ON
		CONNECTION "http://server/cgi-bin/mapserv?map=mapfile.map"
		CONNECTIONTYPE WMS
		
		PROJECTION
			"init=epsg:4326"
		END
		
		METADATA
			wms_srs			"EPSG:900913 EPSG:4326"
			wms_name		"foo"
			wms_server_version	"1.1.1"
			wms_format		"image/png"
			wms_enable_request 	"*"
			wms_extent		"-180 -90 180 90"
		END
	END

I am getting the following error

msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be valid for all requested layers.

I have three questions:

1. The docs at http://mapserver.org/ogc/wms_client.html state that the connection should not have any query params, but I don't see any options to pass the map file name. Is it ok the way I am doing it above?

2. How do I get around the above error?

3. Is there a way I can see the actual request that MapServer is making to the remote server, perhaps in the error.log?


--
Puneet Kishor


More information about the MapServer-users mailing list