Visualizing WFS data on a map requires two steps:
-
Create a
FeatureModel
with aWFSFeatureStore
by connecting to a WFS service. -
Use a
FeatureLayer
to visualize the model.
WFSFeatureStore.createFromURL("http://sampleservices.luciad.com/wfs", "usrivers")
.then(function(store) {
//Create a model for the store
const model = new FeatureModel(store);
//Create a layer for the model
const layer = new FeatureLayer(model);
//Add the model to the map
map.layerTree.addChild(layer);
});