XYZ Maps Documentation
    Preparing search index...

    Interface Range

    A Range represents a part/subsegment on a line geometry or multiple line geometries. It's used by the RangeSelector utility. RangeSelector

    interface Range {
        allowOverlap?: boolean | "L" | "R" | "B" | ("L" | "R" | "B")[];
        dragMove?: (event: EditorEvent) => void;
        dragStart?: (event: EditorEvent) => void;
        dragStop?: (event: EditorEvent) => void;
        from?: number;
        id?: string | number;
        locked?: boolean;
        segments?: RangeSegment[];
        side?: "L" | "R" | "B";
        snap?: boolean | "L" | "R" | "B" | ("L" | "R" | "B")[];
        snapTolerance?: number;
        style?: any;
        to?: number;
    }
    Index
    allowOverlap?: boolean | "L" | "R" | "B" | ("L" | "R" | "B")[]

    Allow overlapping of ranges on the desired side(s).

    • 'L' : allow overlapping with all Ranges on the left side.
    • 'R' : allow overlapping with all Ranges on the right side.
    • 'B' : allow overlapping with all Ranges on the both side.
    • true : allow overlapping with all Ranges regardless of its side, equals: ['L','R','B']
    • false : disabled, do not allow overlapping at all.
    true
    
    dragMove?: (event: EditorEvent) => void

    Set an event listener that will be called when a range is dragged.

    Type Declaration

      • (event: EditorEvent): void
      • Parameters

        • event: EditorEvent

          The respective event. The Range is provided in the detail property of the event. (event.detail.range)

        Returns void

    dragStart?: (event: EditorEvent) => void

    Set an event listener that will be called when a range drag starts.

    Type Declaration

      • (event: EditorEvent): void
      • Parameters

        • event: EditorEvent

          The respective event. The Range is provided in the detail property of the event. (event.detail.range)

        Returns void

    dragStop?: (event: EditorEvent) => void

    Set an event listener that will be called when a range drag has been finished.

    Type Declaration

      • (event: EditorEvent): void
      • Parameters

        • event: EditorEvent

          The respective event. The Range is provided in the detail property of the event. (event.detail.range)

        Returns void

    from?: number

    Relative start position on the line geometry. 0 -> 0% -> start, 0.5 -> 50% -> middle, 1 -> 100% -> end

    0.0
    
    id?: string | number

    Optional identifier of the Range

    locked?: boolean

    lock the range and prevent dragging/editing of the Range.

    segments?: RangeSegment[]

    A range can consist of several segments. A Segment provides detailed information on the affected GeoJSONFeatures/Navlinks:

    {
    feature: GeoJSONFeature;
    from: number;
    to: number;
    reversed: boolean;
    }
    side?: "L" | "R" | "B"

    Side of the Range. Relative to the direction of travel of the line geometry. "L" | "R" | "B" -> Left, Right or Both sides.

    "B"
    
    snap?: boolean | "L" | "R" | "B" | ("L" | "R" | "B")[]

    Automatically snap to Markers of Ranges on the desired side(s) within a given threshold.

    • 'L' : snap to RangeMarkers on the left side
    • 'R' : snap to RangeMarkers on the right side
    • 'B' : snap to RangeMarkers on both sides.
    • true : snap to RangeMarkers regardless of its side, equals: ['L','R','B']
    • false : disabled, do not snap automatically.
    false
    
    snapTolerance?: number

    The threshold in meters for automatic range snapping.

    1 (meter)
    
    style?: any

    Apply custom styling of Range. Objects of key value pairs.

    to?: number

    Relative end position on the line geometry. 0.5 -> 50% -> middle, 1 -> 100% -> end

    1.0