[mapserver-users] RE Dynamically extent and layer filter

Dedy Fuadi sampahe.fb3 at gmail.com
Fri May 30 09:17:06 PDT 2014


This is my mapfile part :
VALIDATION
'id' '^[0-9]{1}$'
END
FILTER  (id in ('%id%'))

and as your advice I set URL parameter like &id=1,4,8 but the map is not
appears there.

When I opened debug, I found :
[Sat May 31 00:10:34 2014].758000 msEvalRegex(): Regular expression error.
String failed expression test.
[Sat May 31 00:10:34 2014].758000 loadForm(): Web application error.
Parameter 'id' value fails to validate.


On Fri, May 30, 2014 at 11:42 PM, <Steve.Toutant at inspq.qc.ca> wrote:

>
> In your mapfile you could set FILTER "id in (%ID%)" .
> And in the url pass a string as parameter such as &id=1,4,8
> That would be a simple way
>
> Please post further question on mapserver list, so others can answer you,
> and the answers can help other people later
> thanks
> steve
>
>
>
>
>  *Dedy Fuadi <sampahe.fb3 at gmail.com <sampahe.fb3 at gmail.com>>*
>
> 2014-05-30 11:28
>   A
> Steve.Toutant at inspq.qc.ca
> cc
>   Objet
> Re: RE [mapserver-users] Dynamically extent and layer filter
>
>
>
>
>
>
> Hi Steve,
>
> Your advice is nicely work for me! :D
>
> But how to select more than one data from postgis by VALIDATION block? For
> example, I have a postgis table that have 20 data, then I wanto to select
> data 1,4,8, or else to display by customizing URL parameter. I set '%id%'
> as my variable at mapfile, I just can display one data like &id=1.
>
> Please for your help.
> Thank you.
>
>
> On Fri, May 30, 2014 at 8:30 PM, <*Steve.Toutant at inspq.qc.ca*
> <Steve.Toutant at inspq.qc.ca>> wrote:
>
> Hi
> What did you try and what happened? Something in the mapserver log.
> If I understand well you want to use run time substitution, if so here a
> link
> *http://mapserver.org/cgi/runsub.html*
> <http://mapserver.org/cgi/runsub.html>
>
> Make sure you have a VALIDATION block
> Steve
>
>
>   *Dedy Fuadi <**sampahe.fb3 at gmail.com* <sampahe.fb3 at gmail.com>*>@*
> *lists.osgeo.org* <http://lists.osgeo.org/>
> Envoyé par : *mapserver-users-bounces at lists.osgeo.org*
> <mapserver-users-bounces at lists.osgeo.org>
>
> 2014-05-30 06:52
>
>   A
> *mapserver-users at lists.osgeo.org* <mapserver-users at lists.osgeo.org>
> cc
>   Objet
> [mapserver-users] Dynamically extent and layer filter
>
>
>
>
>
>
>
>
> Hello friends,
>
> I just success applying filter data for postgis database on my mapfile,
> but I met problem when I was to try use dynamic variable for filter data
> and extent map like variable at php file.
>
> What should I do for solving this problem? Whether mapfile can be a
> dynamically file like php?
>
> Thank you,
> regards._______________________________________________
> mapserver-users mailing list
> *mapserver-users at lists.osgeo.org* <mapserver-users at lists.osgeo.org>
> *http://lists.osgeo.org/mailman/listinfo/mapserver-users*
> <http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140531/5fd91d3f/attachment-0001.html>


More information about the mapserver-users mailing list