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 workingSet property.

Each feature layer has a single WorkingSet instance. The contents of the working set can vary over time however. Applications can receive notification of changes to the working set via the WorkingSetChanged event.

Working set instances also emit events when queries on the underlying model are in progress. QueryStarted and 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. Otherwise a QueryError event is emitted.

A working set is mutable: Features can be added, updated and removed from the WorkingSet. These changes propagate through to the underlying FeatureModel. The advantages of modifying the contents of a model though a layer’s working set is that the returned promises do not resolve until the WorkingSet has fired the corresponding WorkingSetChanged event. 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.