Location
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"coordinates": {
object (LatLng )
},
"formattedAddress": string,
"zipCode": string,
"city": string,
"postalAddress": {
object (PostalAddress )
},
"name": string,
"phoneNumber": string,
"notes": string,
"placeId": string
} |
LatLng
一个表示纬度/经度对的对象。该对象以一对双精度数(分别代表纬度度数和经度度数)来表示。除非另有说明,否则该对象必须符合 WGS84 标准。值必须介于标准化范围内。
JSON 表示法 |
{
"latitude": number,
"longitude": number
} |
字段 |
latitude |
number
纬度(以度为单位)。它必须在 [-90.0, +90.0] 范围内。
|
longitude |
number
经度(以度为单位)。它必须在 [-180.0, +180.0] 范围内。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eLocation\u003c/code\u003e object represents a physical location with properties like coordinates, address, and contact information.\u003c/p\u003e\n"],["\u003cp\u003eAccessing location details like coordinates, formatted address, zip code, and city requires specific user permissions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLatLng\u003c/code\u003e object defines a geographic point using latitude and longitude within specified ranges, conforming to the WGS84 standard.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLocation\u003c/code\u003e can include additional details such as postal address, place name, phone number, notes, and a place ID for integration with Places API.\u003c/p\u003e\n"]]],[],null,["# Location\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [LatLng](#LatLng)\n - [JSON representation](#LatLng.SCHEMA_REPRESENTATION)\n\nContainer that represents a location.\n\n| JSON representation ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"coordinates\": { object (/assistant/df-asdk/reference/webhook/rest/Shared.Types/Location#LatLng) }, \"formattedAddress\": string, \"zipCode\": string, \"city\": string, \"postalAddress\": { object (/assistant/df-asdk/reference/webhook/rest/Shared.Types/PostalAddress) }, \"name\": string, \"phoneNumber\": string, \"notes\": string, \"placeId\": string } ``` |\n\n| Fields ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coordinates` | `object (`[LatLng](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Location#LatLng)`)` Geo coordinates. Requires the [DEVICE_PRECISE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_PRECISE_LOCATION) permission. |\n| `formattedAddress` | `string` Display address, e.g., \"1600 Amphitheatre Pkwy, Mountain View, CA 94043\". Requires the [DEVICE_PRECISE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_PRECISE_LOCATION) permission. |\n| `zipCode` | `string` Zip code. Requires the [DEVICE_PRECISE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_PRECISE_LOCATION) or [DEVICE_COARSE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_COARSE_LOCATION) permission. |\n| `city` | `string` city. Requires the [DEVICE_PRECISE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_PRECISE_LOCATION) or [DEVICE_COARSE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_COARSE_LOCATION) permission. |\n| `postalAddress` | `object (`[PostalAddress](/assistant/df-asdk/reference/webhook/rest/Shared.Types/PostalAddress)`)` Postal address. Requires the [DEVICE_PRECISE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_PRECISE_LOCATION) or [DEVICE_COARSE_LOCATION](/assistant/df-asdk/reference/webhook/rest/Shared.Types/Permission#ENUM_VALUES.DEVICE_COARSE_LOCATION) permission. |\n| `name` | `string` name of the place. |\n| `phoneNumber` | `string` Phone number of the location, e.g. contact number of business location or phone number for delivery location. |\n| `notes` | `string` Notes about the location. |\n| `placeId` | `string` placeId is used with Places API to fetch details of a place. See \u003chttps://developers.google.com/places/web-service/place-id\u003e |\n\nLatLng\n------\n\nAn 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](http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf). Values must be within normalized ranges.\n\n| JSON representation ||\n|-----------------------------------------------------|---|\n| ``` { \"latitude\": number, \"longitude\": number } ``` |\n\n| Fields ||\n|-------------|--------------------------------------------------------------------------------|\n| `latitude` | `number` The latitude in degrees. It must be in the range \\[-90.0, +90.0\\]. |\n| `longitude` | `number` The longitude in degrees. It must be in the range \\[-180.0, +180.0\\]. |"]]