calculate route

This block is part of the google group and was last modified in core v10.4.28.

calculate route v10.4.28

In pins 9 + flow
  • 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.

Out pins 3 + flow
  • flow
    flow
  • success
    condition
  • results
    array
  • error
    value

A typical wiring for calculate route: a function trigger starts the flow; value feeds the api_key pin; number feeds the origin_latitude pin; number feeds the origin_longitude pin; number feeds the destination_latitude pin; number feeds the destination_longitude pin; value feeds the origin pin; value feeds the destination pin; the flow out pin feeds debug.

Studio canvas example for the calculate route block: typical wiring for calculate route.

Version history

Introduced in v10.4.28.


Back to google Return to the main group to view all sub-groups Back to google directions Return to the group to view all blocks within this group