BoundingBox class Null safety

A BoundingBox is a rectangular region in a coordinate system, generally used to define the extent of a Feature or FeatureCollection. A BoundingBox can be created from a Coordinate or a WKT String.

Example:

BoundingBox(1, 2, 3, 4); // BoundingBox(1, 2, 3, 4)
BoundingBox(1, 2, 3, 4).toWKT(); // POLYGON((1 2, 3 2, 3 4, 1 4, 1 2))

Constructors

BoundingBox(double minLong, double minLat, double maxLong, double maxLat)
BoundingBox.empty()
Creates an empty BoundingBox. This is the default value for BoundingBoxs.
factory
BoundingBox.fromCoordinates(List<Coordinate> coordinates)
Creates a BoundingBox from a List of Coordinates. The List must contain at least two Coordinates. It's very similar to BoundingBox.fromPoints, but it's designed for use with Coordinates.
factory
BoundingBox.fromPoints(List<Point> points)
Creates a BoundingBox for a List of Coordinates. The List must contain at least two Coordinates.
factory

Properties

center Coordinate
Get the center Point of the BoundingBox.
read-only
hashCode int
The hash code for this object.
read-only, inherited
maxLat double
final
maxLong double
final
minLat double
final
minLong double
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toList() List<double>
Returns a List of double values representing the BoundingBox in the format minLong, minLat, maxLong, maxLat.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

type String
final