[OpenLayers-Users] OpenLayer.WMS Problem
Heiko Schröter
schroete at iup.physik.uni-bremen.de
Wed Sep 30 09:22:15 EDT 2009
Am Mittwoch 30 September 2009 14:46:14 schrieb Heiko Schröter:
Answering myself.
That does it all. Sorry for the noise.
<snip>
var wL = 'PSC';
var params = {map: mapfile, layers: wL, transparent: true};
var pos = "map.layer["+wL+"]";
params[pos] = somevalue;
var psclayer = new OpenLayers.Layer.WMS(wL,
http_mapserver,
params,
{singleTile:true, isBaseLayer: false,
wrapDateLine: true,
queryable: true});
<snap>
> 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
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
More information about the Users
mailing list