Stef,
I don't know noting about DATAPATTERN, but you can try this:
On 21-08-2012 12:55, [email protected] wrote:
Date: Tue, 21 Aug 2012 16:41:17 +0200
From: Stefan Schwarzer<[email protected]>
To:[email protected]
Subject: Re: [mapserver-users] Passing an additional parameter via URL
for WMS request - doesn't work anymore with new mapserver?
Message-ID:<[email protected]>
Content-Type: text/plain; charset=windows-1252
Thanks so much for the quick responses!
If I understand it correctly, I need to specify "DATAPATTERN" in the MAP part,
in order to use the parameter in the DATA request:
Doc is saying: LAYER: DATA (must validate against DATAPATTERN)
which would look like this:
SHAPEPATH '/www/xxx/data'
SHAPEPATH is not taken into account for layers that use database
connection, however you need this if you have any layer that uses SHAPEFILE.
FONTSET '/www/xxx/htdocs/mod_map/etc/fonts.txt'
SYMBOLSET '/www/xxx/htdocs/mod_map/etc/symbols.sym'
DATAPATTERN '^[0-9]'
with the DATA request like:
DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country<>
%id_country%) AS foo USING UNIQUE gid USING srid=4326"
Try change "<>" by "!="
DATA "the_geom FROM (SELECT xxx FROM capitals WHERE capitals.id_country !=
%id_country%) AS foo USING UNIQUE gid USING srid=4326"
Hmmm?. But that doesn't work.
msDrawMap(): Image handling error. Failed to draw layer
named'capitals_mask'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: syntax error
at or near")"
LINE 1: ...capitals WHERE capitals.id_country<> %id_country%) AS foo w?
Can you shed some light on it? I am not really familiar with the regular
expressions. I am just passing an integer.
Thanks for any hints!
Stef
Let me know if this was useful for you.
Humberto Cereser Ibanez
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users