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.
GeocodeAddress |
---|
This method performs an address geocode, which maps an address to a LatLng. It also provides structured information about the address.
|
GeocodeLocation |
---|
This method performs a location geocode, which maps a LatLng to an address. It also provides structured information about the address.
|
GeocodePlace |
---|
This method performs a geocode lookup using a place ID.
|
GeocodeAddressRequest
Request message for GeocodeService.GeocodeAddress.
Fields | |
---|---|
location_bias |
Optional. The region to search. This location serves as a bias which means results around given location might be returned. |
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. 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 |
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.
Fields | |
---|---|
Union field type . Types of location bias. type can be only one of the following: |
|
rectangle |
A rectangle box defined by northeast and southwest corner. |
GeocodeAddressResponse
Response message for GeocodeService.GeocodeAddress
.
Fields | |
---|---|
results[] |
The geocoding result. |
GeocodeLocationRequest
Request message for GeocodeService.GeocodeLocation.
Fields | |
---|---|
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. |
types[] |
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. |
Union field location_input . The location to geocode. location_input can be only one of the following: |
|
location_query |
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. |