Options
All
  • Public
  • Public/Protected
  • All
Menu

The MappedinPolygon class represents the 3D shape of a MappedinLocation on a {MappedinMap. Polygons have access to Locations they belong to, and any entrances to the Polygon.

A Polygon can have more properties but usually the default is sufficient. The Mappedin'things' object is where you would specify what properties you want to download for Polygons. Only specify what you will actually use, to minmimze transfer time. Work with your Mappedin developer relations contact to set up any custom properties you need.

Hierarchy

  • MappedinNavigatable
    • MappedinPolygon

Index

Constructors

constructor

Properties

Private #private

#private: any

Private #private

#private: any

Optional externalId

externalId: string

geometry

geometry: any

id

id: string

Node ID.

property

id {string}

Optional layer

layer: string

Optional layerId

layerId: string

map

map: string

ID of Map that Polygon is located on.

property

map {string}

Optional name

name: string

Optional vertexes

vertexes: { x: number; y: number }[]

Accessors

entrances

  • Polygon's entrance Nodes.

    property

    entrances {[MappedinNode]}

    Returns MappedinNode[]

  • Polygon's entrance Nodes.

    Parameters

    Returns any

locations

  • Locations attached to the Polygon.

    property

    locations {[MappedinLocation]}

    Returns MappedinLocation[]

rank

  • get rank(): null | { node: string; score: number }
  • Ranking for this polygon.

    Returns null | { node: string; score: number }

Methods

directionsTo

directionsToCallback

distanceTo

  • Calculate distance between 2 nodes, polygons or locations

    Parameters

    • destination: MappedinLocation | MappedinPolygon | MappedinNode
    • options: TDirectionToOptions
    • Optional cb: (error: any, distance: number) => void
        • (error: any, distance: number): void
        • Parameters

          • error: any
          • distance: number

          Returns void

    Returns number

toJSON

  • toJSON(): any
  • Returns any

Static fetch

Static hydrate