Openlayers wfs vector layer

المشرف العام

Administrator
طاقم الإدارة
I'm trying to add a vector layer with a wfs layer and it's not working.Can anyone point a solution?

Openlayers code:

var wfs = new OpenLayers.Layer.Vector( "Stavros Features", { strategies: [new OpenLayers.Strategy.BBOX()] ,projection: new OpenLayers.Projection("EPSG:4326") ,protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0" ,srsName: "EPSG:4326" ,url: "http://localhost:8080/geoserver/wfs" ,featureNS : "http://postgis.org" ,featureType: "polygon" ,geometryName: "the_geom" }) }); In the geoserver i have a workspace 'myWorkspace', a store 'myStore' and a layer 'myLayer' and wfs is enabled. Also in the 'publishing' tab of my layer in the 'WMS Settings Default Style' i have selected 'polygon' as myLayer is multipolygon.

What am i doing wrong?
Am i suppose to specify the workspace name in the 'featureNS' property?

Is there a good tutorial for open layers?
I have read the docs which are very poor and the examples doesn't help me always. I have also read the user manual of geoserver and i found it very good.

Thanks.



أكثر...
 
أعلى