To visualize features on the map, a
FeatureLayer queries a subset of the features from the layers model.
This feature subset, which possibly contains all features, is the
WorkingSet of the feature layer.
You can access it through the
Each feature layer has a single
The contents of the working set can vary over time.
Applications can receive notification of changes to the working set through the
Working set instances also emit events when queries on the underlying model are in progress.
QueryFinished events signal the beginning and end of a query.
The working sets emit those events regardless of the success or failure of the query.
If the query was executed successfully, they emit a
Otherwise, they emit a
A working set is mutable: you can add, update, and remove
Features from the
These changes propagate through to the underlying
Modifying the contents of a model though the working set of a layer has a benefit: the returned promises don’t resolve until
WorkingSet fires the corresponding
This is useful because the
WorkingSetChanged event indicates that the add, remove, or update operation is completed in the model and that the result is correctly visualized
on the layer.