[Users] featureFilter in GeoExt.data.FeatureStore
Christian Mayer
mayer at terrestris.de
Tue Apr 2 18:39:31 CEST 2013
Hi Sebastian,
I am not quite sure what's wrong here. Your code seems to be fine. As an
alternative you could try to set the filter as a property of the protocol:
... proxy: new GeoExt.data.ProtocolProxy({
protocol: new OpenLayers.Protocol.WFS({
url:
"http://gateway.hamburg.de/OGCFassade/Test_HH_WFS_Fachdaten.aspx",
version: "1.1.0",
featureType: "verkehr_parkhaeuser",
featureNS: "http://www.deegree.org/app",
srsName: "EPSG:25832",
*filter:**new OpenLayers.Filter.Comparison(...)*
}) ...
maybe it is a bug in GeoExt 1.1. I had no closer look in this at the
momen. Let us know if you find a solution or a proof for a bug.
Best regards,
Chris
Am 02.04.2013 15:57, schrieb Schmitz, Sebastian:
>
> Hi list,
>
> I have got an Ext.grid.GridPanel using a Geoext.data.FeatureStore as
> its store. The store uses a GeoExt.data.ProtocolProxy to get features
> from a WFS. On that store I set the featureFilter-configOption in
> order to only display (and request) a subset of the available features
> in the grid (for instance only those within a given geometry, or with
> a specific id; for now, I am working with a simple comparison filter).
>
> However, the filter is not getting evaluated and all features are
> requested and show up in the grid. I would be very glad, if someone
> could point me to what I am missing.
>
> Here is the code for the grid panel:
>
> gridPanel = new Ext.grid.GridPanel({
>
> ref: 'featuregrid',
>
> title: 'Tabellenansicht Parkhäuser',
>
> region: 'north',
>
> height: 200,
>
> sm: new GeoExt.grid.FeatureSelectionModel(),
>
> store: new GeoExt.data.FeatureStore({
>
> fields: [
>
> {name: "name", type: "string"},
>
> {name: "art", type: "string"},
>
> {name: "frei", type: "string"},
>
> {name: "received", type: "string"}
>
> ],
>
> proxy: new GeoExt.data.ProtocolProxy({
>
> protocol: new OpenLayers.Protocol.WFS({
>
> url:
> "http://gateway.hamburg.de/OGCFassade/Test_HH_WFS_Fachdaten.aspx",
>
> version: "1.1.0",
>
> featureType: "verkehr_parkhaeuser",
>
> featureNS: "http://www.deegree.org/app",
>
> srsName: "EPSG:25832"
>
> })
>
> }),
>
> featureFilter: new OpenLayers.Filter.Comparison({
>
> type: OpenLayers.Filter.Comparison.EQUAL_TO,
>
> property: "name",
>
> value: "Alsterhaus"
>
> }),
>
> autoLoad: true
>
> }),
>
> columns: [
>
> {header: "name", dataIndex: "name"},
>
> {header: "Art", dataIndex: "art"},
>
> {header: "Freie Stellplätze", dataIndex: "frei"},
>
> {header: "Aktualität", dataIndex: "received"}
>
> ]
>
> });
>
> You can also find an online-version at
> http://geoportal-hamburg.de/verkehr2-dev/index2.html
> <http://geoportal-hamburg.de/verkehr2-dev/index2.html> (the above
> code is in app.js)
>
> Best regards and thanks already,
>
> Sebastian
>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20130402/ef6b005c/attachment-0001.htm
More information about the Users
mailing list