[OpenLayers-Users] WFS + Filter

Kris Geusebroek kgeusebroek at xebia.com
Thu Nov 26 06:44:30 EST 2009


Hi,

Don't know if it works with fixed strategy but you can try to call
myLayer.refresh({force: true});after setting the filter

Cheers Kris

-----Original Message-----
From: Ivan Grcic [mailto:igrcic at gmail.com] 
Sent: Thursday, November 26, 2009 12:38 PM
To: Kris Geusebroek
Cc: stash; users at openlayers.org
Subject: Re: [OpenLayers-Users] WFS + Filter

Yes, but using it together with Fixed strategy doesnt work. Maybe
there is ticket allready opened for that, ill take a look.

Stash, can you try putting defaultFilter option inside protocol params?

On Thu, Nov 26, 2009 at 12:27 PM, Kris Geusebroek <kgeusebroek at xebia.com> wrote:
> Hi,
>
>  filter should into layer options!
>
> Something like this:
>
> function setRadiusFilter(ft) {
>        if (ft != null) {
>                var radiusFilter = new OpenLayers.Filter.Spatial(
>                        {
>                                type: OpenLayers.Filter.Spatial.DWITHIN,
>                                distance: selectedRadius,
>                                value: ft.geometry,
>                                projection: myLayer.projection
>                        }
>                );
>                var combinedFilter=new OpenLayers.Filter.Logical({
>                        type:OpenLayers.Filter.Logical.AND,
>                        filters:[filter,radiusFilter]
>                });
>                myLayer.filter = combinedFilter;
>
>
> Cheers Kris
> -----Original Message-----
> From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
> On Behalf Of Ivan Grcic
> Sent: Thursday, November 26, 2009 12:19 PM
> To: stash
> Cc: users at openlayers.org
> Subject: Re: [OpenLayers-Users] WFS + Filter
>
> Im going to check it out with my data now. I have to examine request
> and see if the filter is actually sent in the request.
>
> In the meanwhile, can you try with BBOX Strategy instead of Fixed
> strategy?( Put your filter in layer options)
>
> On Thu, Nov 26, 2009 at 12:08 PM, stash
> <steffen.schwarz85 at googlemail.com> wrote:
>>
>>
>>
>> Ivan Grcic-2 wrote:
>>>
>>> Hi,
>>>
>>> I think filter should go inside protocol params.
>>> And try with maxFeatures instead of maxfeatures.
>>>
>>> Let me know if it worked
>>> Cheers
>>>
>>
>> Hi,
>>
>> thanks for the hint. First the good news. When I type maxFeatures
> instead of
>> maxfeatures it works. Thats fine. But the filter, which is much more
>> important for me, isn't working (even when I put the filter: my_filter
> param
>> inside the protocol params.)
>>
>> Do you have any other idea?
>>
>> Regards
>> stash
>>
>> --
>> View this message in context:
> http://n2.nabble.com/WFS-Filter-tp4049517p4070602.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
>
> --
> Ivan Grcic
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Ivan Grcic



More information about the Users mailing list