---
title: "calculate route · RUAL Documentation"
description: "RUAL google block."
canonical: https://docs.rual.nl/block-types/google/google_directions_calculate_route
language: en
---

# calculate route

This block is part of the [`google`](https://docs.rual.nl/block-types/google) group and was last modified in core [`v10.4.28`](https://docs.rual.nl/core-versions/100428).

- flow `flow`

- api key required `value` Your application's API key, created within your Google Cloud Platform Console.

- origin required `value` The place ID, address, or textual latitude,longitude value from which you wish to calculate directions.

- destination required `value` The place ID, address, or textual latitude,longitude value to which you wish to calculate directions.

- mode `value` Specifies the mode of transport to use when calculating directions. Available modes are driving, walking, bicycling or transit.

Default `driving`

- region `value` Specifies the region code (top-level domain) two-char. value.

Default `none`

- traffic model `value` Specifies the assumptions to use when calculating time in traffic. Options are best_guess, pessimistic or optimistic.

Default `best_guess`

- arrival time `date` Specifies the desired time of arrival for transit directions.

Default `none`

- departure time `date` Specifies the desired time of departure for transit directions.

Default `now`

- waypoints `array` Specifies an array of intermediate locations to include along the route between the origin and destination points as pass through or stopover locations. Place ids should be prefixed with place_id:, latitude,longitude can be passed directly, addresses will be mapped to latitude,longitude automatically. Requests using more than 10 waypoints (between 11 and 25), or waypoint optimization, are billed at a higher rate.

- flow `flow`

- success `condition`

- results `array`

- error `value`

A typical wiring for [calculate route](https://docs.rual.nl/block-types/google/google_directions_calculate_route): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `api_key` pin; [number](https://docs.rual.nl/block-types/number/number_default) feeds the `origin_latitude` pin; [number](https://docs.rual.nl/block-types/number/number_default) feeds the `origin_longitude` pin; [number](https://docs.rual.nl/block-types/number/number_default) feeds the `destination_latitude` pin; [number](https://docs.rual.nl/block-types/number/number_default) feeds the `destination_longitude` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `origin` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `destination` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the calculate route block: typical wiring for calculate route.](https://docs.rual.nl/canvas-examples/google_directions_calculate_route.png)

### Version history

Introduced in [`v10.4.28`](https://docs.rual.nl/core-versions/100428).
