Routing
Valhalla online and offline, route and map-match requests. Created with kind routing.
| Type | Class |
|---|---|
"multi-valhalla-offline" | MultiValhallaOfflineRoutingService |
"valhalla-offline" | ValhallaOfflineRoutingService |
"valhalla-online" | ValhallaOnlineRoutingService |
"request" | hand-written factory |
"match-request" | hand-written factory |
"multi-valhalla-offline" — MultiValhallaOfflineRoutingService
{"type": "multi-valhalla-offline"}
| Key | Type | Always required | Notes |
|---|
Inherited from RoutingService:
| Property | Type | Access | Description |
|---|---|---|---|
profile | string | read/write |
| Method | Arguments | Returns |
|---|---|---|
add | database: string | void |
addLocale | key: string, json: string | void |
calculateRoute | request: handle | object |
matchRoute | request: handle | object |
remove | database: string | bool |
setConfigurationParameter | param: string, value: json | void |
"valhalla-offline" — ValhallaOfflineRoutingService
{"type": "valhalla-offline", "path": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
path | string | yes |
Inherited from RoutingService:
| Property | Type | Access | Description |
|---|---|---|---|
profile | string | read/write |
| Method | Arguments | Returns |
|---|---|---|
calculateRoute | request: handle | object |
matchRoute | request: handle | object |
"valhalla-online" — ValhallaOnlineRoutingService
{"type": "valhalla-online", "apiKey": …}
{"type": "valhalla-online"}
| Key | Type | Always required | Notes |
|---|---|---|---|
apiKey | string | no |
| Property | Type | Access | Description |
|---|---|---|---|
HTTPHeaders | struct std::map<std::string, std::string> | read/write | Returns the current set of HTTP headers used. Initially this set is empty and can be changed with setHTTPHeaders. |
customServiceURL | string | read/write | Returns the custom backend service URL. |
timeout | integer | read/write | Returns the current timeout value. |
Inherited from RoutingService:
| Property | Type | Access | Description |
|---|---|---|---|
profile | string | read/write |
| Method | Arguments | Returns |
|---|---|---|
calculateRoute | request: handle | object |
matchRoute | request: handle | object |
"request"
A route request.
| Key | Type | Notes |
|---|---|---|
points | positions | the waypoints, in order |
projection | string | their projection, by name |
"match-request"
A map-matching request.
| Key | Type | Notes |
|---|---|---|
points | positions | the measured points |
projection | string | their projection, by name |
accuracy | number | metres |
Base classes
Not constructed directly. Their properties are reachable on every object above that derives from them.
RouteMatchingRequest
| Property | Type | Access | Description |
|---|---|---|---|
accuracy | number | read-only | Returns the accuracy of the points in the request. |
points | struct std::vector<massif::MapPos> | read-only | Returns the measured points of the request. |
projection | object std::shared_ptr<massif::Projection> | read-only | Returns the projection of the points in the request. |
| Method | Arguments | Returns |
|---|---|---|
setCustomParameter | name: string, value: json | void |
RoutingRequest
| Property | Type | Access | Description |
|---|---|---|---|
params | string | read/write | Returns the custom parameter value of the request. |
points | struct std::vector<massif::MapPos> | read-only | Returns the point list of the request. |
projection | object std::shared_ptr<massif::Projection> | read-only | Returns the projection of the points in the request. |
| Method | Arguments | Returns |
|---|---|---|
setCustomParameter | name: string, value: json | void |
RoutingService
| Property | Type | Access | Description |
|---|---|---|---|
profile | string | read/write |
| Method | Arguments | Returns |
|---|---|---|
calculateRoute | request: handle | object |
matchRoute | request: handle | object |