[OpenLayers-Trac] Re: [OpenLayers] #2841: Filter strategy constructor should not need filter

OpenLayers trac-20090302 at openlayers.org
Fri Sep 17 03:56:50 EDT 2010


#2841: Filter strategy constructor should not need filter
-----------------------------+----------------------------------------------
 Reporter:  bartvde          |       Owner:  fredj       
     Type:  feature          |      Status:  new         
 Priority:  minor            |   Milestone:  2.11 Release
Component:  Strategy.Filter  |     Version:  2.10        
 Keywords:                   |       State:  Review      
-----------------------------+----------------------------------------------
Description changed by bartvde:

Old description:

> My use case is: at the startup of my application, I want to show all
> features. Then later on users can control the visibility of features by
> using checkboxes in a legend, so I will use setFilter then. However, now
> I have to instantiate my Filter strategy with something like (a filter
> that matches everything):
>
> {{{
>     new OpenLayers.Strategy.Filter({
>         filter: new OpenLayers.Filter.Comparison({type:
> OpenLayers.Filter.Comparison.LIKE, property: 'categorie', value: ''})
>     })
> ]}}
>
> How about allowing instantiating the strategy with no filter?

New description:

 My use case is: at the startup of my application, I want to show all
 features. Then later on users can control the visibility of features by
 using checkboxes in a legend, so I will use setFilter then. However, now I
 have to instantiate my Filter strategy with something like (a filter that
 matches everything):

 {{{
     new OpenLayers.Strategy.Filter({
         filter: new OpenLayers.Filter.Comparison({type:
 OpenLayers.Filter.Comparison.LIKE, property: 'categorie', value: ''})
     })
 }}}

 How about allowing instantiating the strategy with no filter?

--

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2841#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list