Options
All
  • Public
  • Public/Protected
  • All
Menu

The IMappedinPolygon class represents the 3D shape of a IMappedinLocation on a {IMappedinMap. 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 IMappedin'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
    • IMappedinPolygon

Index

Constructors

constructor

Properties

Private #private

#private: any

Private #private

#private: any

Optional externalId

externalId: undefined | string

geometry

geometry: any

id

id: string

Node ID.

property

id {string}

Optional layer

layer: undefined | string

Optional layerId

layerId: undefined | string

map

map: string

ID of Map that Polygon is located on.

property

map {string}

Optional name

name: undefined | string

Accessors

entrances

  • Polygon's entrance Nodes.

    property

    entrances {[MappedinNode]}

    Returns IMappedinNode[]

  • Polygon's entrance Nodes.

    Parameters

    Returns any

locations

  • Locations attached to the Polygon.

    property

    locations {[MappedinLocation]}

    Returns IMappedinLocation[]

rank

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

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

Methods

directionsTo

  • Get Directions to a node, polygon, or location

    Parameters

    • destination: IMappedinPolygon | IMappedinLocation | IMappedinNode
    • options: TDirectionToOptions
    • Optional cb: (error: any, directions: undefined | MappedinDirections) => void
        • (error: any, directions: undefined | MappedinDirections): void
        • Parameters

          • error: any
          • directions: undefined | MappedinDirections

          Returns void

    Returns undefined | MappedinDirections

directionsToCallback

  • deprecated

    Parameters

    • destination: IMappedinPolygon | IMappedinLocation | IMappedinNode
    • options: TDirectionToOptions
    • Optional cb: (error: any, directions: undefined | MappedinDirections) => void
        • (error: any, directions: undefined | MappedinDirections): void
        • Parameters

          • error: any
          • directions: undefined | MappedinDirections

          Returns void

    Returns undefined | MappedinDirections

distanceTo

  • Calculate distance between 2 nodes, polygons or locations

    Parameters

    • destination: IMappedinPolygon | IMappedinLocation | IMappedinNode
    • 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

  • Parameters

    Returns Promise<any>

Static hydrate

  • hydrate(polygons: any, mappedin: IMappedin): any
  • Parameters

    Returns any