[Cartoweb-users] passing variables to MapServer (for filtering)

Alexandre Saunier alexandre.saunier at camptocamp.com
Wed Jun 29 13:09:01 EDT 2005


Gustavo,

> How can I do what I used to do with plain MapServer CGI: to pass, as a variable, a user selection, that can then be replaced by MapServer (or PostGIS) as a filter expression.

I'm not quite sure to understand what you mean!?
Do you have an example?


> Also: can I still try groups as layers?  I have several layers, and I used the on and off at different scales.  I hid this complexity from the user, who just had to select the group (e.g. hydrography).  How can I do this.  

With CartoWeb you can aggregate layers and make them appear as a single 
layer in the layers selection interface.
For instance:

Hydrology
L rivers
L lakes
L icelands

may be aggregated as a global layer :

Hydrology

If the latter layer is selected, all its aggregated children (and 
grand-children, etc.) will also be implicitely selected and then 
displayed on the map (if their respective scale limits match the current 
one).

Have a look at the LayerGroups options section of the doc:
http://cartoweb.org/doc/xhtml/user.layers.html#user.layers.tree.layergroups

Regards,
Alex


More information about the Cartoweb-users mailing list