You can subscribe to events to get notified about state changes to layers, elevation sources, and the view. The following events, for example, can be used to help you determine if there is a problem with your level or to make user interface updates.
ArcGIS
View State Changed Event ArcGIS
Layer View State Changed Event ArcGIS
Elevation Source View State Changed Event ArcGIS
Draw Status Changed Event
These events will return the current state of the content in the view through ArcGIS
, ArcGIS
, ArcGIS
, and Arcgis
objects. These state objects contain a combined status to indicate, for example, that a specific layer is not visible or has a warning. Additional information from some of these objects can be obtained by calling Get
when the status is an error or a warning.
To write your own script with the C++ API, use the events listed above to subscribe to changes in the view, layers, elevation sources, and drawing states.
The DisplayDrawStatus sample demonstrates how to subscribe to the ArcGISDrawStatusChangedEvent, which triggers when there are changes to the drawing state.
This sample uses the DisplayDrawStatusCreator class to show a loading spinner while layers in the map are drawing. The class can be added to your level by searching for the Actor class and dragging it to the level. The class can be found in:
Plugins/ArcGISMapsSDK/Source/ArcGISSamples/Public
ArcGIS View State Logging Component
To subscribe to events and print status messages (for example, layer view status messages) to the Output Log, attach the ArcGIS View State Logging Component that uses a sample script to ArcGIS Map using the following steps:
- Click on the ArcGIS Map Actor in the Outliner.
- In the Details panel, click the + Add button.
- Search for the ArcGIS View State Logging and select it to attach the Component.
After attaching the ArcGIS View State Logging Component to the ArcGIS Map Actor, you can disable the logging or hide warnings from the Details panel.
You can find the sample code to subscribe to other events and log a particular state to the Output Log in the ArcGISViewStateLoggingComponent.cpp file. The sample script file can be found in:
Plugins/ArcGISMapsSDK/Source/ArcGISSamples/Private
For information about where to find the Output Log in Unreal Editor, refer to Unreal Editor Interface documentation.