The navigation_points field within the Geocoding response contains a list of
points that are useful for navigating to the place. Specifically, they should be
used either as the starting or ending points when routing on a road network from
or to the place. Each navigation point contains the following values:
locationcontains the latitude, longitude value of the navigation point. This location will always be very close to the road network and represents an ideal stopping or starting point for navigating to and from a place. The point is intentionally slightly offset from the road's centerline to clearly mark the side of the road where the place is located.restricted_travel_modesis a list of travel modes that the navigation point is not accessible from:"DRIVE"is the travel mode corresponding to driving directions."WALK"is the travel mode corresponding to walking directions.road_namecontains the name of the road the navigation point is offset from.
Navigation points are returned for most places with a precise location, such as street addresses, buildings, and establishments. Places that represent large areas, such as cities and regions, where a precise location can be ambiguous might not return any navigation points.
Migration notice
Starting April 17th, you must now supply the NAVIGATION_POINTS extra
computations parameter in the request to receive navigation points. Clients can
test this by confirming that the road_name field within some navigation points
is returned and that the location field within each navigation point has the
following four subfields (lat, lng, latitude, longitude).
Additionally, you must migrate to the location.lat and location.lng fields
rather than the location.latitude and location.longitude fields. In a future
release, requests that don't contain the NAVIGATION_POINTS extra computations
parameter won't include any navigation points in the response and the
location.latitude and location.longitude fields will no longer be returned.
Request details
You can obtain navigation points in the following kinds of requests:
For any of these requests, you supply this parameter:
extra_computations=NAVIGATION_POINTS.
Example request
The following query uses place geocoding to obtain navigation points for a restaurant in Mountain View, California, United States:
https://maps.googleapis.com/maps/api/geocode/json?place_id=ChIJZ54APTS3j4ARBYZD956MHq8&extra_computations=NAVIGATION_POINTS&key=YOUR_API_KEY
Example response
The response from the query above shows an array of navigation points:
{
"navigation_points": [
{
"location": {
"lat": 37.3940894,
"lng": -122.0788389,
},
"restricted_travel_modes": ["WALK"],
"road_name": "Castro Street"
},
{
"location": {
"lat": 37.394273,
"lng": -122.0793078,
},
"restricted_travel_modes": ["WALK"],
"road_name": "Wild Cherry Lane"
},
{
"location": {
"lat": 37.3941202,
"lng": -122.0789189,
},
"restricted_travel_modes": ["DRIVE"]
}
]
}
Feedback
This is an experimental feature. We would appreciate feedback at geocoding-feedback-channel@google.com.