Planning is used to search for a route between two (or more) points. The function finds a suitable route based on the selected planning type (by car, on foot, …) and returns the length, time, and geometry of the found route.
- Plan Route – The function plans a route between two (or more) points.
The technical documentation provides an exact description of input and output parameters, default values, errors, and other details.
You can try out the function in the Testing Laboratory.
|start, end||Starting and ending coordinates|
|routeType||Planning type – more in the chapter on Planning Types|
|lang||Preferred language for the names of the searched entities.|
|format||Output geometry format of the route (geojson, polyline, polyline)|
|avoidToll||Avoid toll sections|
|waypoints||Waypoints, up to 15. The proposed route will go from the start, through these waypoints (in the specified order), to the destination.|
|length||Route length in meters|
|duration||Estimated time for passage in seconds|
|geometry||Route geometry suitable for map rendering (in the chosen format)|
Planning supports various types of planning, according to which it optimizes the proposed route:
- car – fast – searches for a fast car route
- car – fast with traffic – searches for a fast car route considering the current traffic conditions, congestion, etc. (only in the Czech Republic, without considering traffic outside the Czech Republic)
- car – short – searches for a short car route
- foot – fast – searches for a fast walking route
- bicycle – road – searches for a route for road bicycles, with asphalt surface, preferring cycle paths and bike trails
- bicycle – mountain – searches for a route for mountain bikes, preferring cycle paths and bike trails regardless of the surface