[mapserver-users] Smuggling vendor parameters into WMS OnlineResource

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Mon Oct 31 17:11:53 EDT 2011


Hi,

I have been playing with vendor parameters with some WMS services for making layers more dynamic.  For example 
http://188.64.1.61/cgi-bin/ms_ows?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=563&HEIGHT=437&LAYERS=default,osm_pisteet&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=-369151.98300283286,6597900.0,1511076.628895184,8057331.444759207&SRS=EPSG:3067&STYLES=&sql=highway='bus_stop'

Problem is that properly behaving WMS clients are taking the GetMap URL from the GetgCapabilities document and that is fixed by the wms_onliresource metadata in a mapfile. Some WMS clients (at least OpenJUMP, QGis and Kosmo) can be configured to add the extra parameters also into GetMaps but some others don't.  The OpenLayers demo client that comes with Mapserver 6.0.1 is one of those. It creates the demo layer with this code:
var mslayer = new OpenLayers.Layer.MapServer( "MapServer Layer",
            "[mapserv_onlineresource]",
             {layers: '[layers]'},
             {singleTile: "true", ratio:1} );

Does anybody know a simple way for transferring the same vendor parameters which are used in the GetCapabilities request into the GetMap OnlineResource element of the response?

-Jukka Rahkonen-


More information about the mapserver-users mailing list