[OpenLayers-Users] Problems displaying kmz file in OpenLayers

Alexander Petkov greenkov at gmail.com
Mon Mar 30 11:00:06 EDT 2009


2009/3/30 Asle Benoni <asle.benoni at gmail.com>:
> Thanks. I still get in FireBug:
>
> OpenLayers.Protocol.WFS is not a constructor
> init()openlayers3.html (line 83)
> onload(load )7tnQksP2...GPg%3D%3D (line 2)
> featureNS: "kulturminner_ns", })
>
> In the demo page og GeoServer I see the layer as "kulturminner_ns:gravminne"
> so am I writing this correctly?
>
>        map.addLayer(new OpenLayers.Layer.Vector("Gravminne", {
>             strategies: [new OpenLayers.Strategy.BBOX()],
>             projection: new OpenLayers.Projection("EPSG:4326"),
>             protocol: new OpenLayers.Protocol.WFS({
>             srsName: "EPSG:4326",
>             url: "http://naturkart.no:8080/geoserver/wfs&request=getmap",
>             featureType: "gravminne",
>             featureNS: "kulturminner_ns",   })
>                    }
>                ));
>
>
> 2009/3/29 Ingo Weinzierl <ingo.weinzierl at intevation.de>
>>
>> Hello Asle,
>> I don't know if this could solve your problem, but I am using a vector
>> layer as well.
>> Defining the WFS protocol looks a bit different from yours:
>>     wfs = new OpenLayers.Layer.Vector(
>>         "Name of the Layer",
>>         {
>>             strategies: [new OpenLayers.Strategy.BBOX()],
>>             projection: new OpenLayers.Projection("EPSG:4326"),
>>             protocol: new OpenLayers.Protocol.WFS({
>>                 srsName: "EPSG:4326",
>>                 url: "http://localhost:8080/geoserver/wfs",
>>                 featureType: "rohre_graben_damm",
>>                 featureNS: "http://www.openplans.org/topp",
>>             })
>>         }
>>     );
>> I hope this can help you.
>> Regards,
>> Ingo
>> Am 29.03.2009 um 03:28 schrieb Asle Benoni:
>>
>> I changed the URL but still get this response:
>>
>> OpenLayers.Protocol.WFS is not a constructor
>>
>>  map.addLayer(new OpenLayers.Layer.Vector("Gravminne", {
>>    strategies: [new OpenLayers.Strategy.BBOX()],
>>    protocol: new OpenLayers.Protocol.WFS({
>>        url: "http://naturkart.no:8080/geoserver/wfs&request=getmap",
>>        typeName: "gravminne",
>>        featurePrefix: "kulturminner_ns"
>>    })
>>    }));
>>
>> /asle
>>

Where  did you get OpenLayers.Protocol.WFS to begin with? I don't see
such a class in the OpenLayers API docs, maybe you meant
OpenLayer.Layer.WFS?

What is your ultimate goal here? To display a popup with info as you
already said, or have your requirements shifted?

Alex



More information about the Users mailing list