public final class LatLngBounds Extensions Object
using Parcelable
using Parcelable
緯度と経度で揃えられた長方形を表す不変のクラス。
ネストクラスの概要
| クラス | LatLngBounds.Builder | これは、LatLng ポイントのセットに基づいて最小境界を作成できるビルダーです。 | |
継承された定数の概要
フィールドの概要
| public final LatLng | northeast | 境界の北東の角。 |
| public final LatLng | 南西 | 境界の南西の角。 |
パブリック コンストラクタの概要
パブリック メソッドの概要
| static LatLngBounds.Builder |
builder()
新しいビルダーを作成します。
|
| ブール値 | |
| static LatLngBounds |
createFromAttributes(コンテキスト コンテキスト、AttributeSet attrs)
AttributeSet から LatLngBounds を作成します。 |
| ブール値 |
equals(Object o)
|
| LatLng |
getCenter()
この LatLngBounds の中心を返します。
|
| 整数 |
hashCode()
|
| LatLngBounds | |
| 文字列 |
toString()
|
継承されたメソッドの概要
フィールド
パブリック コンストラクタ
public LatLngBounds (LatLng southwest、LatLng northeast)
南西と北東の角に基づいて新しい境界を作成します。
境界には、概念的に以下のすべてのポイントが含まれます。
- 緯度の範囲が [northeast.latitude, southwest.latitude]
- southwest.longitude が northeast.longitude 以下の場合、経度は [southwest.longitude, northeast.longitude] の範囲になります。
- southwest.longitude > northeast.longitude の場合、経度は [southwest.longitude, 180) ∪ [-180, northeast.longitude] の範囲になります。
パラメータ
| 南西 | 南西の角 |
|---|---|
| northeast | 北東の角 |
例外
| IllegalArgumentException | 北東の角の緯度が南西の角の緯度よりも低い場合。 |
|---|
パブリック メソッド
public boolean contains (LatLng ポイント)
public static LatLngBounds createFromAttributes (コンテキスト コンテキスト、AttributeSet attrs)
AttributeSet から LatLngBounds を作成します。
パラメータ
| コンテキスト | |
|---|---|
| attrs |
public boolean equals (Object o)
パラメータ
| o |
|---|
public LatLng getCenter ()
この LatLngBounds の中心を返します。中心は座標の平均です(180 度子線と交差しているかどうかも考慮に入れられます)。ここが地理的中心です(地球が完璧な球体だった場合)。メルカトル図法により、地図上に描画された長方形の中心とは限りません。
戻り値
- LatLngBounds の中心となる
LatLng。
public int hashCode ()
public LatLngBounds 含まれる (LatLng ポイント)
指定された LatLng を含むようにこの LatLngBounds を拡張する新しい LatLngBounds を返します。これは、この地点と追加の地点の両方を含む最小の LatLngBounds を返します。
具体的には、境界を東と西の両方(一方が経度を横切る方向)に拡張し、2 つのうち小さい方を選択します。両方向の LatLngBounds が同じサイズの場合は、東方向に拡張されます。
パラメータ
| point | 新しい境界に含める LatLng |
|---|
戻り値
- これとエクストラ ポイントを含む新しい
LatLngBounds。