Skip to content
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/routing

Authentication

Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.

Parameters

Routing Data

ParameterTypeRequiredDescription
startlng,latYesStart coordinates.
endlng,latYesEnd coordinates.

Route to Consider when Routing

ParameterTypeRequiredDescription
gpxURLYes (or geometry/kml)URL to the trail GPX file (forward direction).
gpx_backwardURLNoURL to the trail GPX file in the reverse direction.
kmlURLYes (or geometry/gpx)URL to the trail KML file.
geometryGeoJSON stringYes (or gpx/kml)Trail as a GeoJSON geometry.

Configuration Parameters

ParameterTypeRequiredDescription
routeTypestringNoVehicle type: car, bike, or foot.
languagestringNoLanguage for turn instructions.
cache0 or 1NoUse 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