Routing Enhancement API
Routing Enhancement API
Use the routing enhancement API to route from a start point to an end point along a defined trail. The route connects to the trail at the nearest point.
Base URL
https://enhance.maptoolkit.net/routingAuthentication
Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.
Parameters
Routing Data
| Parameter | Type | Required | Description |
|---|---|---|---|
start | lng,lat | Yes | Start coordinates. |
end | lng,lat | Yes | End coordinates. |
Route to Consider when Routing
| Parameter | Type | Required | Description |
|---|---|---|---|
gpx | URL | Yes (or geometry/kml) | URL to the trail GPX file (forward direction). |
gpx_backward | URL | No | URL to the trail GPX file in the reverse direction. |
kml | URL | Yes (or geometry/gpx) | URL to the trail KML file. |
geometry | GeoJSON string | Yes (or gpx/kml) | Trail as a GeoJSON geometry. |
Configuration Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
routeType | string | No | Vehicle type: car, bike, or foot. |
language | string | No | Language for turn instructions. |
cache | 0 or 1 | No | Use cached results. Default: 1. |
Response
Example:
GET https://enhance.maptoolkit.net/routing?start=10.826209,47.834097&end=10.854801,47.746367&gpx=https://static.maptoolkit.net/trail.gpx&api_key=YOUR_API_KEY