LayerViewState Class

  • LayerViewState
  • class Esri::ArcGISRuntime::LayerViewState

    The state of a layer in a GeoView. More...

    Header: #include <LayerViewState.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    LayerViewState()
    LayerViewState(const Esri::ArcGISRuntime::LayerViewState &other)
    LayerViewState(Esri::ArcGISRuntime::LayerViewState &&other)
    ~LayerViewState()
    Esri::ArcGISRuntime::Error error() const
    Esri::ArcGISRuntime::LayerViewStatusFlags statusFlags() const
    Esri::ArcGISRuntime::LayerViewState &operator=(const Esri::ArcGISRuntime::LayerViewState &other)
    Esri::ArcGISRuntime::LayerViewState &operator=(Esri::ArcGISRuntime::LayerViewState &&other)

    Detailed Description

    This object allows you to know the current state of a layer in a view.

    Relevant samples:

    Member Function Documentation

    LayerViewState::LayerViewState()

    The default constructor.

    LayerViewState::LayerViewState(const Esri::ArcGISRuntime::LayerViewState &other)

    The copy constructor from other LayerViewState.

    LayerViewState::LayerViewState(Esri::ArcGISRuntime::LayerViewState &&other)

    Move operator from other LayerViewState.

    LayerViewState::~LayerViewState()

    The destructor.

    Esri::ArcGISRuntime::Error LayerViewState::error() const

    Gets the error that describes a problem encountered when displaying layers in a GeoView.

    For your application, an error may be critical for the user's interaction with the view's data content. Depending on the type of problem encountered, you could:

    • Call retryLoad()
    • Remove the layer from the Map or Scene
    • Inspect the data
    • Check your network connection
    • Check whether an online service is experiencing problems

    See also Loadable.

    [since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::LayerViewStatusFlags LayerViewState::statusFlags() const

    Returns the combination of LayerViewStatus enum to describe the current layer view state.

    A valid layer state is a bitwise OR combination of the LayerViewStatus enum values.

    if (viewState.statusFlags() & Esri::ArcGISRuntime::LayerViewStatus::Active)
      return "Active";
    else if (viewState.statusFlags() & Esri::ArcGISRuntime::LayerViewStatus::NotVisible)
      return "Not Visible";
    else if (viewState.statusFlags() & Esri::ArcGISRuntime::LayerViewStatus::OutOfScale)
      return "Out of Scale";
    else if (viewState.statusFlags() & Esri::ArcGISRuntime::LayerViewStatus::Loading)
      return "Loading";
    else if (viewState.statusFlags() & Esri::ArcGISRuntime::LayerViewStatus::Error)
      return "Error";
    else
      return "Unknown";

    Note: The return value makes use of the QFlags class. Please see the Qt documentation for more details on usage.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also LayerViewStatus.

    Esri::ArcGISRuntime::LayerViewState &LayerViewState::operator=(const Esri::ArcGISRuntime::LayerViewState &other)

    The assignment operator from other LayerViewState.

    Esri::ArcGISRuntime::LayerViewState &LayerViewState::operator=(Esri::ArcGISRuntime::LayerViewState &&other)

    The move operator from other LayerViewState.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

    You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

    Your ArcGIS portal

    Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

    Your ArcGIS Location Platform dashboard

    Manage billing, monitor service usage, and access additional resources.

    Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

    Close