Package google.geo.type
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
可視區域
經緯度可視區域,以兩個對角相反的 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 } }
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-26 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-02-26 (世界標準時間)。"],[[["A Viewport is defined by two points, 'low' and 'high', representing its southwest and northeast corners, respectively, forming a rectangular area on a map."],["Latitude values for these points must be between -90 and 90 degrees, while longitude values range from -180 to 180 degrees."],["Special cases arise when 'low' and 'high' have certain values, resulting in single points, inverted longitude ranges, or empty areas."],["Both 'low' and 'high' points are required, and they must define a non-empty viewport to avoid errors."]]],["A viewport is defined by two points, `low` and `high`, representing a latitude-longitude region. These points must be populated and form a closed, non-empty area. Latitude ranges from -90 to 90, and longitude from -180 to 180. The longitude range inverts if `low.longitude` exceeds `high.longitude`. Specific conditions define a single point, full longitude inclusion, or empty ranges. `low` and `high` fields are required, represented by latitude and longitude.\n"]]