DimensionLayer Class

  • DimensionLayer
  • class Esri::ArcGISRuntime::DimensionLayer

    A layer that can visualize dimension features data. More...

    Header: #include <DimensionLayer.h>
    Since: Esri::ArcGISRuntime 100.13
    Inherits: Esri::ArcGISRuntime::Layer and Esri::ArcGISRuntime::RemoteResource

    Public Functions

    DimensionLayer(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, QObject *parent = nullptr)
    DimensionLayer(Esri::ArcGISRuntime::Item *item, qint64 serviceLayerId, QObject *parent = nullptr)
    DimensionLayer(const QUrl &url, QObject *parent = nullptr)
    virtual ~DimensionLayer() override
    Esri::ArcGISRuntime::LabelBarrierWeight barrierWeight() const
    void clearSelection()
    QString definitionExpression() const
    Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable() const
    double referenceScale() const
    void resetFeaturesVisible()
    void selectFeature(Esri::ArcGISRuntime::Feature *feature)
    void selectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)
    QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> selectFeaturesAsync(const Esri::ArcGISRuntime::QueryParameters &parameters, Esri::ArcGISRuntime::SelectionMode mode, QObject *parent = nullptr)
    QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> selectedFeaturesAsync(QObject *parent = nullptr)
    qint64 serviceLayerId() const
    void setBarrierWeight(Esri::ArcGISRuntime::LabelBarrierWeight barrierWeight)
    void setDefinitionExpression(const QString &definitionExpression)
    void setFeatureVisible(Esri::ArcGISRuntime::Feature *feature, bool visible)
    void setFeaturesVisible(const QList<Esri::ArcGISRuntime::Feature *> &features, bool visible)
    void unselectFeature(Esri::ArcGISRuntime::Feature *feature)
    void unselectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::Credential *credential() const override
    virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    virtual QUrl url() const override

    Detailed Description

    Dimension features are a special kind of annotation feature for showing specific lengths or distances on a map. A dimension may indicate the length of a side of a building or land parcel, or the distance between two features, such as a fire hydrant and the corner of a building. They are described in detail in "Dimension".

    Each Dimension feature has specific text and specific locations for its schematic lines and arrows.

    Dimension features are not linked to other point, line, or polygon features, even if the dimension measurement was created to refer to one or more features.

    You can construct a dimension layer using a feature table containing dimension features: - An online ServiceFeatureTable that has a feature layer service type of ArcGISFeatureLayerInfoServiceType::DimensionLayer - An offline GeodatabaseFeatureTable returned by the Geodatabase::geodatabaseDimensionTables collection when a GenerateGeodatabaseJob has completed

    Dimension layers can be taken offline from a feature service hosted on ArcGIS Enterprise 10.9 or later, using the GeodatabaseSyncTask. Dimension layers are also supported in mobile map packages or mobile geodatabases created in ArcGIS Pro 2.9 or later.

    Dimension respects the reference scale defined by the map, so dimension will always be presented to the user at the correct size and position, as defined by the dimension author.

    You cannot add, change, or delete a dimension feature. Any attempt produces a "Geodatabase table not editable" (3016) error.

    The DimensionLayer::featureTable associated with this DimensionLayer contains a set of attributes (fields, in other words) that define dimensions (see Dimensions in ArcGIS Pro. These attributes are automatically added by ArcGIS Pro. See Management of dimension feature class properties.

    The author of the dimension layer may have also added additional fields. You can query and use any of these attributes in a definition expression but you cannot change their value.

    You do not have access to, and cannot change, the renderer or the styles used for rendering dimensions.

    Member Function Documentation

    [explicit] DimensionLayer::DimensionLayer(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, QObject *parent = nullptr)

    Creates a dimension layer from a feature table containing dimension features.

    • featureTable - The feature table containing dimension features and used as the source of the dimension layer.
    • parent - The optional parent QObject.

    If the feature table does not contain dimension data, then the DimensionLayer will fail to load. ArcGISFeatureTable::layerInfo and ArcGISFeatureLayerInfo::serviceType can be checked, to verify the feature type, before attempting to create a Layer.

    DimensionLayer::DimensionLayer(Esri::ArcGISRuntime::Item *item, qint64 serviceLayerId, QObject *parent = nullptr)

    Creates a new dimension layer object from a feature service portal item.

    • item - A feature service PortalItem.
    • serviceLayerId - The layer ID for which to create the layer.
    • parent - The optional parent QObject.

    See also Layer::item.

    [explicit] DimensionLayer::DimensionLayer(const QUrl &url, QObject *parent = nullptr)

    Creates a new dimension layer from a feature service URL.

    • url - The URL to the feature service layer.
    • parent - The optional parent QObject.

    If the specified URL is not a valid Feature Service endpoint, then it will fail to load.

    [override virtual] DimensionLayer::~DimensionLayer()

    Destructor.

    [since Esri::ArcGISRuntime 100.14] Esri::ArcGISRuntime::LabelBarrierWeight DimensionLayer::barrierWeight() const

    Returns the weight of dimension features when considered as barriers to labeling. The default is LabelBarrierWeight::High.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    See also setBarrierWeight().

    void DimensionLayer::clearSelection()

    Resets any selected features in the layer to the un-selected state.

    [override virtual] Esri::ArcGISRuntime::Credential *DimensionLayer::credential() const

    Reimplements: RemoteResource::credential() const.

    Returns the security credentials to access the remote resource. Only applicable if the resource is secured.

    QString DimensionLayer::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). The default value is an empty string, which will allow all dimension features in the data source to be used by the DimensionLayer.

    See also setDefinitionExpression().

    Esri::ArcGISRuntime::ArcGISFeatureTable *DimensionLayer::featureTable() const

    Returns the feature table associated with this layer.

    double DimensionLayer::referenceScale() const

    Returns the reference scale for the layer.

    The reference scale of the layer is the scale at which a client should view the layer for the schematic lines and text to appear at its authored size.

    If the client changes the viewing scale, then schematic lines and text will grow or shrink to keep a consistent size on the map (not the screen).

    For a valid layer, the reference scale will always be a finite value, greater than zero. Until the layer is loaded, the reference scale will be zero.

    [override virtual, since Esri::ArcGISRuntime 100.13] Esri::ArcGISRuntime::RequestConfiguration DimensionLayer::requestConfiguration() const

    Reimplements: RemoteResource::requestConfiguration() const.

    Returns the RequestConfiguration in use by this dimension layer.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also setRequestConfiguration().

    void DimensionLayer::resetFeaturesVisible()

    Resets the visibility of the layer's features to the original visibility when loaded from the data source.

    void DimensionLayer::selectFeature(Esri::ArcGISRuntime::Feature *feature)

    Selects the given feature and adds it to the current list of selected features.

    • feature - The feature.

    void DimensionLayer::selectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)

    Selects the features in the list and adds them to the current list of selected features.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> DimensionLayer::selectFeaturesAsync(const Esri::ArcGISRuntime::QueryParameters &parameters, Esri::ArcGISRuntime::SelectionMode mode, QObject *parent = nullptr)

    Selects the features that match the criteria in the QueryParameters object and adds them to the current list of selected features.

    • parameters - The definition of the query to submit to the feature table.
    • mode - Defines how the list of currently selected features will be updated with the features returned from the query.
    • parent - The optional parent QObject

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    [since Esri::ArcGISRuntime 200.2] QFuture<Esri::ArcGISRuntime::FeatureQueryResult *> DimensionLayer::selectedFeaturesAsync(QObject *parent = nullptr)

    Returns a list of the currently selected features.

    • parent - The optional parent QObject

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    qint64 DimensionLayer::serviceLayerId() const

    Returns the layer ID that defines the layer within the feature service portal item.

    See also Layer::item and serviceLayerId.

    [since Esri::ArcGISRuntime 100.14] void DimensionLayer::setBarrierWeight(Esri::ArcGISRuntime::LabelBarrierWeight barrierWeight)

    Sets the barrierWeight to barrierWeight.

    This function was introduced in Esri::ArcGISRuntime 100.14.

    See also barrierWeight.

    void DimensionLayer::setDefinitionExpression(const QString &definitionExpression)

    Sets the definitionExpression to definitionExpression.

    See also definitionExpression.

    void DimensionLayer::setFeatureVisible(Esri::ArcGISRuntime::Feature *feature, bool visible)

    Sets the visibility of the given feature.

    • feature - The feature.
    • visible - true to show, false to hide.

    void DimensionLayer::setFeaturesVisible(const QList<Esri::ArcGISRuntime::Feature *> &features, bool visible)

    Sets the visibility of the given features.

    • features - A QList of Feature. Contents of the QList are copied.
    • visible - true to show, false to hide.

    [override virtual, since Esri::ArcGISRuntime 100.13] void DimensionLayer::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

    Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

    Sets configuration parameters used for network requests sent by this dimension layer to requestConfiguration.

    This function was introduced in Esri::ArcGISRuntime 100.13.

    See also requestConfiguration().

    void DimensionLayer::unselectFeature(Esri::ArcGISRuntime::Feature *feature)

    Unselects the given feature and removes it from the current list of selected features.

    • feature - The feature.

    void DimensionLayer::unselectFeatures(const QList<Esri::ArcGISRuntime::Feature *> &features)

    Unselects the features in the given list and removes them from the current list of selected features.

    [override virtual] QUrl DimensionLayer::url() const

    Reimplements: RemoteResource::url() const.

    Returns the URL of a feature service to define the layer.

    See also url.

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