fitLine method

Future<void> fitLine(
  1. String name
)

Fit bounds and zoom the map to center on a line

Implementation

Future<void> fitLine(String name) async {
  final line = _linesState.namedLines[name];
  final bounds = LatLngBounds();
  line.points.forEach(bounds.extend);
  mapController.fitBounds(bounds);
}