[mapserver-users] Passing an additional parameter via URL for WMS request - doesn't work anymore with new mapserver?

Stefan Schwarzer stefan.schwarzer at unep.org
Tue Aug 21 07:07:04 PDT 2012


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


More information about the mapserver-users mailing list