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

Properties

#cache: any = {}
#data: any
#entrances: any
#mappedin: Mappedin
#mappedin: Mappedin
canvasBounds?: { align: string; maxHeight: number; maxWidth: number; rotation: number; x: number; y: number }

Type declaration

  • align: string
  • maxHeight: number
  • maxWidth: number
  • rotation: number
  • x: number
  • y: number
externalId?: string
geometry: any
holes?: unknown[]
id: string = ''

Node ID.

property

id {string}

image?: { fitToBounds: boolean; original: string | Blob; position: { x: number; y: number; z: number }; rotation: { x: number; y: number; z: number }; scale: { x: number; y: number }; url: string | Blob; useLocalScaling: boolean; viewBox: { height: number; width: number }; visible: boolean }

Type declaration

  • fitToBounds: boolean
  • original: string | Blob
  • position: { x: number; y: number; z: number }
    • x: number
    • y: number
    • z: number
  • rotation: { x: number; y: number; z: number }
    • x: number
    • y: number
    • z: number
  • scale: { x: number; y: number }
    • x: number
    • y: number
  • url: string | Blob
  • useLocalScaling: boolean
  • viewBox: { height: number; width: number }
    • height: number
    • width: number
  • visible: boolean
label?: { align: string; color: string; fontFamily: string; fontSize: number; position: { x: number; y: number; z: number }; rotation: { x: number; y: number; z: number }; text: string; visible: boolean }

Type declaration

  • align: string
  • color: string
  • fontFamily: string
  • fontSize: number
  • position: { x: number; y: number; z: number }
    • x: number
    • y: number
    • z: number
  • rotation: { x: number; y: number; z: number }
    • x: number
    • y: number
    • z: number
  • text: string
  • visible: boolean
layer?: string
layerId?: string
map: string = ''

ID of Map that Polygon is located on.

property

map {string}

material: { color: string; opacity?: number }

Type declaration

  • color: string
  • Optional opacity?: number
name?: string
textures?: { image: any; name: "front" | "side"; useFrontFaceImage?: boolean }[]
vertexes?: { x: number; y: number }[]

Accessors

  • Polygon's entrance Nodes.

    property

    entrances {[MappedinNode]}

    Returns MappedinNode[]

  • Polygon's entrance Nodes.

    property

    entrances {[MappedinNode]}

    Parameters

    Returns void

  • Locations attached to the Polygon.

    property

    locations {[MappedinLocation]}

    Returns MappedinLocation[]

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

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

Methods

  • Calculate distance between 2 nodes, polygons or locations

    Parameters

    Returns number

  • toJSON(): any
  • Returns any