[mapserver-users] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?
Till Adams
adams at terrestris.de
Tue Aug 21 07:10:47 PDT 2012
Stefan,
from mapserver 6 on you must define the default values for the
parameters in your metadata-tag and also provide a validation-pattern.
You'll find more here:
http://mapserver.org/cgi/runsub.html
Regards, Till
On 21.08.2012 16:07, Stefan Schwarzer wrote:
> Hi there,
>
> I used to pass a parameter in a WMS request in order to specify which country should be highlighted. The MAPFILE would read that and, via an EXPRESSION, set all country but the selected one to a bit of opacity:
>
> DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country <> %id_country%) AS foo USING UNIQUE gid USING srid=4326"
>
> That doesn't work anymore after upgrading our machine. So, I am not 100% sure if this comes from mapserver, or if there is anything else involved. But it seems more like a mapserver problem, as the error-message is
>
> <ServiceException>
> msDrawMap(): Image handling error. Failed to draw layer named 'capitals_selected'.
> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: syntax error at or near "%"
> LINE 1: ...als.gid FROM capitals WHERE capitals.id_country = %id_countr...
> ^
>
> msValidateParameter(): Regular expression error. Parameter pattern validation failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation failed.
> msValidateParameter(): Regular expression error. Parameter pattern validation failed.
> </ServiceException>
>
>
> Thanks for any hints/clarification.
>
> Stefan
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
--
NEWS:
-> GO Mobile - jetzt WebGIS auch auf Smartphones
-> Bald OpenSource! SHOGun - das JavaBackend für WebGIS Anwendungen
----------------------------------------------------
terrestris GmbH & Co. KG
Puetzchens Chaussee 56
53227 Bonn
Germany
Till Adams
Geschaeftsfuehrung
Tel: +49 (0)228 / 962 899-52
Mobile: +49 (0)151 / 25394429
Fax: +49 (0)228 / 962 899-57
adams at terrestris.de
http://www.terrestris.de
Amtsgericht Bonn, HRA 6835
----------------------------------------------------
Komplementaerin:
terrestris Verwaltungs GmbH
vertreten durch:
Hinrich Paulsen, Till Adams
More information about the MapServer-users
mailing list