[OpenLayers-Users] OpenLayer.WMS Problem
Heiko Schröter
schroete at iup.physik.uni-bremen.de
Wed Sep 30 08:46:14 EDT 2009
Hello,
this call works:
<snip>
var mapfile = '/var/www/localhost/htdocs/country98/heiko5.map';
var http_mapserver = 'http://mailserv2/cgi-bin/mapserv';
var wL = 'PSC'
var psclayer = new OpenLayers.Layer.WMS(wL,
http_mapserver,
{map: mapfile,
layers: wL,
"map.layer[PSC]": somevalue,
transparent: true},
{singleTile:true, isBaseLayer: false,
wrapDateLine: true,
queryable: true});
<snap>
Replacing "map.layer[PSC]" with the following 'var filterstring' won't work:
<snip>
var filterstring = '\"map.layer[' + myprod + ']\"';
var psclayer = new OpenLayers.Layer.WMS(wL,
http_mapserver,
{map: mapfile,
layers: wL,
filterstring: somevalue,
transparent: true},
{singleTile:true, isBaseLayer: false,
wrapDateLine: true,
queryable: true});
<snap>
The filterstring is not passed too the webserver query string though it looks like exactly the first case.
Removing the double qoutes int he string variable won't change a thing.
I like to generalize the call to have a general function to call and not a specialized one. Passing arguments, parameter etc.
Any hints or pointers welcome.
Thanks and Regards
Heiko
More information about the Users
mailing list