|
From: Jon B. <jon...@go...> - 2011-04-20 11:12:28
|
Hi,
I'm trying to add a WFS layer to my map but it's not displaying. Here is my
code:
WFSProtocolOptions wfsProtocolOptions = new WFSProtocolOptions();
wfsProtocolOptions.setUrl(featureType.getServiceUrl());
wfsProtocolOptions.setFeatureType(featureType.getName());
WFSProtocol wfsProtocol = new WFSProtocol(wfsProtocolOptions);
VectorOptions vectorOptions = new VectorOptions();
vectorOptions.setProtocol(wfsProtocol);
vectorOptions.setStrategies(new Strategy[]{new BBoxStrategy()});
mapLayer = new Vector(featureType.getName(), vectorOptions);
SmartWPS.getSmartWPS().getMap().addLayer(mapLayer);
Where the url is "http://li199-25.members.linode.com:8080/geoserver/wfs" and
the layer name is "topp:tasmania_roads". I got this code from the showcase
so I assumed it was all I needed.
Am I missing something? BTW the WFS is public if anybody wants to try it out
:-)
Thanks,
Jon
|