boundsAligned2D method
Position?
boundsAligned2D({
- Aligned align = Aligned.center,
- PositionScheme scheme = Position.scheme,
override
Returns an aligned 2D position relative to a bounding box accessed by getBounds.
By default a returned aligned position is a center point, but this can be
customized using align
.
Returns null if getBounds returns null.
Use scheme
to set the position scheme:
Position.scheme
for generic position data (geographic, projected or any other), this is also the defaultProjected.scheme
for projected position dataGeographic.scheme
for geographic position data
Implementation
@override
Position? boundsAligned2D({
Aligned align = Aligned.center,
PositionScheme scheme = Position.scheme,
}) =>
scheme.position.call(
x: position.x,
y: position.y,
);