Location
Stay organized with collections
Save and categorize content based on your preferences.
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
} |
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].
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\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\\]. |"]]