[mapserver-users] Set OPACITY through runtime substitution
Space
han.vangeel at meteogroup.com
Fri Feb 5 05:08:06 PST 2016
Hello,
I'd like to be able to set OPACITY of a layer through a parameter within a
request, like:
http://mapserver-prelive.myserver.net/cgi-bin/mapserv?map=/var/www/mapserver/mymapfile.map&service=wms&request=GetMap&version=1.1.1&layers=wind_area&srs=EPSG:4326&BBOX=-43.6,17.5,42.8,73.6&WIDTH=400&HEIGHT=300&FORMAT=image/png&TIME=2016-01-01T18:00:00.000Z&OPACITY=50
Within the file where the layer is defined I added the line:
OPACITY [opacity]
To the VALIDATION section I have added the following lines:
"opacity" "^[0-9]{1,2}$|^100$"
"default_opacity" "100"
I keep getting an error:
getIntegerOrSymbol(): Symbol definition error. Parsing error near
(opacity):(line 173)
I've tried this on MapServer v6.4.1 and v7.0.0 with the same results. I have
also tried a different approach:
CLASS
EXPRESSION ('[opacity]' = '10')
STYLE
OPACITY 10
END
END
CLASS
EXPRESSION ('[opacity]' = '20')
STYLE
OPACITY 20
END
END
Playing around with the opacity value within the URL tells me it does
interpret the parameter, but setting the opacity like this returns a pink
image in all cases.
Please any help is appreciated.
Regards
Han
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Set-OPACITY-through-runtime-substitution-tp5249093.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list