Index
-
GeocodeService
(interface) -
GeocodeAddressRequest
(message) -
GeocodeAddressRequest.LocationBias
(message) -
GeocodeAddressResponse
(message) -
GeocodeLocationRequest
(message) -
GeocodeLocationResponse
(message) -
GeocodePlaceRequest
(message) -
GeocodeResult
(message) -
GeocodeResult.AddressComponent
(message) -
GeocodeResult.Granularity
(enum) -
PlusCode
(message)
GeocodeService
A service for performing geocoding.
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
-
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
-
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.
location_bias
GeocodeAddressRequest.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.
address_input
. The address to geocode. address_input
can be only one of the following:address_query
string
The unstructured address to geocode.
address
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.
type
. Types of location bias. type
can be only one of the following:rectangle
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[]
|
The geocoding result. |
GeocodeLocationRequest
Request message for GeocodeService.GeocodeLocation.
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[]
Optional. A filter of one or more location granularity enums.
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
The location in the structured format.
GeocodeLocationResponse
Response message for GeocodeService.GeocodeLocation
.
Fields | |
---|---|
results[]
|
The geocoding result. |
plus_code
|
Plus code of the location in the request. |
GeocodePlaceRequest
Request message for GeocodeService.GeocodePlace.
Fields | |
---|---|
place
|
Required. Place identifier to geocode in the format of places/{place}. |
language_code
|
Optional. Language in which the results should be returned. |
region_code
|
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
|
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
|
The place ID for this result. |
location
|
The latlng of this address. |
granularity
|
The granularity of the location. |
viewport
|
A viewport suitable for displaying the geocode result. |
bounds
|
A bounding box for the address. |
formatted_address
|
The one line formatted address. |
postal_address
|
The address in postal address format. |
address_components[]
|
Repeated components for each locality level. |
postal_code_localities[]
|
Complete list of localities contained in the postal code. This is only populated when the result is of type "postal_code". |
types[]
|
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
|
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
|
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
|
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[]
|
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
|
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
|
Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000 by 1/8000 degree area (~14 by 14 meters). |
compound_code
|
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. |