[Users] FeatureStore with Filter

Eric Lemoine eric.lemoine at camptocamp.com
Sat May 30 21:47:40 CEST 2009





Le 29 mai 09 à 08:19, Daniel Kastl <orkney at gmx.de> a écrit :

> Hi List,
>
> Real projects produce real problems. Since I could convince my boss to
> try it with GeoExt (finally), I have a lot of fun in learning GeoExt,
> but also a couple of questions as you see.
>
> So far I could apply ExtJS filter(s) to my store. What I wanted to try

Using GeoExt.form.FormPanel?


>
> now is filtering by current map extent to get only the visible  
> features
> in the grid panel.

So if I understand correctly you'd like to combine the filter from the  
FormPanel with a BBOX filter corresponding to the current map extent.  
Is that correct?

Pierre is correct when saying that MapFish provides proper building  
blocks for this. Please follow up on the MapFish mailing list if you  
want to go that path (MapFish trunk now includes GeoExt).

Now if you want GeoExt only you'll need more code on your side, but it  
shouldn't be terribly complex. As I see it: use the  
GeoExt.form.toFilter func to get the filter from the form field  
values, combine this filter with a BBOX filter whose value is the  
current map extent, and pass the resulting filter to the  
protocol.read(). It's more code on your side because you can't just  
rely on formPanel.search().

Hope this helps,


>
>
> Eric, you always know the clever "one-single-line-of-code"  
> solutions, so
> I wanted to ask if there is something "easy" here. (Otherwise I would
> loop through all features and disable the invisible ones in the grid.)
>
> Thank you,
>
> Daniel
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list