[Users] Why is the change from wms into wfs not working?

Xurxo Mendez sonxurxo at gmail.com
Tue Dec 14 17:57:13 CET 2010


Hi,

It might be due to the WFS layer definition (namespaces and prefixes).
Assuming the rest of the configuration is OK, try this:

var layer_wea = new OpenLayers.Layer.Vector("WEA", {
    strategies: [new OpenLayers.Strategy.Fixed()],
    protocol: new OpenLayers.Protocol.WFS({
        url: "/geoserver/ows",
        version: "1.1.0",
        *featureType: "WEA_wgs84_",
        featurePrefix: "zgb"*,
        featureNS: "http://www.zgb.de",
        srsName: "EPSG:4326"
    })
});


Best regards,

Xurxo Méndez Pérez

http://www.sonxurxo.com


2010/12/14 Robert Buckley <robertdbuckley at yahoo.com>

> Hi,
>
> I would like to change a wms layer in my project to a wfs so that I can add
> more functionality to the layer such as tables and mouseclicks etc.
> Unfortunately when I do this the layer isn´t shown anymore. Firebut gives
> an exeption saying...
>
> "Could not locate {http://www.zgb.de}zgb:WEA_wgs84_<http://www.zgb.de%7Dzgb:WEA_wgs84_>in catalog.
> >"
>
> can anyone explain why this is?
>
>
>
> /**********************/
> /**This does not work**/
> /**********************/
>
> var layer_wea = new OpenLayers.Layer.Vector("WEA", {
>     strategies: [new OpenLayers.Strategy.Fixed()],
>     protocol: new OpenLayers.Protocol.WFS({
>         url: "/geoserver/ows",
>         version: "1.1.0",
>         featureType: "zgb:WEA_wgs84_",
>         featureNS: "http://www.zgb.de",
>         srsName: "EPSG:4326"
>     })
> });
>
>
> /*****************/
> /**This works ok**/
> /*****************/
>
> var layer_wea = new OpenLayers.Layer.WMS(
>                 "Windenergieanlage",
>                 "/geoserver/ows",
>                 {
>                    layers: 'zgb:WEA_wgs84_',
>            group: "Wind",
>                    styles: '',
>                    srs: 'EPSG:4326',
>                    format: 'image/png',
>                    tiled: 'no',
>                    tilesOrigin : "143.60260815000004,-43.851764249999995",
>                    transparent: true
>                 },
>                 {
>                     'opacity': 1, 'isBaseLayer': false, visibility:false
>                 }
>             );
>
>
>
>
>
> yours,
>
> Robert Buckley
>
>
> _______________________________________________
> 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/20101214/9faa10aa/attachment-0001.htm 


More information about the Users mailing list