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.

Show:
directionsTo
(
  • destination
  • options
  • cb
)

Gets directions from this Polygon to the target Polygon, Location, Node or array of Nodes.

Parameters:

distanceTo
(
  • destination
  • options
  • cb
)

Gets the cost (combined distance and weights) and total distance(in meters) from this Polygon to the target Polygon, Location, Node or array of Nodes.

Parameters:

entrances

[MappedinNode]

Polygon's entrance Nodes.

id

String

Polygon ID.

This is the internal Mappedin ID, and can be used for the lifetime of the data you get back from getVenue, but it may not be present in future calls, even if there is another Polygon with otherwise similar properties. An ID can never be reused if it's, say, accidentally deleted. If something more durable is required, or if the data in the Mappedin CMS is being synced from somewhere else, you should finding things using the externalId property.

locations

[MappedinLocation]

Locations attached to the Polygon.

map

String

ID of Map that Polygon is located on.