Package google.maps.geocode.v4beta

Index

GeocodeService

A service for performing geocoding.

GeocodeAddress

rpc GeocodeAddress(GeocodeAddressRequest) returns (GeocodeAddressResponse)

This method performs an address geocode, which maps an address to a LatLng. It also provides structured information about the address.

Authorization scopes

Requires one of the following OAuth scopes:

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

rpc GeocodeLocation(GeocodeLocationRequest) returns (GeocodeLocationResponse)

This method performs a location geocode, which maps a LatLng to an address. It also provides structured information about the address.

Authorization scopes

Requires one of the following OAuth scopes:

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

rpc GeocodePlace(GeocodePlaceRequest) returns (GeocodeResult)

This method performs a geocode lookup using a place ID.

Authorization scopes

Requires one of the following OAuth scopes:

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

GeocodeAddressRequest

Request message for GeocodeService.GeocodeAddress.

Fields
location_bias

LocationBias

Optional. The region to search. This location serves as a bias which means results around given location might 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 will also influence, but not fully restrict, results from the service.

Union field address_input. The address to geocode. address_input can be only one of the following:
address_query

string

The unstructured address to geocode.

address

PostalAddress

The structured address to geocode in postal address format.

LocationBias

The region to search. This location serves as a bias which means results around given location might be returned.

Fields
Union field type. Types of location bias. type can be only one of the following:
rectangle

Viewport

A rectangle box defined by northeast and southwest corner. rectangle.high() must be the northeast point of the rectangle viewport. rectangle.low() must be the southwest point of the rectangle viewport. rectangle.low().latitude() cannot be greater than rectangle.high().latitude(). This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees.

GeocodeAddressResponse

Response message for GeocodeService.GeocodeAddress.

Fields
results[]

GeocodeResult

The geocoding result.

GeocodeLocationRequest

Request message for GeocodeService.GeocodeLocation.

Fields
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.

types[]

string

Optional. A set of type tags to restrict the results. Results that do not have any of the specified types are removed.

For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types.

granularity[]

Granularity

Optional. A filter of one or more location granularity enums.

Union field location_input. The location to geocode. location_input can be only one of the following:
location_query

string

The location in the format of "lat,lng" string. For example, "64.7611872,-18.4705364".

location

LatLng

The location in the structured format.

GeocodeLocationResponse

Response message for GeocodeService.GeocodeLocation.

Fields
results[]

GeocodeResult

The geocoding result.

plus_code

PlusCode

Plus code of the location in the request.

GeocodePlaceRequest

Request message for GeocodeService.GeocodePlace.

Fields
place

string

Required. Place identifier to geocode in the format of places/{place}.

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.

GeocodeResult

A geocode result contains geographic information about a place.

Fields
place

string

The fully qualified place identifier for this result. In the format of "//places.googleapis.com/places/{placeID}". See https://developers.google.com/maps/documentation/places/web-service/place-id. for more details.

place_id

string

The place ID for this result.

location

LatLng

The latlng of this address.

granularity

Granularity

The granularity of the location.

viewport

Viewport

A viewport suitable for displaying the geocode result.

bounds

Viewport

A bounding box for the address.

formatted_address

string

The one line formatted address.

postal_address

PostalAddress

The address in postal address format.

address_components[]

AddressComponent

Repeated components for each locality level.

postal_code_localities[]

LocalizedText

Complete list of localities contained in the postal code.

This is only populated when the result is of type "postal_code".

types[]

string

A set of type tags for this result. For example, "political" and "administrative_area".

For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types.

plus_code

PlusCode

Plus code of the location in this geocode.

AddressComponent

The structured components that form the formatted address, if this information is available.

Fields
long_text

string

The full text description or name of the address component. For example, an address component for the country Australia may have a long name of "Australia".

short_text

string

An abbreviated textual name for the address component, if available. For example, an address component for the country of Australia may have a short name of "AU".

types[]

string

An array indicating the type(s) of the address component.

See https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types for more details.

language_code

string

The language used to format this components, in CLDR notation.

Granularity

The granularity of the location.

Enums
GRANULARITY_UNSPECIFIED Do not use.
ROOFTOP The non-interpolated location of an actual plot of land corresponding to the matched address.
RANGE_INTERPOLATED Interpolated from a range of street numbers. For example, if we know that a segment of Amphitheatre Pkwy contains numbers 1600 - 1699, then 1650 might be placed halfway between its endpoints.
GEOMETRIC_CENTER The geometric center of a feature for which we have polygonal data.
APPROXIMATE Everything else.

PlusCode

Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.

Fields
global_code

string

Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000 by 1/8000 degree area (~14 by 14 meters).

compound_code

string

Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the suffix of the global code and replacing the prefix with a formatted name of a reference entity.