[mapserver-users] using &viewparams

Pedro Costa pedrocostaarma at sapo.pt
Tue Jul 30 04:32:18 PDT 2013


Hi Jukka,

I thought that 'viewparams' is a standart....
My error...
I will see the link i try...

Thanks

Em 30-07-2013 12:28, Rahkonen Jukka escreveu:
> Hi,
>
> I guess that you are mixing two great software by trying to use the Geoserver "viewparams" vendor option with Mapserver. Instead, with Mapserver you will need to use the run-time substitution system. Read for example http://mapserver.org/cgi/runsub.html#runsub and http://linfiniti.com/2011/09/making-the-most-of-umn-mapserver-runtime-variable-substitution/.
>
> You are almost there but you must add validation for your "id" parameter and use &id=1 syntax in the WMS requests.
>
> -Jukka Rahkonen.-
> ________________________________
> Pedro Costa wrote:
>
>> Hi guys,
>> I'm trying to generate a lot of maps passing a param in URL request.
> In my mapfile I have one layer called streets. The streets are stored in postgis database and in my mapfile I have that:
>
> ".... DATA "the_geom from streets using unique id WHERE id = %id% .."
>
> Next, i have added to the URL GetMap request this:
>
> &viewparams=id:1
>
>
> But I get all the layer, and not only the feature with id 1...
>
> I'm doing something wrong?
>
> Thanks
> _______________________________________________
> 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