Location

Container that represents a location.

JSON representation
{
  "coordinates": {
    object (LatLng)
  },
  "formattedAddress": string,
  "zipCode": string,
  "city": string,
  "postalAddress": {
    object (PostalAddress)
  },
  "name": string,
  "phoneNumber": string,
  "notes": string,
  "placeId": string
}
Fields
coordinates

object (LatLng)

Geo coordinates. Requires the DEVICE_PRECISE_LOCATION permission.

formattedAddress

string

Display address, e.g., "1600 Amphitheatre Pkwy, Mountain View, CA 94043". Requires the DEVICE_PRECISE_LOCATION permission.

zipCode

string

Zip code. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.

city

string

city. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.

postalAddress

object (PostalAddress)

Postal address. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.

name

string

name of the place.

phoneNumber

string

Phone number of the location, e.g. contact number of business location or phone number for delivery location.

notes

string

Notes about the location.

placeId

string

placeId is used with Places API to fetch details of a place. See https://developers.google.com/places/web-service/place-id

LatLng

An object representing a latitude/longitude pair. This is expressed as a pair of doubles representing degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.

JSON representation
{
  "latitude": number,
  "longitude": number
}
Fields
latitude

number

The latitude in degrees. It must be in the range [-90.0, +90.0].

longitude

number

The longitude in degrees. It must be in the range [-180.0, +180.0].