A MappedinNode represents a position, anchored to a specific MappedinMap.

A Node 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 Nodes. 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 Node to the target Polygon, Location, Node or array of Nodes.

Parameters:

directionsToCallback
(
  • error
  • directions
)

Directions callback.

Parameters:

distanceTo
(
  • destination
  • options
  • cb
)

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

Parameters:

getAngle
(
  • to
)
Number

Calculate the angle between this node and another

Parameters:

Returns:

getDistance
(
  • to
)

Calculate the distance between this node and another

Parameters:

id

String

Node 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 Node 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 this Node.

map

String

ID of Map that the Node is located on.

paths

[MappedinNode]

Adjacent Nodes.

x

Number

X coordinate of Node's position.

y

Number

Y coordinate of Node's position.