[Cartoweb-users] Passing variable to mapserver

Oliver Christen oliver.christen at camptocamp.com
Mon Mar 17 11:14:09 EDT 2008


you cant do it like that
you need to use mapOverlay to set the filter dynamicaly

http://www.cartoweb.org/doc/cw3.4/xhtml/dev.mapoverlay.html#dev.mapoverlay.usage.filter 
(second example)

regards
Oliver

> Hi!
> I want to pass variable "myvar" to mapserver taken from 
> "filterPostRequest(FilterRequestModifier $request)" implemented in my own 
> cartoweb plugin.
>
> In the map file LAYER I've written:
>
>
> ....
>
>      CONNECTIONTYPE postgis
>      CONNECTION "user=******password=*****dbname=indirizzi host=localhost 
> port=5432"
>      DATA "the_geom from (SELECT *, geocodifica2.the_geom FROM servizi, 
> geocodifica2 WHERE servizi.gid = geocodifica2.gid) as foo using unique gid 
> using SRID=4326"
>      FILTER "servizio_uno = 'Y' and indirizzo ilike '%'\%myvar%'\ %'"
>
>
> ....
>
>
> How can I do to display my layer correctly?
> "ilike" and "%" are my problems....
>
> Thanks a lot !
>
> -- 
> Ing. Fabio D'Ovidio
>
> iQuadro - Informatica e Innovazione s.r.l.
> Via C. Pisacane 23, Aversa (CE) - 81031
> Web : www.ii2.it
> Tel.: 081 197 57 600
> mail: fabiodovidio at gmail.com
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list