Calculate routing summary

To use Text Search (New) or Nearby Search (New) to calculate the travel duration and distance to each place in the response:

In this example, you calculate the travel duration and distance to each place in the Nearby Search response. This example searches for restaurants in Sydney, Australia and sets the location restriction and the routing origin to the same latitude and longitude coordinate:

Specify travel options

By default, the duration and distance calculations are for a car. However, you can control the vehicle type, as well as other options, in the search.

In the next example, you specify the travel mode as DRIVE and to avoid highways: