Location

表示营业地点的容器。

JSON 表示法
{
  "coordinates": {
    object (LatLng)
  },
  "formattedAddress": string,
  "zipCode": string,
  "city": string,
  "postalAddress": {
    object (PostalAddress)
  },
  "name": string,
  "phoneNumber": string,
  "notes": string,
  "placeId": string
}
字段
coordinates

object (LatLng)

地理坐标。需要 DEVICE_PRECISE_LOCATION 权限。

formattedAddress

string

显示地址,例如“1600 Amphitheatre Pkwy, Mountain View, CA 94043”。需要 DEVICE_PRECISE_LOCATION 权限。

zipCode

string

邮政编码。需要 DEVICE_PRECISE_LOCATIONDEVICE_COARSE_LOCATION 权限。

city

string

城市。需要 DEVICE_PRECISE_LOCATIONDEVICE_COARSE_LOCATION 权限。

postalAddress

object (PostalAddress)

邮寄地址。需要 DEVICE_PRECISE_LOCATIONDEVICE_COARSE_LOCATION 权限。

name

string

地点的名称。

phoneNumber

string

地点的电话号码,例如营业地点的联系电话或送货地点的电话号码。

notes

string

关于地点的备注。

placeId

string

placeId 将与 Places API 搭配使用,用于提取地点的详细信息。请参阅 https://developers.google.com/places/web-service/place-id

LatLng

一个表示纬度/经度对的对象。该对象以一对双精度数(分别代表纬度度数和经度度数)来表示。除非另有说明,否则该对象必须符合 WGS84 标准。值必须介于标准化范围内。

JSON 表示法
{
  "latitude": number,
  "longitude": number
}
字段
latitude

number

纬度(以度为单位)。它必须在 [-90.0, +90.0] 范围内。

longitude

number

经度(以度为单位)。它必须在 [-180.0, +180.0] 范围内。