[mapserver-users] substitute DATA parameter via URL?
Stefanie Weykam
sweykam at telefonica.net
Thu Sep 30 08:19:42 PDT 2010
Dear list members,
I would like to change the following DATA parameter via URL
DATA "the_geom from (SELECT the_geom, oid, acar as qf FROM geotable) as
foo USING UNIQUE oid USING SRID=4326"
..where acar is the variable (a table field name) that should change on
request.
How would the DATAPATTERN look like?
I have tried without success:
DATAPATTERN "^the_geom from (SELECT the_geom, oid, [a-z]{4} as qf FROM
geotable) as foo USING UNIQUE oid USING SRID=4326"
..which throws a parsing error near (DATAPATTERN)
And I suppose the corresponding extension to the base URL would look
like this?
..&map.layer[myLayer].data="the_geom from (SELECT the_geom, oid, emci as
qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326"
..worked fine on MapServer 4.6 (before validation war requiered)
I wonder if it was easier to retrieve the entire table and substitute
the field name. But I have 6 classes with expressions like this:
EXPRESSION ([qf]> 20 AND [qf]<= 40)
..which would make the URL-extension even longer. Anyway, I haven’t
figured out how to set up the corresponding validation string of the
either the classitem or the logical expression or both.
I’m (still) working with MapServer v. 5.2.1
Any examples for DATAPATTERN would be highly appreciated.
Best regards
More information about the MapServer-users
mailing list