[OpenLayers-Users] WFS request, OpenLayers version in examples

Balázs Bámer bamerbalazs at gmail.com
Tue Mar 30 10:19:47 EDT 2010


Hi All,

I try to run some examples under OpenLayers 2.8 but they result in
error messages. Here is the GetFeature example adopted to my data (now
without hover function, so click a polygon)
http://att-it.homelinux.net:22880/felveteli/getfeature.html
copied from here:
http://dev.openlayers.org/releases/OpenLayers-2.8/examples/getfeature-wfs.html
where, of course, it runs perfectly, but as far as I understand, not
on version 2.8.

My aim is to write a small example to select features by attributes,
where symptoms are identical to my first example:

        var filter=new OpenLayers.Filter.Comparison({
            type: OpenLayers.Filter.Comparison.LIKE,
            property: 'KTENE',
            value: street
        });
        var format = new OpenLayers.Format.WFST.v1({
            featureNS: 'http://172.20.2.59/dpk_se',
            featurePrefix: 'dpk_',
            namespaces: {
                "wfs": "http://www.opengis.net/wfs",
                "ogc": "http://www.opengis.net/ogc"
            }
        });
        var wfs=new OpenLayers.Protocol.WFS.v1_0_0({
            url: 'http://att-it.homelinux.net:22880/geoserver/wfs',
            params: {
                filter: filter,
                maxFeatures: 200,
                srsName: this.SRS,
                typeName: 'dpk_se:Telek'
            },
            format: format,
            typename: 'Telek'
        });
        wfs.read({
            callback: function(result) {
                var gml = result.features;
                this.selectionLayer.destroyFeatures();
                if (gml!==null && gml.total() > 0) {
                    this.selectionLayer.addFeatures(gml);
                }
                else {
                    Ext.Msg.Alert('Nem tudtam beolvasni az utca alakját.');
                }
            }
        });

what is wrong?

Thank you in advance, best regards: Balázs Bámer



More information about the Users mailing list