The labelingInfo object specifies the label definition for a layer.
Referenced by: drawingInfo, Feature Reduction Binning Drawing Info, Feature Reduction Cluster Drawing Info
Properties Property Details allowOverlapOfFeatureBoundary A string describing whether other labels are allowed to overlap this polygon feature's edge.allow
means that labels are allowed to overlap this polygon feature boundary. avoid
means that labels that would overlap will move as much possible to minimize the overlap. exclude
means that labels that would overlap are not placed.
allow
avoid
exclude
allow
means that labels are allowed to overlap this feature. avoid
means that labels that would overlap will move as much possible to minimize the overlap. exclude
means that labels that would overlap are not placed.
allow
avoid
exclude
allow
means that labels are allowed to overlap this label. avoid
means that labels that would overlap will move as much possible to minimize the overlap. exclude
means that labels that would overlap are not placed.
allow
avoid
exclude
false
for line feature geometries, and true
for polygon feature geometries. deconflictionStrategy Specifies the approach to use for deconflicting labels with this class against existing, more important, labels. The option 'none' uses the preferred position and can overlap existing labels and features. The option 'static' uses the preferred position but will not overlap existing labels or features. The option 'dynamic' will try to find a position to avoid overlap of labels and features. The option 'dynamicNeverRemove' will choose the position that minimizes overlap of labels and features but can overlap them if necessary.
dynamic
dynamicNeverRemove
none
static
labelPlacement
will still be used to indicate whether offset or centered positioning is required, but the exact position will be given by the angle calculated for the feature. Once the position has been determined, textLayout
and textOrientation
are used to specify the layout of the text at that position. labelExpression Read-only property specifying text for labels using simple expressions. Prefer to use labelExpressionInfo
instead. This labelExpression
property is only used if labelExpressionInfo
is missing. An empty expression will result in no labels being created. labelExpressionInfo Expression script object specifying the text that should be used as a label for each feature. This expression may combine information from the feature attributes with fixed strings. An empty expression will result in no labels being created. If this object isn't present then the labelExpression
property will be used as a fallback. labelPlacement Preferred position of the label with respect to its feature symbology. If missing, then the default depends on the geometry of the feature: esriServerPointLabelPlacementAboveRight
for point feature geometries, esriServerLinePlacementAboveAlong
for line feature geometries, and esriServerPolygonPlacementAlwaysHorizontal
for polygon feature geometries.
esriServerLinePlacementAboveAfter
, esriServerLinePlacementAboveAlong
, esriServerLinePlacementAboveBefore
, esriServerLinePlacementAboveEnd
, esriServerLinePlacementAboveStart
, esriServerLinePlacementBelowAfter
, esriServerLinePlacementBelowAlong
, esriServerLinePlacementBelowBefore
, esriServerLinePlacementBelowEnd
, esriServerLinePlacementBelowStart
, esriServerLinePlacementCenterAfter
, esriServerLinePlacementCenterAlong
, esriServerLinePlacementCenterBefore
, esriServerLinePlacementCenterEnd
, esriServerLinePlacementCenterStart
, esriServerPointLabelPlacementAboveCenter
, esriServerPointLabelPlacementAboveLeft
, esriServerPointLabelPlacementAboveRight
, esriServerPointLabelPlacementBelowCenter
, esriServerPointLabelPlacementBelowLeft
, esriServerPointLabelPlacementBelowRight
, esriServerPointLabelPlacementCenterCenter
, esriServerPointLabelPlacementCenterLeft
, esriServerPointLabelPlacementCenterRight
, esriServerPolygonPlacementAlwaysHorizontal
lineConnection Specifies the approach to use for connecting line labels with this class. The option 'none' specifies that line connection should not be performed. The option 'minimizeLabels' connects lines through intersections while 'unambiguousLabels' allows for labels on sides of intersections to clarify ambiguity with label and feature relationships.
minimizeLabels
none
unambiguousLabels
labelPlacement
of Above
(or Below
) will be interpreted as Above
(or Below
) on the page
, or with respect to the direction of line's geometry (that is, the digitization order in which the vertices are listed). If the lineOrientation
is set to page
, then labelPlacement
of Above
means the label will be offset perpendicularly from its line segment towards the top of the page. If the lineOrientation
is set to direction
, then labelPlacement
of Above
means the label will be offset perpendicularly left from its line segment. If the lineOrientation
is set to unconstrained
, then the label will be offset perpendicularly to whichever side of the line geometry has space (defaulting to Above
, in the page
sense). labelPlacement
of Below
would have the corresponding interpretations.
direction
page
unconstrained
labelLargest
labelPerFeature
labelPerPart
labelPerSegment
12
for point feature geometries, 15
for line feature geometries, and 18
for polygon feature geometries. removeDuplicates Specifies whether or not to remove duplicates and if removing duplicate labels whether or not to do it within just this label class, within all labels of that feature type (e.g. point layers) or across all layers. The removeDuplicatesDistance is used when a value other than none is set.
all
featureType
labelClass
none
dynamic
textSymbol
before
or after
the breaking word that overruns the maximum number of characters per row. Using the before
option means rows will generally be shorter than the stackRowLength although will overrun for individual words larger than this count.
after
before
true
for point and polygon feature geometries, and false
for line feature geometries. stackRowLength The ideal number of characters to place on a row of stacked text. This length guides the decision on when to break long text strings into separate rows. The linebreak will be inserted between words, not in the middle of a word, so rows may be longer or shorter than the ideal. Depending on stackBreakPosition
, the break may be inserted before the breaking word, or after. stackRowLength
values of one or higher will cause linebreaks to be added when a row will exceed this length. Values of zero will cause linebreaks to be added whenever possible i.e. after every word. Values less than zero will cause a default length to be used (currently 9 characters, but may vary by feature geometry type). stackSeparators[] Array of which characters in a text label can indicate a line-break. By default, space and comma indicate optional linebreaks, and newline indicates a forced linebreak. If an empty array of stackSeparators is specified, then these default optional indicators are turned off. If any separator list, other than the two default optional separators, is specified then that list replaces the default list. If the user requires a mixture of default separators and custom separators, then they need to specify all of them. symbol The text symbol used to label. textLayout String describing, once the text is positioned, how the text should be oriented based on the feature geometry. If this property is present, it must be one of the following values:
followFeature
horizontal
perpendicular
straight
followFeature
will make the text curve to follow a line feature (e.g. road or river). A value of horizontal
will make the text be written horizontally with respect to the page. A value of straight
will make the text straight and angled depending on the feature geometry: (point) rotated by the specified angle, (line) placed at an angle that follows the line, (polygon) angled to represent the shape of the polygon. A value of perpendicular
will make the text rotated 90 degrees clockwise from the angle it would have used for straight
.
horizontal
for labels attached to point and polygon features, and followFeature
for labels attached to line features.
followFeature
horizontal
perpendicular
straight
direction
page
labelExpression
or labelExpressionInfo.value
. Note that if an Arcade labelExpresionInfo.expression
is being used, then useCodedValues
is ignored, as Arcade scripts explicitly specify when to decode and encode values. where SQL string template used to determine which features to label. Example
{
"labelExpression": "[ACRES]",
"labelExpressionInfo": {
"value": "{ACRES}"
},
"fieldInfos": [
{
"fieldName": "ACRES",
"format": {
"places": 2,
"digitSeparator": true
}
}
],
"useCodedValues": false,
"maxScale": 0,
"minScale": 0,
"labelPlacement": "esriServerPointLabelPlacementAboveLeft",
"symbol": {
"color": [
51,
51,
51,
255
],
"type": "esriTS",
"haloSize": 0,
"horizontalAlignment": "center",
"rightToLeft": false,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"text": "",
"rotated": false,
"kerning": true,
"font": {
"size": 9.75,
"style": "normal",
"decoration": "none",
"weight": "bold",
"family": "Arial"
}
}
}
labelingInfo for text placed NE of point symbol Example
{
"allowOverlapOfFeatureBoundary": "allow",
"allowOverlapOfFeatureInterior": "allow",
"allowOverlapOfLabel": "avoid",
"allowOverrun": false,
"deconflictionStrategy": "static",
"labelExpression": "[description]",
"labelExpressionInfo": {
"value": "{description}",
"expression": "$feature.description"
},
"labelPlacement": "esriServerPointLabelPlacementAboveLeft",
"lineConnection": "none",
"maxScale": 0,
"minScale": 0,
"multiPart": "labelPerPart",
"name": "Factory Utility",
"offsetDistance": 3,
"priority": 15,
"removeDuplicates": "none",
"removeDuplicatesDistance": 0,
"repeatLabel": false,
"repeatLabelDistance": 0,
"stackAlignment": "dynamic",
"stackBreakPosition": "after",
"stackLabel": true,
"stackRowLength": 9,
"stackSeparators": [
{
"breakPosition": "before",
"forced": true,
"separator": "|",
"visible": false
},
{
"breakPosition": "after",
"forced": false,
"separator": "-",
"visible": true
}
],
"useCodedValues": false,
"where": "",
"symbol": {
"color": [
51,
51,
51,
255
],
"type": "esriTS",
"haloSize": 0,
"horizontalAlignment": "center",
"rightToLeft": false,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"text": "",
"rotated": false,
"kerning": true,
"font": {
"size": 9.75,
"style": "normal",
"decoration": "none",
"weight": "bold",
"family": "Arial"
}
}
}
labelingInfo for text placed at angle around point symbol Example
{
"allowOverlapOfFeatureBoundary": "allow",
"allowOverlapOfFeatureInterior": "exclude",
"allowOverlapOfLabel": "exclude",
"deconflictionStrategy": "static",
"labelAngleInfo": {
"angleExpressionInfo": {
"expression": "iif($feature.type == 11, $feature.SITE_ANGLE, 90-2*$feature['other angle'])",
"title": "Geology dir (site)"
},
"rotationType": "arithmetic"
},
"labelExpression": "[description]",
"labelExpressionInfo": {
"value": "{description}",
"expression": "$feature.description"
},
"labelPlacement": "esriServerPointLabelPlacementBelowRight",
"maxScale": 0,
"minScale": 0,
"name": "Well",
"priority": 12,
"removeDuplicates": "none",
"removeDuplicatesDistance": 0,
"repeatLabel": false,
"repeatLabelDistance": 0,
"stackAlignment": "dynamic",
"stackBreakPosition": "after",
"stackLabel": true,
"stackRowLength": 9,
"textLayout": "perpendicular",
"useCodedValues": false,
"where": "",
"symbol": {
"color": [
51,
51,
51,
255
],
"type": "esriTS",
"haloSize": 0,
"horizontalAlignment": "center",
"rightToLeft": false,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"text": "",
"rotated": false,
"kerning": true,
"font": {
"size": 9.75,
"style": "normal",
"decoration": "none",
"weight": "bold",
"family": "Arial"
}
}
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4