OpenLayers sets the parameter to uppercase

MY.MAP.LAYER[MYLAYER]=DATA+shapefiles/shp2
 
Perhaps thats the problem

Arnd


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Ian
Gesendet: Montag, 30. März 2009 22:15
An: [email protected]
Betreff: [OpenLayers-Users] mergeNewParams and MapServer DATA

I'm using MapServer 5.0 and OpenLayers 2.7 to display WMS maps. I am trying
to dynamically change a layer's data source via url, specifically changing
the DATA parameter in the MapServer map file. So for two spatially-indexed
shapefiles (shp1, shp2):

Manually changing the url works:

http://host/cgi-bin/mapserv?map=my.map&LAYERS=myLayer&TRANSPARENT=true&SERVI
CE=WMS&VERSION=1.1.1&REQUEST=GetMap&...&map.layer[myLayer]=DATA+shapefiles/s
hp2

However when I use mergeNewParams:

myLayer.mergeNewParams({"my.map.layer[myLayer]" : "DATA+shapefiles/shp2"});

or:

myLayer.mergeNewParams({"myLayer" : "DATA+shapefiles/shp2"});


I get the error "msUpdateMapFromURL(): General error message. Layer to be
modified not valid." From Firebug it looks like the layer name is converted
to all caps which may be causing a mismatch, but copying and manually
editing the OpenLayers request's layer name gives a different
error:

getString(): Symbol definition error. Parsing error near (+):(line 1)


Any ideas?

Ian
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to