[OpenLayers-Users] Unable to see WFS layer created by GeoServer

Boyle Robin rboyle at uk.sopragroup.com
Wed Sep 14 11:03:38 EDT 2011


Hello list!
 
I am having difficulty adding a WFS layer that was created using
GeoServer.  i am using OpenLayers.Layer.Vector with WFS protocol.  When
I add a layer to OpenLayers from the WMS equivalent, it is fine.  My
code is below.  The layer datasource is a shapefile called
datazones_2001 which resides in the RobinTest workspace.
 
==========================================================
var wfsLayer = new OpenLayers.Layer.Vector("Datazones 2001", {

                strategies: [new OpenLayers.Strategy.BBOX()],

                protocol: [new OpenLayers.Protocol.WFS({

                        url:
"http://vmfiddich:8081/geoserver/RobinTest/ows"

                        ,featureType: "RobinTest:datazones_2001"

                        , featureNS:
"http://vmfiddich:8081/geoserver/data"

                        , version: "1.0.0"

                })],

                styleMap: new OpenLayers.StyleMap({

                strokeWidth: 3

                ,strokeColor: "#333333"

                })

})

map.addLayer(wfsLayer);

 
=========================================================
 
When I preview the layer in GeoServer as GML it produces valid GML.  Any
ideas???
 
Thanks in advance,
Robin
 
Robin BOYLE
IT Consultant (GIS)
Sopra group.	
Orchard Brae House
30 Queensferry Terrace
Edinburgh EH4 3ER
Phone : (DDI) +44 (0)131 311 6604 - (Office) +44 (0)131 332 3311
Mob : 07736 664 619
rboyle at uk.sopragroup.com - www.sopragroup.co.uk
<http://www.sopragroup.co.uk/> 
P Before printing, think about the environment.	
 

IMPORTANT NOTICE: This message is intended for the addressee only. The content
may be confidential, legally privileged and protected by law. Unauthorised
use, copying or disclosure of any of it may be unlawful. If you are not the
intended recipient please notify the sender and remove it from your system.
Internet emails are not necessarily secure.  Although we have taken steps to
ensure this email and attachments are free from any virus, we advise that in
keeping with good computing practice you should ensure they are actually virus
free. The right to monitor email communications through our network is
reserved by us. 
 
Sopra Group Limited (Registered in England, No. 1588948) with Registered
Offices at: Middlesex House, Meadway Technology Park, Rutherford Close,
Stevenage, Hertfordshire, SG1 2EF.  VAT No. 366 9784 84.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110914/fb7d167b/attachment.html


More information about the Users mailing list