MapRectangle class

An immutable rectangle defined by four double coordinates in map pixels.

Constructors

MapRectangle(double left, double top, double right, double bottom)
Creates a new MapRectangle.
const
MapRectangle.from(List<Mappoint> mp1)
Creates a new MapRectangle that encloses all the given points.
factory
MapRectangle.zero()
Creates a new MapRectangle at the origin with zero width and height.
const

Properties

bottom → double
final
hashCode → int
The hash code for this object.
no setterinherited
left → double
final
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
top → double
final

Methods

contains(Mappoint point) → bool
Returns true if this rectangle contains the given point.
containsCoordinates(double x, double y) → bool
Returns true if this rectangle contains the given point.
enlarge(double left, double top, double right, double bottom) → MapRectangle
Creates a new MapRectangle by enlarging this rectangle by the given amounts.
envelope(double padding) → MapRectangle
Creates a new MapRectangle by adding a padding to all sides.
getCenter() → Mappoint
Returns the center point of this rectangle.
getCenterX() → double
Returns the horizontal center of this rectangle.
getCenterY() → double
Returns the vertical center of this rectangle.
getHeight() → double
Returns the height of this rectangle.
getLeftUpper() → Mappoint
Returns the top-left corner of this rectangle.
getRightLower() → Mappoint
Returns the bottom-right corner of this rectangle.
getWidth() → double
Returns the width of this rectangle.
intersects(MapRectangle rectangle) → bool
Returns true if this rectangle intersects with the given rectangle.
intersectsCircle(double pointX, double pointY, double radius) → bool
Returns true if this rectangle intersects with a circle defined by its center (pointX, pointY) and radius.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(Mappoint reference) → MapRectangle
Creates a new MapRectangle by offsetting this rectangle by the given reference point.
shift(Mappoint reference) → MapRectangle
Creates a new MapRectangle by shifting this rectangle by the given reference point.
toString() → String
A string representation of this object.
override

Operators

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