ArcGISSublayer Class

ArcGISMapImageSublayer, ArcGISTiledSublayer and SubtypeSublayer."> ArcGISSublayer Class | ArcGISQtCpp
  • ArcGISSublayer
  • class Esri::ArcGISRuntime::ArcGISSublayer

    A base class for ArcGIS sublayer classes such as ArcGISMapImageSublayer, ArcGISTiledSublayer and SubtypeSublayer. More...

    Public Functions

    virtual ~ArcGISSublayer() override
    Esri::ArcGISRuntime::ArcGISSublayer *clone(QObject *parent = nullptr) const
    QString definitionExpression() const
    qint64 id() const
    bool isLabelsEnabled() const
    bool isScaleSymbols() const
    Esri::ArcGISRuntime::ArcGISMapServiceSublayerInfo mapServiceSublayerInfo() const
    double maxScale() const
    double minScale() const
    float opacity() const
    Esri::ArcGISRuntime::Renderer *renderer() const
    Esri::ArcGISRuntime::ArcGISSublayerType sublayerType() const
    Esri::ArcGISRuntime::ArcGISSublayerListModel *sublayers() const
    bool operator!=(const Esri::ArcGISRuntime::ArcGISSublayer &other) const
    bool operator==(const Esri::ArcGISRuntime::ArcGISSublayer &other) const

    Reimplemented Public Functions

    virtual bool canChangeVisibility() const override
    virtual void cancelLoad() override
    virtual bool isAutoFetchLegendInfos() const override
    virtual bool isPopupEnabled() const override
    virtual bool isShowInLegend() const override
    virtual bool isVisible() const override
    virtual bool isVisibleAtScale(double scale) const override
    virtual Esri::ArcGISRuntime::LegendInfoListModel *legendInfos() const override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual QString name() const override
    virtual Esri::ArcGISRuntime::PopupDefinition *popupDefinition() const override
    virtual void retryLoad() override
    virtual void setAutoFetchLegendInfos(bool autoFetchLegendInfos) override
    virtual void setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition) override
    virtual void setPopupEnabled(bool popupEnabled) override
    virtual void setShowInLegend(bool showInLegend) override
    virtual void setVisible(bool visible) override
    virtual QList<Esri::ArcGISRuntime::LayerContent *> subLayerContents() const override

    Signals

    void doneLoading(const Esri::ArcGISRuntime::Error &loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Detailed Description

    Some layers, such as ArcGISMapImageLayer, ArcGISTiledLayer, and SubtypeFeatureLayer, represent a collection of 1 or more layers that are referred to as sublayers. You can access these sublayers from the layer using a property, such as ArcGISMapImageLayer::mapImageSublayers.

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

    Note: Some of the sublayer properties can only be accessed once the sublayer has loaded.

    See also ArcGISMapImageSublayer, ArcGISTiledSublayer, and sublayers.

    Member Function Documentation

    [override virtual] ArcGISSublayer::~ArcGISSublayer()

    Destructor.

    [override virtual] bool ArcGISSublayer::canChangeVisibility() const

    Reimplements: LayerContent::canChangeVisibility() const.

    Returns whether the sublayer's visibility can be changed.

    See LayerContent.

    [override virtual, since Esri::ArcGISRuntime 100.1] void ArcGISSublayer::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    Cancels loading metadata for the object.

    Cancels loading the metadata if the object is loading.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [since Esri::ArcGISRuntime 200.1] Esri::ArcGISRuntime::ArcGISSublayer *ArcGISSublayer::clone(QObject *parent = nullptr) const

    Clones the sublayer to a new instance with an optional parent.

    Returns a new instance of the current sublayer.

    This function was introduced in Esri::ArcGISRuntime 200.1.

    [since Esri::ArcGISRuntime 100.1] QString ArcGISSublayer::definitionExpression() const

    Returns a SQL statement where clause that stipulates a subset of features to be displayed.

    The definition expression string uses the SQL-92 where clause syntax (https://en.wikipedia.org/wiki/SQL-92). 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 entitled "Querying Feature Services Date-Time Queries" (https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-time-queries/) for more information.

    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.

    [signal, since Esri::ArcGISRuntime 100.1] void ArcGISSublayer::doneLoading(const Esri::ArcGISRuntime::Error &loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred.

    Note: If there is a load error it will also be emitted on the errorOccurred signal.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also Loadable and Object.

    qint64 ArcGISSublayer::id() const

    Returns the id that uniquely identifies this sublayer.

    Will return -1 if an error occurs.

    [override virtual] bool ArcGISSublayer::isAutoFetchLegendInfos() const

    Reimplements: LayerContent::isAutoFetchLegendInfos() const.

    Returns whether legend infos are automatically fetched by the sublayer's legend info list model.

    See LayerContent.

    [since Esri::ArcGISRuntime 100.1] bool ArcGISSublayer::isLabelsEnabled() const

    Returns true if the sublayer's labels are enabled, false otherwise.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [override virtual] bool ArcGISSublayer::isPopupEnabled() const

    Reimplements: PopupSource::isPopupEnabled() const.

    Returns a bool indicating whether the PopupDefinition defined on the PopupSource is enable / disable.

    [since Esri::ArcGISRuntime 100.1] bool ArcGISSublayer::isScaleSymbols() const

    Returns true if the sublayer renderers its symbols based on scale, false otherwise.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [override virtual] bool ArcGISSublayer::isShowInLegend() const

    Reimplements: LayerContent::isShowInLegend() const.

    Returns a bool indicating whether the layer content participates in the legend.

    See LayerContent.

    [override virtual] bool ArcGISSublayer::isVisible() const

    Reimplements: LayerContent::isVisible() const.

    Returns whether the sublayer is enabled to be visible.

    See LayerContent.

    [override virtual] bool ArcGISSublayer::isVisibleAtScale(double scale) const

    Reimplements: LayerContent::isVisibleAtScale(double scale) const.

    Returns the layer content's effective visibility at the specified scale.

    • scale - The scale the visibility has to be calculated for.

    Returns the effective layer content visibility. This effective visibility takes care of the effective visibility of the parents at the specified scale. Will return false if an error occurs.

    [override virtual] Esri::ArcGISRuntime::LegendInfoListModel *ArcGISSublayer::legendInfos() const

    Reimplements: LayerContent::legendInfos() const.

    Returns a list of legend information for the sublayer and any of its sublayers.

    See LayerContent.

    [override virtual, since Esri::ArcGISRuntime 100.1] void ArcGISSublayer::load()

    Reimplements: Loadable::load().

    Loads the metadata for the object asynchronously.

    Loads the metadata if the object is not loaded.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [override virtual, since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::Error ArcGISSublayer::loadError() const

    Reimplements: Loadable::loadError() const.

    Returns the load error.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also Error.

    [override virtual, since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::LoadStatus ArcGISSublayer::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    Returns the load status.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also LoadStatus.

    [signal, since Esri::ArcGISRuntime 100.1] void ArcGISSublayer::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the loadStatus changes for this object.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    See also Loadable.

    [since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::ArcGISMapServiceSublayerInfo ArcGISSublayer::mapServiceSublayerInfo() const

    Returns the sublayer's metadata.

    The sublayer metadata once the sublayer is loaded. Will return an empty object if an error occurs or if the sublayer is not loaded.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    double ArcGISSublayer::maxScale() const

    Returns the sublayer's maximum scale.

    The sublayer maximum scale. Will return NaN if an error occurs.

    double ArcGISSublayer::minScale() const

    Returns the sublayer's minimum scale.

    The sublayer minimum scale. Will return NaN if an error occurs.

    [override virtual] QString ArcGISSublayer::name() const

    Reimplements: LayerContent::name() const.

    Returns the layer content's name.

    See LayerContent.

    [since Esri::ArcGISRuntime 100.1] float ArcGISSublayer::opacity() const

    Returns the sublayer's opacity.

    Will return NaN if an error occurs.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [override virtual] Esri::ArcGISRuntime::PopupDefinition *ArcGISSublayer::popupDefinition() const

    Reimplements: PopupSource::popupDefinition() const.

    Returns the pop-up definition.

    The PopupDefinition associated with the popup source. A nullptr if an error occurs or if the popup source is not associated with a pop-up definition.

    See PopupSource.

    See also setPopupDefinition().

    [since Esri::ArcGISRuntime 100.1] Esri::ArcGISRuntime::Renderer *ArcGISSublayer::renderer() const

    Returns the renderer specifying how the features should be symbolized.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [override virtual, since Esri::ArcGISRuntime 100.1] void ArcGISSublayer::retryLoad()

    Reimplements: Loadable::retryLoad().

    Loads or retries loading metadata for the object asynchronously.

    Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded. Will always call the done loading if this is called.

    See Loadable.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    [override virtual] void ArcGISSublayer::setAutoFetchLegendInfos(bool autoFetchLegendInfos)

    Reimplements: LayerContent::setAutoFetchLegendInfos(bool autoFetchLegendInfos).

    Sets whether legend infos are automatically fetched by the sublayer's legend info list model to autoFetchLegendInfos.

    See LayerContent.

    See also isAutoFetchLegendInfos().

    [override virtual] void ArcGISSublayer::setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition)

    Reimplements: PopupSource::setPopupDefinition(Esri::ArcGISRuntime::PopupDefinition *popupDefinition).

    Sets the popupDefinition to popupDefinition.

    See also popupDefinition.

    [override virtual] void ArcGISSublayer::setPopupEnabled(bool popupEnabled)

    Reimplements: PopupSource::setPopupEnabled(bool popupEnabled).

    Sets the popupEnabled to popupEnabled.

    See also isPopupEnabled.

    [override virtual] void ArcGISSublayer::setShowInLegend(bool showInLegend)

    Reimplements: LayerContent::setShowInLegend(bool showInLegend).

    Sets whether the sublayer will be shown in the legend to showInLegend.

    See LayerContent.

    See also isShowInLegend.

    [override virtual] void ArcGISSublayer::setVisible(bool visible)

    Reimplements: LayerContent::setVisible(bool visible).

    Sets whether the sublayer is visible to visible.

    See also isVisible.

    [override virtual] QList<Esri::ArcGISRuntime::LayerContent *> ArcGISSublayer::subLayerContents() const

    Reimplements: LayerContent::subLayerContents() const.

    Gets a list of sublayer contents of a layer content.

    See LayerContent.

    Esri::ArcGISRuntime::ArcGISSublayerType ArcGISSublayer::sublayerType() const

    Returns the type of the sublayer, such as ArcGIS map image sublayer.

    See also ArcGISSublayerType.

    Esri::ArcGISRuntime::ArcGISSublayerListModel *ArcGISSublayer::sublayers() const

    Returns the list of sublayers of a sublayer.

    This collection is usually empty unless the parent layer is loaded. Modifying this collection has no effect unless this sublayer is associated with an ArcGIS map service that supports dynamic layers. "Supports Dynamic Layers" must be set to true in the ArcGIS MapServer REST Services Directory.

    See also ArcGISMapImageLayer::mapImageSublayers.

    [since Esri::ArcGISRuntime 200.2] bool ArcGISSublayer::operator!=(const Esri::ArcGISRuntime::ArcGISSublayer &other) const

    Inequality operator. Returns true if this object and other are not equal.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also ArcGISSublayer::operator==.

    [since Esri::ArcGISRuntime 200.1] bool ArcGISSublayer::operator==(const Esri::ArcGISRuntime::ArcGISSublayer &other) const

    Returns true if this sublayer is equal to a second other sublayer, false otherwise.

    • other - The second object.

    This function was introduced in Esri::ArcGISRuntime 200.1.

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