地點搜尋結果的詳細資料。
JSON 表示法 |
---|
{
"place": {
object ( |
欄位 | |
---|---|
place |
地點的詳細資料。 |
distanceMeters |
從搜尋位置到地點幾何圖形或中心的直線距離。 |
地點
地點詳細資料。
JSON 表示法 |
---|
{ "placeId": string, "displayName": string, "languageCode": string, "address": { object ( |
欄位 | |
---|---|
placeId |
地點的 ID。地點 ID 是用來識別特定地點的文字。https://developers.google.com/places/web-service/place-id |
displayName |
經過本地化的地點名稱。依據要求中提供的偏好設定進行本地化。 |
languageCode |
地點相關文字欄位的語言代碼。例如「name」和「address」。 |
address |
地點的地址。 |
geometry |
地點的幾何圖形。 |
types[] |
此結果的類型標記組合。例如「政治」和「行政區劃」。https://developers.google.com/places/web-service/supported_types |
associatedCompounds[] |
與地點相關的化合物。 |
幾何圖形
地點的幾何圖形。
JSON 表示法 |
---|
{ "location": { object ( |
欄位 | |
---|---|
location |
這則訊息的實體中心點。 |
viewport |
適合在平均大小地圖上顯示地點的可視區域。 |
displayBoundary |
使用 GeoJSON 多邊形格式指定多邊形 |
可視區域
經緯度可視區域,以兩個對角相反的 low
和 high
點表示。系統會將可視區域視為封閉區域,也就是包含界線的邊界。緯度邊界必須介於 -90 到 90 度(含),且經度範圍必須介於 -180 到 180 度(含)。各種情況包括:
如果
low
=high
,可視區域就會包含該單一點。如果
low.longitude
>high.longitude
,經度範圍會反轉 (可視區域會跨越 180 度經度線)。如果
low.longitude
= -180 度,high.longitude
= 180 度,可視區域會包含所有經度。如果
low.longitude
= 180 度,high.longitude
= -180 度,則經度範圍會留空。如果
low.latitude
>high.latitude
,則經度範圍為空白。
low
和 high
都必須填入,而代表方塊不得留空 (如上文定義所述)。空白的可視區域會導致錯誤。
舉例來說,這個視區會完全包含紐約市:
{ "low": { "latitude": 40.477398, "longitude": -74.259087 }, "high": { "latitude": 40.91618, "longitude": -73.70018 } }
JSON 表示法 |
---|
{ "low": { object ( |
欄位 | |
---|---|
low |
必要欄位。可視區域的低點。 |
high |
必要欄位。可視區域的高點。 |
建築
與地點相關聯的綜合建築。
JSON 表示法 |
---|
{ "type": enum ( |
欄位 | |
---|---|
type |
化合物類型。 |
geometry |
與化合物相關的幾何圖形。 |
entrances[] |
與化合物相關聯的入口清單。 |
CompoundType
複合型別的值。
列舉 | |
---|---|
COMPOUND_TYPE_UNSPECIFIED |
複合類型不明。 |
SECTION |
複合部分。https://support.google.com/mapskb/answer/7054299 |
BUILDING |
複合建築物。https://support.google.com/mapskb/answer/7013011 |
GROUNDS |
複合地面。https://support.google.com/mapskb/answer/7046859 |
入口
地點的入口,
JSON 表示法 |
---|
{
"location": {
object ( |
欄位 | |
---|---|
location |
入口的位置。 |