MapOptions constructor

MapOptions({
  1. Crs crs = const Epsg3857(),
  2. LatLng? center,
  3. LatLngBounds? bounds,
  4. FitBoundsOptions boundsOptions = const FitBoundsOptions(),
  5. double zoom = 13.0,
  6. double rotation = 0.0,
  7. bool debugMultiFingerGestureWinner = false,
  8. bool enableMultiFingerGestureRace = false,
  9. double rotationThreshold = 20.0,
  10. int rotationWinGestures = MultiFingerGesture.rotate,
  11. double pinchZoomThreshold = 0.5,
  12. int pinchZoomWinGestures = MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
  13. double pinchMoveThreshold = 40.0,
  14. int pinchMoveWinGestures = MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
  15. bool enableScrollWheel = true,
  16. double scrollWheelVelocity = 0.005,
  17. double? minZoom,
  18. double? maxZoom,
  19. int interactiveFlags = InteractiveFlag.all,
  20. TapCallback? onTap,
  21. TapCallback? onSecondaryTap,
  22. LongPressCallback? onLongPress,
  23. PointerDownCallback? onPointerDown,
  24. PointerUpCallback? onPointerUp,
  25. PointerCancelCallback? onPointerCancel,
  26. PointerHoverCallback? onPointerHover,
  27. PositionCallback? onPositionChanged,
  28. MapEventCallback? onMapEvent,
  29. void onMapReady()?,
  30. bool slideOnBoundaries = false,
  31. bool adaptiveBoundaries = false,
  32. Size? screenSize,
  33. LatLng? swPanBoundary,
  34. LatLng? nePanBoundary,
  35. LatLngBounds? maxBounds,
  36. bool keepAlive = false,
})

Implementation

MapOptions({
  this.crs = const Epsg3857(),
  LatLng? center,
  this.bounds,
  this.boundsOptions = const FitBoundsOptions(),
  this.zoom = 13.0,
  this.rotation = 0.0,
  this.debugMultiFingerGestureWinner = false,
  this.enableMultiFingerGestureRace = false,
  this.rotationThreshold = 20.0,
  this.rotationWinGestures = MultiFingerGesture.rotate,
  this.pinchZoomThreshold = 0.5,
  this.pinchZoomWinGestures =
      MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
  this.pinchMoveThreshold = 40.0,
  this.pinchMoveWinGestures =
      MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
  this.enableScrollWheel = true,
  this.scrollWheelVelocity = 0.005,
  this.minZoom,
  this.maxZoom,
  this.interactiveFlags = InteractiveFlag.all,
  this.onTap,
  this.onSecondaryTap,
  this.onLongPress,
  this.onPointerDown,
  this.onPointerUp,
  this.onPointerCancel,
  this.onPointerHover,
  this.onPositionChanged,
  this.onMapEvent,
  this.onMapReady,
  this.slideOnBoundaries = false,
  this.adaptiveBoundaries = false,
  this.screenSize,
  this.swPanBoundary,
  this.nePanBoundary,
  this.maxBounds,
  this.keepAlive = false,
})  : center = center ?? const LatLng(50.5, 30.51),
      assert(rotationThreshold >= 0.0),
      assert(pinchZoomThreshold >= 0.0),
      assert(pinchMoveThreshold >= 0.0) {
  assert(!adaptiveBoundaries || screenSize != null,
      'screenSize must be set in order to enable adaptive boundaries.');
}