BoundingBox class

A BoundingBox represents an immutable set of two latitude and two longitude coordinates.

Constructors

BoundingBox(double minLatitude, double minLongitude, double maxLatitude, double maxLongitude)
@param minLatitude the minimum latitude coordinate in degrees. @param minLongitude the minimum longitude coordinate in degrees. @param maxLatitude the maximum latitude coordinate in degrees. @param maxLongitude the maximum longitude coordinate in degrees. @throws IllegalArgumentException if a coordinate is invalid.

Properties

hashCode int
The hash code for this object. [...]
read-only, override
maxLatitude double
The maximum latitude coordinate of this BoundingBox in degrees.
read / write
maxLongitude double
The maximum longitude coordinate of this BoundingBox in degrees.
read / write
minLatitude double
The minimum latitude coordinate of this BoundingBox in degrees.
read / write
minLongitude double
The minimum longitude coordinate of this BoundingBox in degrees.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

contains(double latitude, double longitude) bool
@param latitude the latitude coordinate in degrees. @param longitude the longitude coordinate in degrees. @return true if this BoundingBox contains the given coordinates, false otherwise.
containsLatLong(LatLong latLong) bool
@param latLong the LatLong whose coordinates should be checked. @return true if this BoundingBox contains the given LatLong, false otherwise.
extendBoundingBox(BoundingBox boundingBox) BoundingBox
@param boundingBox the BoundingBox which this BoundingBox should be extended if it is larger @return a BoundingBox that covers this BoundingBox and the given BoundingBox.
extendMeters(int meters) BoundingBox
Creates a BoundingBox that is a fixed meter amount larger on all sides (but does not cross date line/poles). [...]
getCenterPoint() LatLong
@return a new LatLong at the horizontal and vertical center of this BoundingBox.
getLatitudeSpan() double
@return the latitude span of this BoundingBox in degrees.
getLongitudeSpan() double
@return the longitude span of this BoundingBox in degrees.
intersects(BoundingBox boundingBox) bool
@param boundingBox the BoundingBox which should be checked for intersection with this BoundingBox. @return true if this BoundingBox intersects with the given BoundingBox, false otherwise.
intersectsArea(List<List<ILatLong>> latLongs) bool
Returns if an area built from the latLongs intersects with a bias towards returning true. The method returns fast if any of the points lie within the bbox. If none of the points lie inside the box, it constructs the outer bbox for all the points and tests for intersection (so it is possible that the area defined by the points does not actually intersect) [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
override