AW: [mapserver-users] Smuggling vendor parameters into WMSOnlineResource
Arnd Wippermann
arnd.wippermann at web.de
Mon Oct 31 15:44:18 PDT 2011
Hi,
You can build your own template.
In your mapfile insert
TEMPLATE 'path\templates\openlayers_lh.html'
And request the map
http://[version6]/mapserv.exe?map=brd.map&mode=browse&template=openlayers_lh
&layers=Kreise
You have to take an other name than openlayers.html, to get your template.
Arnd
-----Ursprüngliche Nachricht-----
Von: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Rahkonen
Jukka
Gesendet: Montag, 31. Oktober 2011 22:12
An: mapserver-users at lists.osgeo.org
Betreff: [mapserver-users] Smuggling vendor parameters into
WMSOnlineResource
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&W
IDTH=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-_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list