[OpenLayers-Users] WFS read problem

Balázs Bámer bamerbalazs at gmail.com
Fri Mar 26 01:13:33 EDT 2010


Hi All,

I use OpenLayers 2.8 and want to read some features using WFS and
attribute filter. The code below was taken from an application, which
works fine under OpenLayers 2.7 or earlier (I don't know exactly, it
is legacy code and modified somewhat).
During wfs.read, but before getting into callback, I get JavaScript error
this.writers[prefix] is undefined

Stack with line numbers for the non-minified standalone JS files
Format.XML.writeNode():693
Protocol.WFS.v1.read():155
highlight():131 own code below
handler()
DomHelper()

The application is here:
http://att-it.homelinux.net:22880/felveteli/

        var filter=new OpenLayers.Filter.Comparison({
            type: OpenLayers.Filter.Comparison.LIKE,
            property: 'KTENE',
            value: street
        });
        var format = new OpenLayers.Format.GML({
            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({
/*131*/  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 can be the problem?

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



More information about the Users mailing list