[mapserver-users] Dynamic generated layer?

Frank Koormann frank.koormann at intevation.de
Fri Jan 18 08:13:15 PST 2002


Twan,

* Twan Kogels (twan at twansoft.com) [020118 15:38]:
> Hello all,
> 
[...]
> 
> But now i'm planning to implement a search function. So i wrote a php 
> script (mapscript) which sets the "data" en "filter" properties in the 
> code, pseudo code:
> 
> $layer->setFilter("name='$name'");
> $layer->set("data", "the_geom from towns");
> 
> This will display all towns with names which matches "name='$name'". But 
> when i do this the orginal towns will disappear, i don't want that to 
> happen.
> 
> Is it possible to have the orginal towns layer and on top of that a dynamic 
> generated layer of the search result?

This can easily be acheived by using a seperate layer definition for the
search, with "STATUS OFF" in the map file. Activating this layer
explicitely and setting filter etc. will result in the functionality you
need.

Regards,

        Frank

-- 
Frank Koormann                             <frank.koormann at intevation.de>
 Professional Service around Free Software       (http://intevation.net/)
 FreeGIS Project                                 (http://freegis.org/)



More information about the MapServer-users mailing list