[OpenLayers-Users] wfs response.features empty
Sarah Schuessler
sarah_flip at yahoo.de
Tue Mar 23 04:53:25 EDT 2010
Hi Bart,
thanks a lot! That solved my problem!
I had a uri for featureNS at the beginning and it did not work-so something else was even not correct then.
Cheers
Sarah
________________________________
Hi,
featureNS is a URI, not the prefix like you have defined.
Check examples/wfs-protocol.html.
Best regards,
Bart
> Hi list,
>
> I want to load a wfs layer in my map.
> var wfs = new OpenLayers.Layer.Vector("wfs",
> {styleMap: styleMap,
> strategies: [new OpenLayers.Strategy.Fixed()],
> protocol: new OpenLayers.Protocol.WFS({
> url: "http://myserver:81/geoserver/wfs?",
> featureNS: "gn",
> featureType: "mylayer",
> geometryName: "SHAPE",
> version: "1.1.0",
> srsName: "EPSG:4326"
> }),
> projection: new OpenLayers.Projection("EPSG:4326") //like my map
> });
>
> But I can see a response at firebug but response.features is empty:
> wfs.protocol.read({
> callback: function(response){
> if(response.success(){
> var features = response.features; //is empty
> } else {
> alert("failure!)
> }
> }
> });
> My code is at geoservers www folder (geoserver is at Tomcat 6 on win).
> FeatureInfo works fine.
> Is this a matter of proxyhost?
>
> Thanks.
> best regards
> Sarah
>
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
> gegen Massenmails.
> http://mail.yahoo.com _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100323/65d0163d/attachment.html
More information about the Users
mailing list