[mapserver-users] GET parameter in MapServer query

Steve Lime Steve.Lime at dnr.state.mn.us
Tue Apr 21 09:13:51 EDT 2009


You'd change your DATA statement to something like so:

  DATA "GEOM FROM (SELECT * FROM WIJK_%year% WHERE datum LIKE '%-08') USING SRID 28992"

Assuming I put the substitution in the right place. You should also set a validation parameter
for this substitution. This is especially important with RDBMS sources:

  METADATA
    year_validation_parameter '^200[1-9]$'
  END

The above example would limit the value for the year variable to 2001-2009.

Does this help?

Steve

>>> Hugo Estrada <hestrada at imapdata.com> 04/20/09 7:06 PM >>>
I am looking for an answer to this same question.

On Fri, Apr 17, 2009 at 4:46 AM, A387 <adri.kodde at gmail.com> wrote:

>
> Hi all,
>
> This is my first post in the mapserver mailinglist.
> I'm having problems with querying Oracle Spatial. For example, this is my
> current query:
> DATA "GEOM FROM (SELECT * FROM WIJK_2008 WHERE datum LIKE '%-08') USING
> SRID 28992"
>
> What I want now, is that if I access my file by the following URL, is that
> the LIKE values will be changed by the parameters given in the URL.
>
> Current:
> http://localhost/cgi-bin/mapserv.exe?map=../../apps/wijk/htdocs/wijk_2008_gen.map&layer=wijkgrenzen&mode=map&program=../cgi-bin/mapserv.exe
>
> What I want:
>
> http://localhost/cgi-bin/mapserv.exe?map=../../apps/wijk/htdocs/wijk_2008_gen.map&layer=wijkgrenzen&mode=map&program=../cgi-bin/mapserv.exe&year=2008
> .
>
> Could you give me a heads up, about if this is possible and how to make my
> mapfile dynamically?
> --
> View this message in context:
> http://n2.nabble.com/GET-parameter-in-MapServer-query-tp2644877p2644877.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the mapserver-users mailing list