compute_route
Compute a walking or driving route between two locations, returning coordinates and resolved endpoints for overlay on a map image.
Instructions
Compute a walking or driving route between two locations.
Returns the route as an ordered list of coordinates, plus the resolved from/to locations.
Pass the result directly to generate_map's route parameter to overlay it on a map image.
Use from/to as markers in generate_map to place pins at the start and end points.
Typical flow:
route = compute_route(from_location={"label": "A"}, to_location={"label": "B"})
generate_map(route=route, markers=[route["from"], route["to"]], ...)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from_location | Yes | ||
| to_location | Yes | ||
| mode | No | walking |