Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LineShape

The LineShape represents a shape-point / coordinate of a Line feature. The LineShape is only existing if the corresponding Line feature is "selected" and user based geometry editing with touch/mouse interaction is activated.

see

Line.select

Hierarchy

Implements

Index

Properties

Optional bbox

bbox: [number, number, number, number]

Bounding box of the feature. The value of the bbox member is an array of length 4, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The "bbox" values define shapes with edges that follow lines of constant longitude and latitude.

class

class: string

The feature class of a LineShape Feature is "LINE_SHAPE".

geometry

geometry: { coordinates: [number, number, number]; type: "Point" }

{@inheritdoc}

Type declaration

  • coordinates: [number, number, number]

    {@inheritdoc}

  • type: "Point"

    {@inheritdoc}

id

id: string | number

id of the feature.

properties

properties: { button: number; index: number; lineStringIndex: number; moved: boolean; x: number; y: number; z: number }

{@inheritdoc}

Type declaration

  • button: number
  • index: number
  • lineStringIndex: number
  • moved: boolean
  • x: number
  • y: number
  • z: number

type

type: "Feature" | string

The type of the feature is a string with 'Feature' as its value.

Methods

behavior

  • behavior(options: { dragAxis?: "X" | "Y" | "Z" | [number, number, number]; dragPlane?: "XY" | "XZ" | "YZ" | [number, number, number] }): void
  • behavior(name: string, value: boolean | string | [number, number, number]): void
  • behavior(option: string): any
  • behavior(): { dragAxis?: [number, number, number] | "X" | "Y" | "Z" | null; dragPlane?: [number, number, number] | "XY" | "XZ" | "YZ" | null }
  • Set the behavior options.

    experimental

    Parameters

    • options: { dragAxis?: "X" | "Y" | "Z" | [number, number, number]; dragPlane?: "XY" | "XZ" | "YZ" | [number, number, number] }
      • Optional dragAxis?: "X" | "Y" | "Z" | [number, number, number]

        The drag axis across which the LineShape is dragged upon user interaction. Once "dragAxis" is set, "dragPlane" has no effect. In case "dragAxis" and "dragPlane" are set, "dragPlane" is preferred. In case "dragPlane" and "dragAxis" are both set, "dragPlane" is preferred.

      • Optional dragPlane?: "XY" | "XZ" | "YZ" | [number, number, number]

        The normal of the plane over which the LineShape is dragged upon user interaction. Once "dragPlane" is set, "dragAxis" has no effect.

    Returns void

  • Set the value of a specific behavior option.

    experimental

    Parameters

    • name: string
    • value: boolean | string | [number, number, number]

    Returns void

  • Get the value of a specific behavior option.

    experimental

    Parameters

    • option: string

    Returns any

  • Get the behavior options.

    experimental

    Returns { dragAxis?: [number, number, number] | "X" | "Y" | "Z" | null; dragPlane?: [number, number, number] | "XY" | "XZ" | "YZ" | null }

    • Optional dragAxis?: [number, number, number] | "X" | "Y" | "Z" | null

      The drag axis across which the marker is dragged upon user interaction.

    • Optional dragPlane?: [number, number, number] | "XY" | "XZ" | "YZ" | null

      The normal of the plane over which the marker is dragged upon user interaction.

getIndex

  • getIndex(): number
  • Get the index of the shape point in the coordinates array of the respective LineString geometry.

    Returns number

    The index of the shape point.

getLength

  • getLength(): number
  • Get the total number of coordinates of the LineString geometry.

    Returns number

    Number of coordinates

getLine

  • Get the Line feature to which the LineShape belongs.

    Returns Line

    the Line feature

getLineStringIndex

  • getLineStringIndex(): number
  • Get the index of the coordinate array in the MultiLineString array of LineString coordinate arrays. For Line features with a geometry of type "LineString" the lineStringIndex is 0.

    Returns number

    the index of the coordinate array in the MultiLineString array of LineString coordinate arrays.

getProvider

isSelected

  • isSelected(): boolean
  • Will return true or false whether the Shape is currently selected.

    Returns boolean

remove

  • remove(): void
  • Removes the shape point from the geometry of the Line feature.

    Returns void

select

  • select(): void
  • Select the LineShape add it to the current selection. Multiple LineShapes can be selected at the same time. When a selected shape is dragged, all other shapes in the current selection are dragged as well.

    Returns void

toJSON

unselect

  • unselect(): void
  • Unselect the LineShape and remove from current selection.

    Returns void

Generated using TypeDoc