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

    This class was introduced in Esri::ArcGISRuntime 100.13.

    Public Functions

    DimensionLayer(const QUrl &url, QObject *parent = nullptr)
    DimensionLayer(Esri::ArcGISRuntime::Item *item, qint64 serviceLayerId, QObject *parent = nullptr)
    DimensionLayer(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, 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)
    Esri::ArcGISRuntime::TaskWatcher selectFeatures(const Esri::ArcGISRuntime::QueryParameters &parameters, Esri::ArcGISRuntime::SelectionMode mode)
    Esri::ArcGISRuntime::TaskWatcher selectedFeatures() const
    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

    Signals

    void selectFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)
    void selectedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

    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.

    Dimension features cannot be added, changed, or deleted by Runtime users. (Attempts will produce a "Geodatabase table not editable" (3016) error)

    The fields of a Dimension feature can be queried by Runtime users or used in the definition expression, but not have their values changed. The automatic fields are described in detail in "Dimension fields". Authors may have added additional fields relevant to their data description.

    The Runtime user does not have access to, and cannot change, the Renderer or the Styles used for rendering dimensions.

    See also Layer.

    Member Function Documentation

    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.

    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.

    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.

    See also ArcGISFeatureTable.

    [signal] void DimensionLayer::selectFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

    Signal emitted when the selectFeatures(QueryParameters, SelectionMode) operation completes.

    • taskId - The task ID of the asynchronous operation.
    • featureQueryResult - A feature query result containing an iterator pointing to the selected features.

    See also Returned QObjects Parenting.

    [signal] void DimensionLayer::selectedFeaturesCompleted(QUuid taskId, Esri::ArcGISRuntime::FeatureQueryResult *featureQueryResult)

    Signal emitted when the selectedFeatures operation completes.

    • taskId - The task ID of the asynchronous operation.
    • featureQueryResult - A feature query result containing an iterator pointing to the selected features.

    See also Returned QObjects Parenting.

    [override virtual] DimensionLayer::~DimensionLayer()

    Destructor.

    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 security credentials to access the remote resource. Only applicable if the resource is secured.

    QString DimensionLayer::definitionExpression() const

    Returns an expression which is a SQL statement where clause to specify the 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] 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.

    Esri::ArcGISRuntime::TaskWatcher DimensionLayer::selectFeatures(const Esri::ArcGISRuntime::QueryParameters &parameters, Esri::ArcGISRuntime::SelectionMode mode)

    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.

    This method returns a TaskWatcher for the asynchronous operation.

    Esri::ArcGISRuntime::TaskWatcher DimensionLayer::selectedFeatures() const

    Returns a list of the currently selected features.

    This method returns a TaskWatcher for the asynchronous operation.

    qint64 DimensionLayer::serviceLayerId() const

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

    See also Layer::item and serviceLayerId.

    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)

    Returns 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] 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.