[OpenLayers-Users] WFS 1.0.0 layer not displaying

Jon Britton jonbritton3 at googlemail.com
Tue Sep 27 06:03:05 EDT 2011


Hi,

I'm trying to using gwt-openlayers to display WFS layers.  It works fine
using WFS 1.1.0 using the following code:


VectorOptions vectorOptions = new VectorOptions();
final Vector mapLayer = new Vector("roads", vectorOptions);

WFSProtocolOptions wfsProtocolOptions = new WFSProtocolOptions(
"http://li199-25.members.linode.com:8080/geoserver/ows",
 "http://www.openplans.org/spearfish",
"roads");
wfsProtocolOptions.setSrsName("EPSG:4326");
wfsProtocolOptions.setVersion("1.1.0");

WFSProtocol wfsProtocol = new WFSProtocol(wfsProtocolOptions);
Callback callback = new Callback() {
 public void computeResponse(Response response) {
try {
VectorFeature[] features = response.getFeatures();
 mapLayer.addFeatures(features);
} catch (Exception ex) {
ex.printStackTrace();
 }
}
};
WFSProtocolCRUDOptions options = new WFSProtocolCRUDOptions(callback);
wfsProtocol.read(options);
getMap().addLayer(mapLayer);
getMap().zoomToExtent(new Bounds(-103.88, 44.305, -103.62, 44.566));


However, if I try and use WFS version 1.0.0 then nothing is displayed and
there are no errors.

Is there an extra step I'm missing for WFS 1.0.0 data?  I'm trying to access
data from Geoserver if that makes a difference.

Thanks!

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


More information about the Users mailing list