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-07-02 UTC。
[null,null,["最終更新日 2024-07-02 UTC。"],[[["A Viewport is defined by two points, `low` and `high`, representing the southwest and northeast corners of a rectangular area on a map."],["It's crucial that `low` latitude is less than `high` latitude and, generally, `low` longitude is less than `high` longitude for the viewport to be valid."],["The viewport encompasses all points within its boundaries, including the boundary lines themselves."],["Special cases exist where longitude ranges can be inverted or represent the entire globe, but latitude ranges must be logically ordered."],["Both `low` and `high` points are mandatory, and the resulting viewport cannot be empty, otherwise, an error will occur."]]],["A Viewport, defined by `low` and `high` latitude-longitude points, represents a closed region. Both `low` and `high` points are mandatory. Longitude ranges can be inverted, crossing the 180-degree line, or encompass all longitudes. Latitude ranges, if `low` is greater than `high` are empty. A viewport can be a single point when `low` equals `high`. An empty viewport, when both are equal, results in an error.\n"]]