Hi Sebastian,

this might be a bug, indeed.

Please file an issue on github (including the version of Ext you are using). I think I'll have free time next week to finally work on GeoExt 2 again.

Best,

Marc


On 03.04.2013 09:38, Schmitz, Sebastian wrote:

Hi,

attaching the filter to the protocol works well, thanks!

Debugging GeoExt.data.FeatureStore, I find that the code to evaluate this.featureFilter in onFeaturesAdded()-method never gets executed. This seems to be a bug, what do you think?

Best,

Sebastian

*Von:*users-boun...@geoext.org [mailto:users-boun...@geoext.org] *Im Auftrag von *Christian Mayer
*Gesendet:* Dienstag, 2. April 2013 18:40
*An:* users@geoext.org
*Betreff:* Re: [Users] featureFilter in GeoExt.data.FeatureStore

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"; <http://gateway.hamburg.de/OGCFassade/Test_HH_WFS_Fachdaten.aspx>,

version: "1.1.0",

                featureType: "verkehr_parkhaeuser",

featureNS: "http://www.deegree.org/app"; <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";
    <http://gateway.hamburg.de/OGCFassade/Test_HH_WFS_Fachdaten.aspx>,

    version: "1.1.0",

                    featureType: "verkehr_parkhaeuser",

                    featureNS: "http://www.deegree.org/app";
    <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@geoext.org  <mailto:Users@geoext.org>

    http://www.geoext.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to