ArcGISMapImageSublayer Class

  • ArcGISMapImageSublayer
  • class Esri::ArcGISRuntime::ArcGISMapImageSublayer

    A sublayer of an ArcGIS map image layer. More...

    Header: #include <ArcGISMapImageSublayer.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::ArcGISSublayer

    Public Functions

    ArcGISMapImageSublayer(qint64 id, QObject *parent = nullptr)
    ArcGISMapImageSublayer(qint64 id, Esri::ArcGISRuntime::SublayerSource *sublayerSource, QObject *parent = nullptr)
    virtual ~ArcGISMapImageSublayer() override
    bool isDefaultVisible() const
    Esri::ArcGISRuntime::LabelDefinitionListModel *labelDefinitions() const
    void setDefinitionExpression(const QString &definitionExpression)
    void setLabelsEnabled(bool labelsEnabled)
    void setMaxScale(double maxScale)
    void setMinScale(double minScale)
    void setName(const QString &name)
    void setOpacity(float opacity)
    void setRenderer(Esri::ArcGISRuntime::Renderer *renderer)
    void setScaleSymbols(bool scaleSymbols)
    Esri::ArcGISRuntime::SublayerSource *source() const
    Esri::ArcGISRuntime::ServiceFeatureTable *table() const

    Detailed Description

    ArcGISMapImageSublayer provides access to layers that comprise an ArcGISMapImageLayer. Once the ArcGISMapImageLayer has loaded, you can obtain its map image from the ArcGISMapImageLayer::mapImageSublayers collection. If one of the sublayers is a group layer (where the ArcGISMapImageLayer::mapImageSublayers collection. You can obtain the ArcGIS map service information for each of these sublayers from the ArcGISSublayer::mapServiceSublayerInfo.

    If one of the sublayers is a group layer (where the ArcGISMapServiceSublayerInfo::sublayerType is ArcGISMapServiceSublayerType::GroupLayer), it will also have a collection of sublayers. Use ArcGISSublayer::sublayers to obtain the collection of sublayers. If one of these sublayers is a group layer it will also contain a collection of sublayers, and so on.

    If you know the sublayer Id, you can create it from the ArcGISMapImageSublayer(qint64, QObject*) constructor.

    Once you have obtained the sublayer, you can change the data that is displayed by the ArcGISMapImageLayer by setting the sublayer's visibility, layer definition expression, and other visual properties such as renderer and scale.

    See also ArcGISSublayer, ArcGISMapImageLayer::mapImageSublayers, ArcGISSublayer::sublayers, and ArcGISMapImageSublayer(qint64, QObject*).

    Member Function Documentation

    [explicit] ArcGISMapImageSublayer::ArcGISMapImageSublayer(qint64 id, QObject *parent = nullptr)

    Constructor that accepts a sublayer ID.

    • id - The sublayer ID.
    • parent - The optional parent object. Defaults to nullptr.

    See also ArcGISMapImageSublayer.

    ArcGISMapImageSublayer::ArcGISMapImageSublayer(qint64 id, Esri::ArcGISRuntime::SublayerSource *sublayerSource, QObject *parent = nullptr)

    Constructor that accepts a sublayer ID and a sublayer source.

    • id - The sublayer ID.
    • sublayerSource - The sublayer source. (Can be set only when instantiating.)
    • parent - The optional parent object. Defaults to nullptr.

    Only map services that support dynamic layers will be able to manage sublayers with sublayer sources. The ArcGIS MapServer must have `Supports Dynamic Layers` equal to true in the ArcGIS REST Services Directory. For sublayer sources other than rasters, you must set a renderer.

    See also ArcGISMapImageSublayer.

    [override virtual] ArcGISMapImageSublayer::~ArcGISMapImageSublayer()

    Destructor.

    bool ArcGISMapImageSublayer::isDefaultVisible() const

    Returns the sublayer's default visibility.

    [since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::LabelDefinitionListModel *ArcGISMapImageSublayer::labelDefinitions() const

    Returns the list model of label definitions for this sublayer.

    This is only available if the ArcGISMapImageLayer supports dynamic capabilities.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void ArcGISMapImageSublayer::setDefinitionExpression(const QString &definitionExpression)

    Sets the sublayer's definition expression to definitionExpression.

    The definition expression is an SQL statement where clause to filter out the features to be displayed. It uses the SQL-92 where clause syntax (https://en.wikipedia.org/wiki/SQL-92). You must escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. For more information, see the ArcGIS Blog article Querying Feature Services Date-Time Queries.

    The definition expression string uses the SQL-92 WHERE clause syntax. Be sure to escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. See the ArcGIS Blog article Querying Feature Services Date-Time Queries for more information.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void ArcGISMapImageSublayer::setLabelsEnabled(bool labelsEnabled)

    Sets whether the sublayer's labels are displayed to labelsEnabled.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void ArcGISMapImageSublayer::setMaxScale(double maxScale)

    Sets the maximum scale at which the sublayer is visible to maxScale.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void ArcGISMapImageSublayer::setMinScale(double minScale)

    Sets the minimum scale at which the sublayer is visible to minScale.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    void ArcGISMapImageSublayer::setName(const QString &name)

    Sets the name of the sublayer to name.

    This can be an empty string.

    [since Esri::ArcGISRuntime 100.1] void ArcGISMapImageSublayer::setOpacity(float opacity)

    Sets the sublayer's opacity to opacity.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void ArcGISMapImageSublayer::setRenderer(Esri::ArcGISRuntime::Renderer *renderer)

    Sets the renderer that specifies how the features should be symbolized to renderer.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 100.1] void ArcGISMapImageSublayer::setScaleSymbols(bool scaleSymbols)

    Sets whether the sublayer renders its symbols based on scale to scaleSymbols.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    Esri::ArcGISRuntime::SublayerSource *ArcGISMapImageSublayer::source() const

    Returns the sublayer source.

    [since Esri::ArcGISRuntime 100.3] Esri::ArcGISRuntime::ServiceFeatureTable *ArcGISMapImageSublayer::table() const

    Returns the sublayer's feature table.

    This only applies to sublayers of type "Feature layer" or "Table". This method returns nullptr if the sublayer has not been loaded.

    This function was introduced in Esri::ArcGISRuntime 100.3.

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