From: Jon B. <jon...@go...> - 2011-09-27 10:03:34
|
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 |