Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.maryanovsky.map.client
Class LatLngBounds

    java.lang.Object
      com.maryanovsky.map.client.LatLngBounds

    public class LatLngBounds

extends Object

Represents an area bounded by minimum and maximum latitude and longitude values (a rectangle, in geographical coordinates). The area can cross the 180 degree meridian.

Author:
  Maryanovsky Alexander

Constructor Summary
`LatLngBounds(LatLng point)` Creates a new `LatLngBounds` that represents an empty rectangle centered at the specified point.
`LatLngBounds(LatLng southWest, LatLng northEast)` Creates a new `LatLngBounds` that represents the rectangle bounded by the specified south-west and north-east points.

Method Summary
`boolean` | `contains(LatLng point)` Returns whether this `LatLngBounds` contains the specified point.
`boolean` | `contains(LatLngBounds bounds)` Returns whether this `LatLngBounds` contains the specified one.
`static LatLngBounds` | `create(LatLng point1, LatLng point2, LatLng include)` Creates a new `LatLngBounds` that represents the rectangle bounded by `point1` and `point2` and that contains the `include` point (there two are possible rectangles bounded by two points).
`boolean` | `crosses180Meridian()` Returns whether this `LatLngBounds` crosses the 180 meridian.
`LatLng` | `getCenter()` Returns the center point.
`LatLngBounds` | `getExtended(LatLng point)` Returns a new `LatLngBounds` which extends the current one in the minimal possible way to include the specified point too.
`double` | `getLatitudalSpan()` Returns the latitudal span of this `LatLngBounds`.
`double` | `getLongitudalSpan()` Returns the longitudal span of this `LatLngBounds`.
`LatLng` | `getNorthEast()` Returns the north-eastern point.
`LatLng` | `getSouthWest()` Returns the south-western point.
`boolean` | `spansFullLatitude()` Returns whether this `LatLngBounds` spans the entire planet latitudally.
`boolean` | `spansFullLongitude()` Returns whether this `LatLngBounds` spans the entire planet longitudally.
`String` | `toString()` Returns a textual representation of this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### LatLngBounds

    public LatLngBounds(LatLng point)

  Creates a new `LatLngBounds` that represents an empty rectangle centered at the specified point.

### LatLngBounds

    public LatLngBounds(LatLng southWest,
                        LatLng northEast)

  Creates a new `LatLngBounds` that represents the rectangle bounded by the specified south-west and north-east points. Note that the latitude of `southWest` may not be larger than that of `northEast`, but its longitue may be, in which case the represented area will cross the 180 degree meridian.

Method Detail

### create

    public static LatLngBounds create(LatLng point1,
                                      LatLng point2,
                                      LatLng include)

  Creates a new `LatLngBounds` that represents the rectangle bounded by `point1` and `point2` and that contains the `include` point (there two are possible rectangles bounded by two points).

### getSouthWest

    public LatLng getSouthWest()

  Returns the south-western point.

### getNorthEast

    public LatLng getNorthEast()

  Returns the north-eastern point.

### getCenter

    public LatLng getCenter()

  Returns the center point.

### crosses180Meridian

    public boolean crosses180Meridian()

  Returns whether this `LatLngBounds` crosses the 180 meridian. This occurs when the longitude of the south-west point is larger than that of the north-east point.

### spansFullLatitude

    public boolean spansFullLatitude()

  Returns whether this `LatLngBounds` spans the entire planet latitudally.

### spansFullLongitude

    public boolean spansFullLongitude()

  Returns whether this `LatLngBounds` spans the entire planet longitudally.

### contains

    public boolean contains(LatLng point)

  Returns whether this `LatLngBounds` contains the specified point.

### contains

    public boolean contains(LatLngBounds bounds)

  Returns whether this `LatLngBounds` contains the specified one.

### getLatitudalSpan

    public double getLatitudalSpan()

  Returns the latitudal span of this `LatLngBounds`.

### getLongitudalSpan

    public double getLongitudalSpan()

  Returns the longitudal span of this `LatLngBounds`.

### getExtended

    public LatLngBounds getExtended(LatLng point)

  Returns a new `LatLngBounds` which extends the current one in the minimal possible way to include the specified point too.

### toString

    public String toString()

  Returns a textual representation of this object.

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD