[OpenLayers-Users] WFS Layer / Vector Layer

Andrew Haigh haighaj+ollist at googlemail.com
Wed Mar 10 05:25:17 EST 2010


All,

I'm relatively new to OpenLayers and I have downloaded version 2.8 from the
website (Revision 9492) and I am attempting to use it with GeoServer 2.0.1.

I have successfully added an OpenLayers.Layer.WFS layer using the
following:

var wfsLayer = new OpenLayers.Layer.WFS( "WFS", "/MyApp/Proxy.ashx",
{ typeName: "mystore:boundary" },
{projection: new OpenLayers.Projection("EPSG:27700"), maxExtent: new
OpenLayers.Bounds(0, 0, 13000000, 13000000)}
);


However, I understand that OpenLayers.Layer.WFS is depreciated (from the
documentation) and that I should use a vector layer, as such I have written
the following to add as a vector layer:

var wfsLayer = new OpenLayers.Layer.Vector( "WFS", {
  strategies: [new OpenLayers.Strategy.BBOX()],
  projection: new OpenLayers.Projection("EPSG:27700"),
  maxExtent: new OpenLayers.Bounds(0, 0, 13000000, 13000000),
  protocol: new OpenLayers.Protocol.WFS(
   {
       url:  "/MyApp/Proxy.ashx",
       featureType: "mystore:boundary",
       version: "1.1.0"
   })
});

My problem is that the first method works fine but the second method doesn't
seem to do anything. I have tested using IE7 and Firefox and fiddler doesn't
report any traffic or requests to the Proxy URL.

Any ideas?

Thanks

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100310/2f852ee7/attachment.html


More information about the Users mailing list