Display dimension features from a mobile map package.

Use case
Dimensions show specific lengths or distances on a map. A dimension may indicate the length of a land parcel, or the distance between two features, such as a fire hydrant and the corner of a building.
How to use the sample
When the sample loads, it will automatically display the map containing dimension features from the mobile map package. Control the visibility of the dimension layer and apply a definition expression to show dimensions greater than or equal to 450m in length using the toggles.
Note: The minimum scale range of the sample is set to 1:40,000 to maintain readability of the dimension features.
How it works
- Create a
MobileMapPackagespecifying the path to the .mmpk file. - Load the mobile map package (mmpk).
- After the mmpk successfully loads, get the map from the mmpk and add it to the map view.
- Loop through the map’s layers to find the
DimensionLayer. - Control the dimension layer’s visibility with the
isVisibleproperty and set a definition expression using thedefinitionExpressionproperty.
Relevant API
- DimensionLayer
- MobileMapPackage
About the data
This sample shows a subset of the network of pylons, substations, and power lines around Edinburgh, Scotland within a Edinburgh Pylon Dimensions mobile map package. The data was digitized from satellite imagery and is intended to be used for illustrative purposes only.
Additional information
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.
Tags
definition expression, dimension, distance, layer, length, mmpk, mobile map package, utility