Class

DirectionsService

DirectionsService

The directions service is used for getting routes to display on the map.

Methods

static getDetails(graphId) → {Promise.<GraphDetailsResult>}

Gets details for a route network graph.
Parameters:
Name Type Description
graphId string The network graph id.
Promise.<GraphDetailsResult>

static getRoute(args) → {Promise.<DirectionsResult>}

Gets a route between two locations.
Parameters:
Name Type Attributes Description
args Object
origin Object Location of origin.
origin.lat number latitude in degrees.
origin.lng number longitude in degrees.
origin.floor number <optional>
Optional a floor index if the origin is inside a building.
destination Object Location of destination.
destination.lat number latitude in degrees.
destination.lng number longitude in degrees.
destination.floor number <optional>
Optional a floor index if the destination is inside a building.
mode string <optional>
The travel mode
avoidStairs boolean <optional>
If set to true stairs will be avoided if possible.
userRoles Array.<string> <optional>
List of user roles to be applied to the directions.
Promise.<DirectionsResult>