MapOptions constructor
MapOptions({
- bool absorbPanEventsOnScrollables = true,
- Crs crs = const Epsg3857(),
- LatLng? center,
- LatLngBounds? bounds,
- FitBoundsOptions boundsOptions = const FitBoundsOptions(),
- double zoom = 13.0,
- double rotation = 0.0,
- bool debugMultiFingerGestureWinner = false,
- bool enableMultiFingerGestureRace = false,
- double rotationThreshold = 20.0,
- int rotationWinGestures = MultiFingerGesture.rotate,
- double pinchZoomThreshold = 0.5,
- int pinchZoomWinGestures = MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
- double pinchMoveThreshold = 40.0,
- int pinchMoveWinGestures = MultiFingerGesture.pinchZoom | MultiFingerGesture.pinchMove,
- bool enableScrollWheel = true,
- double scrollWheelVelocity = 0.005,
- double? minZoom,
- double? maxZoom,
- int interactiveFlags = InteractiveFlag.all,
- TapCallback? onTap,
- LongPressCallback? onLongPress,
- PointerDownCallback? onPointerDown,
- PointerUpCallback? onPointerUp,
- PointerCancelCallback? onPointerCancel,
- PointerHoverCallback? onPointerHover,
- PositionCallback? onPositionChanged,
- MapEventCallback? onMapEvent,
- void onMapReady()?,
- bool slideOnBoundaries = false,
- bool adaptiveBoundaries = false,
- Size? screenSize,
- LatLng? swPanBoundary,
- LatLng? nePanBoundary,
- LatLngBounds? maxBounds,
- bool keepAlive = false,
Implementation
MapOptions({
this.absorbPanEventsOnScrollables = true,
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.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 ?? 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.');
}