buildPositionedForOverlay method

  1. @override
Positioned buildPositionedForOverlay(
  1. MapState map
)
override

Implementation

@override
Positioned buildPositionedForOverlay(MapState map) {
  final pixelOrigin = map.getPixelOrigin();
  // northWest is not necessarily upperLeft depending on projection
  final bounds = Bounds<num>(
    map.project(this.bounds.northWest) - pixelOrigin,
    map.project(this.bounds.southEast) - pixelOrigin,
  );
  return Positioned(
      left: bounds.topLeft.x.toDouble(),
      top: bounds.topLeft.y.toDouble(),
      width: bounds.size.x.toDouble(),
      height: bounds.size.y.toDouble(),
      child: buildImageForOverlay());
}