[mapserver-users] Sql-Filter via URL
jmckenna at gatewaygeomatics.com
Sat Jan 23 08:59:17 EST 2010
Mehmet Sirin wrote:
> I would like to make some user specific sql-queries via url.
> The Data line in the mapfile looks like:
> DATA "geom from (select st_setsrid(the_geom,900913) as geom, gid from
> ways where gid in (3137, 3138, 3139) ) as a using unique gid using
> "gid" are parts of a street. These parts are chosen by the user in the
> html-website. After that the sql-query have to be changed in mapfile.
> But how to do that?
> SYMBOLSCALE 50000
> NAME 'street' # Layer-Name, der in OpenLayers
> aufgerufen wird
> TYPE LINE
> STATUS DEFAULT
> CONNECTIONTYPE postgis # Verbindung zur PostGIS-Datenbank
> CONNECTION "user=xxx password=xxx dbname=routing host=localhost
> DATA "geom from (select st_setsrid(the_geom,900913) as geom, gid
> from ways where gid in (3137, 3138, 3139) ) as a using unique gid using
> CLASSITEM 'gid'
> DUMP TRUE
> SYMBOL 'circle'
> SIZE 9
> MINSIZE 9
> MAXSIZE 15
> COLOR 0 0 200
I quickly searched the MapServer archives for this
(http://n2.nabble.com/MapServer-f1969210.html), and one of the results
seem to be applicable
try the FILTER parameter.
FOSS4G Consulting and Training Services
More information about the mapserver-users