RectangularBounds

public abstract class RectangularBounds extends Object
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.

Inherited Constant Summary

Public Constructor Summary

Public Method Summary

abstract LatLng
getNortheast()
Returns the northeast corner of the rectangular bounds, specified by its latitude-longitude coordinates.
abstract LatLng
getSouthwest()
Returns the southwest corner of the rectangular bounds, specified by its latitude-longitude coordinates.
static RectangularBounds
newInstance(LatLng southwest, LatLng northeast)
Returns an instance of RectangularBounds.
static RectangularBounds
newInstance(LatLngBounds bounds)
Returns an instance of RectangularBounds.

Inherited Method Summary

Public Constructors

public RectangularBounds ()

Public Methods

public abstract LatLng getNortheast ()

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

This value should not be modified.

public abstract LatLng getSouthwest ()

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

This value should not be modified.

public static RectangularBounds newInstance (LatLng southwest, LatLng northeast)

Returns an instance of RectangularBounds.

Parameters
southwest
northeast
Throws
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.

public static RectangularBounds newInstance (LatLngBounds bounds)

Returns an instance of RectangularBounds.

Parameters
bounds