interface LabelingInfoJson {
    labelExpression?: string;
    labelExpressionInfo?: {
        expression?: string;
        title?: string;
        value?: string;
    };
    labelPlacement?:
        | "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";
    maxScale?: number;
    minScale?: number;
    name?: string;
    repeatLabel?: boolean;
    repeatLabelDistance?: number;
    symbol?: TextSymbolJson | LabelSymbol3DJson;
    useCodedValues?: boolean;
    where?: string;
}

Properties

labelExpression?: string

This read-only web map property allows formatting of labels. Use labelExpressionInfo instead.

labelExpressionInfo?: {
    expression?: string;
    title?: string;
    value?: string;
}

Type declaration

  • Optionalexpression?: string

    An Arcade expression evaluating to either a string or a number.

  • Optionaltitle?: string

    The title of the expression.

  • Optionalvalue?: string

    Represents a simple template string. This property is deprecated as of version 2.7 of the web map in favor of 'expression'.

labelPlacement?:
    | "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"

This string property specifies the label placement with respect to that of its feature. A list of label placement values categorized by feature geometry types.

maxScale?: number

Represents the maximum scale at which the layer definition will be applied.

minScale?: number

Represents the minimum scale at which the layer definition will be applied.

name?: string

The name of the label class.

repeatLabel?: boolean

A boolean value indicating whether or not to repeat the label along or across the feature. If true, the label will be repeated according to the repeatLabelDistance. If missing, the default depends on the geometry of the feature: false for point and polygon feature geometries, and true for line feature geometries.

repeatLabelDistance?: number

The repeat label distance used when repeatLabel is true. It represents a screen distance in points.

The text symbol used to label.

useCodedValues?: boolean

Boolean value indicating whether to display the coded values for the specified field name(s).

where?: string

String template used to determine which features to label.