setCameraTargetBounds method

  1. @override
void setCameraTargetBounds(
  1. LatLngBounds? bounds
)
override

Implementation

@override
void setCameraTargetBounds(LatLngBounds? bounds) {
  if (bounds == null) {
    _map.setMaxBounds(null);
  } else {
    _map.setMaxBounds(
      LngLatBounds(
        LngLat(
          bounds.southwest.longitude,
          bounds.southwest.latitude,
        ),
        LngLat(
          bounds.northeast.longitude,
          bounds.northeast.latitude,
        ),
      ),
    );
  }
}