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 } }
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-08-31。"],[],["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"]]