Package google.geo.type
ビューポート
low
と high
の 2 つの対角線上のポイントとして表される、緯度と経度のビューポート。ビューポートは閉じた領域(境界を含む)とみなされます。緯度の範囲は -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 Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-06-26 UTC。
[null,null,["最終更新日 2024-06-26 UTC。"],[[["A Viewport is defined by two points, `low` and `high`, representing the Southwest and Northeast corners respectively, forming a rectangular area on a map."],["Latitude ranges from -90 to +90 degrees, while longitude ranges from -180 to +180 degrees, inclusive."],["Specific conditions, like inverted longitude or empty latitude ranges, are defined for special viewport scenarios."],["Both `low` and `high` points are mandatory, and the resulting viewport must represent a valid, non-empty area to avoid errors."]]],["A viewport, defined by `low` and `high` latitude-longitude points, represents a closed geographical region. Both `low` and `high` points are mandatory. The longitude range inverts if `low.longitude` exceeds `high.longitude`. Specific cases include single-point viewports if `low` equals `high`, full longitude coverage if the longitude ranges from -180 to 180, and empty ranges if the `low` point exceedes `high` respectively in longitude or latitude. An empty viewport is considered an error.\n"]]