[mapserver-users] Runtime variable Substitution Filter

thomas bonfort thomas.bonfort at gmail.com
Fri Mar 11 09:00:39 PST 2016


You could use a regex in your database query. With '^%nom%$' in your
expression, and .* as your default_nom
On Mar 11, 2016 4:00 PM, "milad nidal" <miladnidal2604 at gmail.com> wrote:

>
> But this example is using the same layer twice which I do not want.. Even
> in this example if we do not use value  we get nothing and only one layer
> will be visualised..
>
> Maybe I was not clear enough in my question.. I want to visualise all the
> municipalities then I want to apply the filter to visualize only one. I
> thought maybe there is something like ‘default_value’ ‘all’ J.
>
>
>
> thanks
>
> On Fri, Mar 11, 2016 at 9:38 AM, <lars.schylberg at blixtmail.se> wrote:
>
>> Here is a full example with a default value also:
>>
>>
>> http://linfiniti.com/2011/09/making-the-most-of-umn-mapserver-runtime-variable-substitution/
>>
>> /Lars S.
>>
>> ------------------------------
>> -----Originalmeddelande-----
>> Från: "milad nidal" <miladnidal2604 at gmail.com>
>> Till: "Richard Greenwood" <richard.greenwood at gmail.com>, "MapserverList
>> OSGEO" <mapserver-users at lists.osgeo.org>
>> Datum: 2016-03-11 14:31
>> Ämne: Re: [mapserver-users] Runtime variable Substitution Filter
>>
>> Could you please explain more about how to do it (the first time which
>> I'm using this variable)..
>>
>> Do you mean that I use 'default_nom' ' aaa' in the layer metadata (it
>> does not work).. where I should put the default value?
>>
>> Thanks
>>
>> On Thu, Mar 10, 2016 at 11:06 PM, Richard Greenwood <
>> richard.greenwood at gmail.com> wrote:
>>
>>> Michael's suggestion is very good. Another method would be to define the
>>> later twice with two different names and no filter in one of the
>>> definitions. That would also allow you to style the layer differently which
>>> might be desirable.
>>>
>>> Rich
>>>
>>> On Thu, Mar 10, 2016 at 6:44 PM, Michael Smith <
>>> michael.smith.erdc at gmail.com> wrote:
>>>
>>>> You can set a default value for your layer when no value is set. What I
>>>> do is set it to something like 1=1 and then all values will display.
>>>> http://mapserver.org/cgi/runsub.html#default-values-if-not-provided-in-the-url
>>>>
>>>>
>>>>
>>>> Michael Smith
>>>> Remote Sensing/GIS Center
>>>> US Army Corps of Engineers
>>>>
>>>> On Mar 10, 2016, at 8:36 PM, milad nidal < miladnidal2604 at gmail.com>
>>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm using Runtime variable Substitution (FILTER "nom in (
>>>> %municipalitylist% )") to chose one municipality from a list and it is
>>>> going good. But how I can visualize all the municipalities in the layer?
>>>> Is-it possible to ignore the filter?
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>
>>>
>>>
>>>
>>> --
>>> Richard W. Greenwood, PLS
>>> www.greenwoodmap.com
>>>
>>
>> ------------------------------
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>
>> --
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160311/d1d4f533/attachment.htm>


More information about the MapServer-users mailing list