[gdal-dev] Parameter for run-time substitution of values in
mapfiles (e.g. for highlighting)?
Stefan Keller
sfkeller at gmail.com
Wed Apr 23 19:33:53 EDT 2008
Dear Frank, dear all,
I need to highlight a single or a group of POIs and found that MapServer CGI
has run-time substitution since version 4.0.
Does anyone know about the usage of this in mapserver?
Can this feature be made available also for shp2img?
This would allow to alter portions of a mapfile based on data passed via a
command line parameter (or a CGI request in the case of MapServer). Below
you find an explanation of this feature taken from *
http://mapserver.gis.umn.edu/docs/howto/runsub*<http://mapserver.gis.umn.edu/docs/howto/runsub>
:
Let's say you'd like the user to dynamically set a portion of an expression
so they could highlight a certain land cover class, and you have a form
element (called ctype) that allows them to choose between: forest, water,
wetland and developed. You could then set up a layer like so:
LAYER
NAME 'covertypes'
...
CLASSITEM 'type'
CLASS # highlighted presentation
EXPRESSION '%ctype%'
...
END
CLASS # default presentation
...
END
END
When a request is processed the value for ctype is substituted for the
string %ctype% and the mapfile is processed as normal (...).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080424/c24d5bb0/attachment.html
More information about the gdal-dev
mailing list