To visualize features on the map, a
FeatureLayer will query a subset of the features from the layers model.
This feature subset, which possibly contains all features, is the
WorkingSet of the feature layer.
It is accessible via the
Each feature layer has a single
The contents of the working set can vary over time however.
Applications can receive notification of changes to the working set via 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.
These events will be emitted regardless of the success or failure of the query.
If the query was successfully executed, a
QuerySuccess event will be emitted.
QueryError event is emitted.
A working set is mutable:
Features can be added, updated and removed from the
These changes propagate through to the underlying
The advantages of modifying the contents of a model though a layer’s working set is that the returned promises do not resolve
WorkingSet has fired the corresponding
This is useful because the
WorkingSetChanged event indicates that the entire add, remove, or update operation has been applied in the model and that the result is correctly
visualized on the layer.