RectangularBounds

public abstract class RectangularBounds implements LocationBias, LocationRestriction


Represents a rectangle-shaped bounds around a geographical area, defined by the latitude-longitude coordinates of the southwest and northeast corners.

This type of bounds can be used for location biases and restrictions.

Summary

Public constructors

Public methods

abstract LatLng

Returns the northeast corner of the rectangular bounds, specified by its latitude-longitude coordinates.

abstract LatLng

Returns the southwest corner of the rectangular bounds, specified by its latitude-longitude coordinates.

static RectangularBounds

Returns an instance of RectangularBounds.

static RectangularBounds
newInstance(LatLng southwest, LatLng northeast)

Returns an instance of RectangularBounds.

Inherited Constants

From android.os.Parcelable
static final int
static final int
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int
int
abstract void
writeToParcel(Parcel p, int p1)

Public constructors

RectangularBounds

public RectangularBounds()

Public methods

getNortheast

public abstract LatLng getNortheast()

Returns the northeast corner of the rectangular bounds, specified by its latitude-longitude coordinates.

This value should not be modified.

getSouthwest

public abstract LatLng getSouthwest()

Returns the southwest corner of the rectangular bounds, specified by its latitude-longitude coordinates.

This value should not be modified.

newInstance

public static RectangularBounds newInstance(LatLngBounds bounds)

Returns an instance of RectangularBounds.

newInstance

public static RectangularBounds newInstance(LatLng southwest, LatLng northeast)

Returns an instance of RectangularBounds.

Throws
java.lang.IllegalArgumentException

If the latitude of the northeast corner is below the latitude of the southwest corner; a rectangle viewport cannot be wider than 180 degrees.