Options
All
  • Public
  • Public/Protected
  • All
Menu

A ShapeList is a Shape that consists of a finite number of other shapes in a given order. A ShapeList must be instantiated by using createShapeList.

Hierarchy

Implements

Overview

Constructors

Private constructor

  • This class should not be instantiated by users of LuciadRIA.

    Returns ShapeList

Accessors

bounds

coordinateType

focusPoint

  • get focusPoint(): Point | null

reference

  • The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.

    Returns CoordinateReference | null

shapeCount

  • get shapeCount(): number
  • returns the amount of shapes in this ShapeList

    Returns number

type

Methods

addShape

  • (shapeOrIndex: number | Shape, maybeShape?: Shape): void
  • Add a shape to the end of the ShapeList or at the given index.

    throws

    InvalidReferenceError If the shape's reference does not correspond with the spatial reference of the ShapeList.

    throws

    ProgrammingError If the index passed is smaller than zero or larger than the length of the list.

    Parameters

    • shapeOrIndex: number | Shape

      index The index at which the shape must be inserted into the list. It must be between 0 and the length of the shapelist. Or the shape that must be added at the end of the ShapeList.

    • Optional maybeShape: Shape

      The shape that must be inserted at the given index.

    Returns void

contains2D

  • Determines whether a given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

    throws

    InvalidReferenceError when passing a Point with another spatial reference

    deprecated

    Please use contains2DPoint instead.

    Parameters

    • x: Point | number | Bounds

      The point for which containment must be checked. If a 3D point is passed to this function, it will be treated as a 2D point: the z coordinate (height) will be ignored. The reference of this point must be the same reference as this Shape

    • Optional y: number

    Returns boolean

    true when the given point is contained in this shape

contains2DCoordinates

  • (x: number, y: number): boolean

contains2DPoint

  • (point: Point): boolean
  • Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

    throws

    InvalidReferenceError when passing a Point with another spatial reference

    Parameters

    • point: Point

      The point for which containment must be checked.

    Returns boolean

    true when the given point is contained in this shape

copy

equals

  • (shapelist: Shape): boolean
  • Returns true if every shape in this shape list is equal to the shape at the same index in the other shape list.

    Parameters

    • shapelist: Shape

      a shapelist to compare to this list

    Returns boolean

    true if equal, false otherwise

getShape

  • Get the shape from this ShapeList at the given index. If the index is larger or equal than pointCount, undefined will be returned.

    Parameters

    • index: number

    Returns Shape

    the shape at the index or undefined.

removeShape

  • (index: number): void
  • Remove the shape at the given index from the ShapeList

    throws

    ProgrammingError If the index is not defined ( 0 <= index < pointCount )

    Parameters

    • index: number

      The index of the shape that must be removed.

    Returns void

toString

  • (): string

translate2D

  • (x: number, y: number): void
  • Translates all the shapes in this shapelistshape over the given vector in 2D space.

    Parameters

    • x: number

      x coordinate value

    • y: number

      y coordinate value

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method