From: Edwin C. <com...@gm...> - 2010-03-15 12:47:49
|
Hi Poul, Thanks! I had come to the point where I could see the WFS request being made, but got an error message from geoserver that I needed to look into to get the BasicWFS working. I will look at your changes and addn additional setters to WFSProtocol. Greetings, Edwin On 15 March 2010 13:03, paweluz <pa...@tl...> wrote: > Hi Edwin! > > I have seen your newest changes on GWT in > > http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/rev/17787e046d5e > > I have to say it does not work form me. I have to add some additional information to finally see the vector layer on the map... > > My Vector Layer definition looks like this: > > private void createVectorLayer(){ > WFSProtocolOptions wfsProtocolOptions = new WFSProtocolOptions(); > wfsProtocolOptions.setUrl("http://localhost:8080/geoserver/wfs"); > wfsProtocolOptions.setFeatureType("tasmania_roads"); > wfsProtocolOptions.setFeatureNameSpace("http://www.openplans.org/topp"); > > wfsProtocolOptions.getJSObject().setProperty("srsName", "EPSG:4326"); > wfsProtocolOptions.getJSObject().setProperty("version", "1.1.0"); > wfsProtocolOptions.getJSObject().setProperty("geometryName", "the_geom"); > wfsProtocolOptions.getJSObject().setProperty("schema", "http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=topp:tasmania_roads"); > > WFSProtocol wfsProtocol = new WFSProtocol(wfsProtocolOptions); > String url = wfsProtocol.getUrl(); > url.length(); > VectorOptions vectorOptions = new VectorOptions(); > vectorOptions.getJSObject().setProperty("protocol", wfsProtocol.getJSObject()); > vectorOptions.setProtocol(wfsProtocol); > vectorOptions.setStrategies(new Strategy[]{new BBoxStrategy()}); > vectorLayer = new Vector("My Vector Layer", vectorOptions); > }} > > I do not know if you can see your Vector layer. If not try my approach... Hope I helped... > > Cheers and thanks for developing GWT-OL :) > Poul, > > |