---
title: "calculate route · RUAL Documentation"
description: "RUAL google block."
canonical: https://docs.rual.nl/block-types/google/google_routes_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 `object` The place ID, address, or textual latitude,longitude value from which you wish to calculate directions. More information can be found [here](https://developers.google.com/maps/documentation/routes/specify_location).

- destination required `object` The place ID, address, or textual latitude,longitude value to which you wish to calculate directions. More information can be found [here](https://developers.google.com/maps/documentation/routes/specify_location).

- intermediates `array` The place ID, address, or textual latitude,longitude value to which you wish to drive through. More information can be found [here](https://developers.google.com/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes#request-body).

- mode `value` Specifies the mode of transport to use when calculating directions. Available modes are DRIVE, BICYCLE, WALK or TWO_WHEELER.

Default `DRIVE`

- preference `value` Specifies the routing preference. More information can be found [here](https://developers.google.com/maps/documentation/routes/config_trade_offs).

Default `TRAFFIC_UNAWARE`

- modifiers `object` Specifies the route modifiers. More information can be found [here](https://developers.google.com/maps/documentation/routes/route-modifiers).

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

- fields `array` Specifies the fields that should be returned in the response. Requires an array of values.

- alternate routes `condition` Specifies if the response should return alternate routes.

- language code `value`

- reference route `array` Specifies what reference routes to calculate as part of the request in addition to the default route. More information can be found [here](https://developers.google.com/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes#request-body).

- extra computations `array` A list of extra computations which may be used to complete the request. More information can be found [here](https://developers.google.com/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes#request-body).

- flow `flow`

- success `condition`

- response `object`

- error `value`

A typical wiring for [calculate route](https://docs.rual.nl/block-types/google/google_routes_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 `apikey` pin; [new object](https://docs.rual.nl/block-types/object/object_new_fields) feeds the `origin` pin; [new object](https://docs.rual.nl/block-types/object/object_new_fields) 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_routes_calculate_route.png)

### Version history

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