LayerViewStatus enum
The status of a layer in the GeoViewController.
This status is used to determine whether a layer is displaying in a GeoViewController or whether it is still loading, not visible, out of scale, or has encountered an error or warning. Each layer can have multiple states at the same time. For example, a layer could be both LayerViewStatus.notVisible and LayerViewStatus.outOfScale, or it could be LayerViewStatus.notVisible and LayerViewStatus.loading. These multiple states are represented using a flag enumeration.
A status of LayerViewStatus.active indicates that the layer is being displayed in the view. Note, that some of the layer view states are not possible together. For example, a layer cannot be both LayerViewStatus.active and LayerViewStatus.notVisible at the same time.
If you implement a layer list in a table of contents (TOCs), you can use the
layer view status to manage the TOC user interface. For example, you could
gray out the layer if it is LayerViewStatus.outOfScale, or you could show
a spinning icon if the layer is LayerViewStatus.loading. If the layer list
contains a GroupLayer
that is LayerViewStatus.notVisible then its child
layers will be LayerViewStatus.notVisible. If, the GroupLayer
is visible
then each child layer can be either visible or LayerViewStatus.notVisible.
If the layer completely fails to load or render you will encounter a LayerViewStatus.error. If the layer fails to render some of its content then you will encounter a LayerViewStatus.warning. This could be due to the temporary loss of a network connection, failing layer requests or exceeding the max feature count. In both cases you will find more details about the problem in the LayerViewState.error.
Constructors
- LayerViewStatus()
-
const
Values
- active → const LayerViewStatus
-
= 1, The layer in the view is active.
A status of LayerViewStatus.active indicates that the layer is being displayed in the view.
- notVisible → const LayerViewStatus
-
= 2, The layer in the view is not visible.
- outOfScale → const LayerViewStatus
-
= 4, The layer in the view is out of scale.
A status of LayerViewStatus.outOfScale indicates that the view is zoomed outside of the scale range of the layer. If the view is zoomed too far in (e.g. to a street level) it is beyond the max scale defined for the layer. If the view has zoomed to far out (e.g. to global scale) it is beyond the min scale defined for the layer.
- loading → const LayerViewStatus
-
= 8, The layer in the view is loading.
Once loading has completed, the layer will be available for display in the view. If there was a problem loading the layer, the status will be set to LayerViewStatus.error and the LayerViewState.error property will provide details on the specific problem.
- error → const LayerViewStatus
-
= 16, The layer in the view has an unrecoverable error.
When the status is LayerViewStatus.error, the layer cannot be rendered in the view. For example, it may have failed to load, be an unsupported layer type or contain invalid data.
The LayerViewState.error property will provide more details about the specific problem which was encountered. Depending on the type of problem, you could:
- Call Layer.retryLoad
- Remove the layer from the ArcGISMap or
ArcGISScene
- Inspect the data
- warning → const LayerViewStatus
-
= 32, The layer in the view has encountered an error which may be temporary.
When the status is LayerViewStatus.warning, the layer may still be displayed in the view. It is possible for the status to be both LayerViewStatus.active and LayerViewStatus.warning.
A warning status indicates that the layer has encountered a problem but may still be usable. For example, some tiles or features may be failing to load due to network failure or server error.
You should be aware that when a LayerViewStatus.warning is received, the layer may not be showing all data or it may be showing data which is not up-to-date.
The LayerViewState.error property will provide more details about the specific problem which was encountered. Depending on the type of problem, you could:
- Check your network connection
- Check whether an online service is experiencing problems
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
LayerViewStatus> - A constant List of the values in this enum, in order of their declaration.