Package google.maps.geocode.v4alpha

Index

DestinationService

A service for retrieving destinations.

A destination provides hierarchical context about a place, which allows you to, for example, find apartment buildings within a larger apartment complex and vice versa. It also provides navigation points suitable for use cases such as ridesharing or delivery.

SearchDestinations

rpc SearchDestinations(SearchDestinationsRequest) returns (SearchDestinationsResponse)

This method performs a destination lookup and returns a list of destinations.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/maps-platform.geocode

Destination

A destination. This includes the primary place, related places, entrances, and navigation points.

Fields
primary

PlaceView

The primary place identified by the primary_query in the request.

containing_places[]

PlaceView

The less precise places that the primary place is contained by. For example, the apartment complex that contains this building.

sub_destinations[]

PlaceView

More precise sub-destinations of the primary place. For example, units contained in a building.

Note: compared to the SubDestination returned by the Places API, this list of sub-destinations is more exhaustive, and each sub-destination contains more information.

landmarks[]

Landmark

Landmarks that can be used to communicate where the destination is or help with arrival.

entrances[]

Entrance

Entrances for this destination.

navigation_points[]

NavigationPoint

Navigation points for this destination.

Entrance

An entrance is a single latitude/longitude coordinate pair that defines the location of an entry and exit point for a place.

Fields
location

LatLng

The location of the entrance.

tags[]

Entrance.Tag

A list of tags that describe the entrance.

place

string

The structure this entrance is physically located on, in places/{place_id} format.

Tag

Characteristics that describe an entrance.

Enums
TAG_UNSPECIFIED Not used.
PREFERRED

The entrance likely provides physical access to the primary place in the returned destination. A place can have multiple preferred entrances. If an entrance does not have this tag, it means the entrance is physically on the same building as the primary place, but does not necessarily provide access to the place.

For example, if the primary place is a restaurant in a strip mall, the "PREFERRED" entrances will be the ones that likely lead into the restaurant itself, while the other returned entrances will be other entrances for the building, such as entrances into other restaurants in the strip mall.

If the primary place is a building itself, the PREFERRED entrances will be the ones that lead into the "main" part of the building. For example, in a shopping center the PREFERRED entrances will be the ones that allow access to the main foyer area, but if an entrance only provides access to a store on the side of the building, it won't be a PREFERRED entrance.

Note: a PREFERRED entrance might not provide access to the primary place, and a non-PREFERRED entrance might provide access to the primary place.

Landmark

Landmarks are used to communicate where the destination is or help with arriving at the destination.

Fields
tags[]

Landmark.Tag

Tags that describe how the landmark can be used in the context of the destination.

Union field landmark. The landmark. landmark can be only one of the following:
place

PlaceView

The place that represents this landmark.

Tag

The list of all possible tags that describe how a landmark can be used in the context of a destination.

If an address has both the ADDRESS and ARRIVAL tags, it means the landmark is both locally prominent and close to the destination.

Enums
TAG_UNSPECIFIED Not used.
ADDRESS A locally prominent place that can be used to identify the general location of the destination. Typically within a few hundred meters of the destination. These are similar to the landmarks returned by the Address Descriptors feature of the Geocoding API: https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors.
ARRIVAL A place that can be used to help arrive at the destination. Useful for navigation once you are close to the destination. For example, this landmark might be a place that is across the street from the destination. A landmark with this tag is typically closer to the destination than landmarks with the ADDRESS tag.

A navigation point is a location next to a road where navigation can end.

Fields
display_name

LocalizedText

The display name of this navigation point. For example, "5th Ave" or "Gate B".

location

LatLng

A point next to the road segment where navigation should end. The point is intentionally slightly offset from the road's centerline to clearly mark the side of the road where the place is located.

travel_modes[]

NavigationPoint.TravelMode

Travel modes that are appropriate for this navigation point.

usages[]

NavigationPoint.Usage

Usages supported by this navigation point.

TravelMode

Travel modes that are appropriate for this navigation point.

Enums
TRAVEL_MODE_UNSPECIFIED Not used.
DRIVE Suitable for driving.
WALK Suitable for walking.

Usage

Usages supported by this navigation point.

Enums
USAGE_UNSPECIFIED Not used.
UNKNOWN Unknown usage type. Most navigation points will be UNKNOWN and it does not necessarily mean their usage is restricted in any way. This navigation might still be suitable for pickup and/or dropoff.
DROPOFF Suitable for dropping off a passenger. For example, a rideshare drop off location.
PICKUP Suitable for picking up a passenger. For example, a rideshare pick up location.

PlaceView

Represents a view of a Place in the Places API. It also provides additional information specific to destinations, such as the structure type and the display polygon.

In some cases, a PlaceView with the same place ID might differ from what is being returned by the Places API for the types and display_name fields.

Fields
place

string

This place's resource name, in places/{placeId} format.

display_name

LocalizedText

Human readable place description. For example, "Gate B", "McDonalds"

primary_type

string

The primary place type of this place. See https://developers.google.com/maps/documentation/places/web-service/place-types for the list of possible values.

Note: This field is not always populated. Be prepared to use the types field in such situations.

types[]

string

All associated place types of this place. See https://developers.google.com/maps/documentation/places/web-service/place-types for the list of possible values.

formatted_address

string

One line address.

postal_address

PostalAddress

Structured address.

structure_type

PlaceView.StructureType

The type of structure corresponding to this place.

location

LatLng

The location of this place. For places with display polygons, this can represent a good spot to put a marker on the map.

display_polygon

Struct

The polygon outline of the place in GeoJSON format, using the RFC 7946 format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.

Note: The RFC 7946 format supports MultiPolygons, so one display_polygon object can represent multiple polygons.

StructureType

The type of structure that this place represents.

Enums
STRUCTURE_TYPE_UNSPECIFIED Not used.
POINT A point location.
SECTION A sub-section of a building.
BUILDING A building.
GROUNDS A large area that typically contains multiple buildings, such as a university campus, an apartment complex, or a shopping mall.

SearchDestinationsRequest

Request message for DestinationService.SearchDestinations.

Fields
travel_modes[]

NavigationPoint.TravelMode

Optional. The travel modes to filter navigation points for. This influences the navigation_points field returned in the response. If empty, navigation points of all travel modes can be returned.

language_code

string

Optional. Language in which the results should be returned.

region_code

string

Optional. Region code. The region code, specified as a ccTLD ("top-level domain") two-character value. The parameter affects results based on applicable law. This parameter also influences, but not fully restricts, results from the service.

Union field primary_query. Query for the primary destination. This can be either a place, a fully specified address, or a LatLng location. Some places and addresses with minimal information won't be able to be turned into a destination.

The destinations are built around the specified primary query.

Note: only places and addresses that can have a navigational destination are supported. For example, a place that represents a house or an apartment complex can be used as the primary query, but places that represent a locality or an administrative area cannot be used as the primary query. primary_query can be only one of the following:

place

string

The resource name of a place, in places/{place_id} format.

address_query

SearchDestinationsRequest.AddressQuery

A street address.

location_query

SearchDestinationsRequest.LocationQuery

A precise location.

AddressQuery

The street address that you want to search for. Specify addresses in accordance with the format used by the national postal service of the country concerned.

Fields
Union field kind. The address query. kind can be only one of the following:
address

PostalAddress

A street address in postal address format.

address_query

string

A street address formatted as a single line.

LocationQuery

A location query to identify a nearby primary destination.

Note: if the location query is within a building that contains subpremises, it is possible that the returned primary place is a subpremise. In these cases, the containing_places field will include the building.

Fields
Union field kind. The location query. kind can be only one of the following:
location

LatLng

A precise LatLng location.

SearchDestinationsResponse

Response message for DestinationService.SearchDestinations.

Fields
destinations[]

Destination

A list of destinations.

The service returns one result if a primary destination can be unambiguously identified from the primary query. Otherwise, the service might return multiple results for disambiguation or zero results.