Place Search 結果的詳細資料。
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[] |
這個結果的一組類型標記。例如「political」和「locality」。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 |
入口的位置。 |