Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Range

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

Hierarchy

  • Range

Index

Properties

Optional allowOverlap

allowOverlap: "L" | "R" | "B" | ("L" | "R" | "B")[] | true | false

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.
defaultvalue

true

Optional dragMove

dragMove: (event: EditorEvent) => void

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

param

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

Type declaration

Optional dragStart

dragStart: (event: EditorEvent) => void

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

param

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

Type declaration

Optional dragStop

dragStop: (event: EditorEvent) => void

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

param

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

Type declaration

Optional from

from: number

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

defaultvalue

0.0

Optional id

id: string | number

Optional identifier of the Range

Optional locked

locked: boolean

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

Optional Readonly segments

segments: RangeSegment[]

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

example
{
 feature: GeoJSONFeature;
 from: number;
 to: number;
 reversed: boolean;
}

Optional side

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.

defaultvalue

"B"

Optional snap

snap: "L" | "R" | "B" | ("L" | "R" | "B")[] | true | false

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.
defaultvalue

false

Optional snapTolerance

snapTolerance: number

The threshold in meters for automatic range snapping.

default

1 (meter)

Optional style

style: any

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

Optional to

to: number

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

defaultvalue

1.0

Generated using TypeDoc