Skip to content

Latest commit

 

History

History
76 lines (69 loc) · 4.88 KB

File metadata and controls

76 lines (69 loc) · 4.88 KB

dn_labeling

The Labeling bundle allows the user to label features. Contents of the labels is based on the available fields of the feature layers. Additonally, the edges of the features can be measured and labeled accordingly.

Usage

  1. Add the bundle "dn_labeling" to your app.
  2. Configure the bundle if desired.

Configuration Reference

Config

Sample configuration for map Time Slider

"Config": {
    "clickTolerance": 10,
    "loadTimeTolerance": 0,
    "allowEmptyPrefix": true,
    "hoverSymbol": {
        "type": "simple-marker",
        "style": "circle",
        "color": "red",
        "size": "10px",
        "outline": {
            "width": 0
        }
    },
    "textSymbol": {
        "type": "text",
        "haloColor": "white",
        "haloSize": "2px",
        "font": {
            "size": 12
        }
    },
    "labelClass": {
        "symbol": {
            "type": "text",
            "color": "black",
            "haloColor": "white",
            "haloSize": 1,
            "font": {
                "family": "Noto Sans",
                "size": 14
            }
        },
        "labelPlacement": "above-right",
        "labelExpressionInfo": {
            "expression": "[OBJECTID]"
        },
        "maxScale": 0,
        "minScale": 25000000
    },
    "lengthUnit": "meters",
    "generalization": {
        "maxDeviationUnit": "meters",
        "maxDeviation": 0.5,
        "removeDegenerateParts": true
    }
}
Property Type Possible Values Default Description
clickTolerance Number 10 Buffer size around selection to ease selections.
loadTimeTolerance Number 0 Customized delay to allow layers to load before filtering.
allowEmptyPrefix Boolean true | false false Allows/prohibits use of empty prefix slots.
hoverSymbol SimpleMarkerSymbol Marker placed at the cursor to symbolize activity state. See SimpleMarkerSymbol
textSymbol TextSymbol Styling applied to labels. See TextSymbol
labelClass LabelClass Styling applied to the labelinginfo of a layer. See: [LengthUnit](https://developers.arcgis.com/javascript/latest/references/core/layers/support/LabelClass/
lengthUnit LengthUnit "meters" Unit to calculate in. See: LengthUnit
generalization.maxDeviationUnit LengthUnit "meters" Unit to calculate in. See: LengthUnit
generalization.maxDeviation Number 0.5 Threshold for generalization in configured unit.
generalization.removeDegenerateParts Boolean true | false true Activates or deactivates generalization.