buildPositionedForOverlay method

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

Implementation

@override
Positioned buildPositionedForOverlay(FlutterMapState map) {
  // northWest is not necessarily upperLeft depending on projection
  final bounds = Bounds<num>(
    map.project(this.bounds.northWest) - map.pixelOrigin,
    map.project(this.bounds.southEast) - map.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());
}