MapOptions({Crscrs = const Epsg3857(), @Deprecated('Prefer `initialCenter` instead. ' 'This option has been renamed to clarify its meaning. ' 'This option is deprecated since v6.')LatLng?center, LatLnginitialCenter = const LatLng(50.5, 30.51), @Deprecated('Prefer `initialZoom` instead. ' 'This option has been renamed to clarify its meaning. ' 'This option is deprecated since v6.')double?zoom, doubleinitialZoom = 13.0, @Deprecated('Prefer `initialRotation` instead. ' 'This option has been renamed to clarify its meaning. ' 'This option is deprecated since v6.')double?rotation, doubleinitialRotation = 0.0, @Deprecated('Prefer `initialCameraFit` instead. ' 'This option is now part of `initalCameraFit`. ' 'This option is deprecated since v6.')LatLngBounds?bounds, @Deprecated('Prefer `initialCameraFit` instead. ' 'This option is now part of `initalCameraFit`. ' 'This option is deprecated since v6.')FitBoundsOptionsboundsOptions = const FitBoundsOptions(), CameraFit?initialCameraFit, CameraConstraint?cameraConstraint, InteractionOptions?interactionOptions, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')int?interactiveFlags, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')bool?debugMultiFingerGestureWinner, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')bool?enableMultiFingerGestureRace, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')double?rotationThreshold, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')int?rotationWinGestures, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')double?pinchZoomThreshold, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')int?pinchZoomWinGestures, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')double?pinchMoveThreshold, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')int?pinchMoveWinGestures, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')bool?enableScrollWheel, @Deprecated('Prefer setting this in `interactionOptions`. ' 'This option is now part of `interactionOptions` to group all interaction related options. ' 'This option is deprecated since v6.')double?scrollWheelVelocity, double?minZoom, double?maxZoom, ColorbackgroundColor = const Color(0xFFE0E0E0), TapCallback?onTap, TapCallback?onSecondaryTap, LongPressCallback?onLongPress, PointerDownCallback?onPointerDown, PointerUpCallback?onPointerUp, PointerCancelCallback?onPointerCancel, PointerHoverCallback?onPointerHover, PositionCallback?onPositionChanged, MapEventCallback?onMapEvent, VoidCallback?onMapReady, @Deprecated('Prefer `cameraConstraint` instead. ' 'This option is now replaced by `cameraConstraint` which provides more flexibile limiting of the map position. ' 'This option is deprecated since v6.')LatLngBounds?maxBounds, boolkeepAlive = false, boolapplyPointerTranslucencyToLayers = true})
Note that this getter exists to make sure that the deprecated maxBounds
option is consistently used. Making this a getter allows the constructor
to remain const.
OnMapReady is called after the map runs it's initState.
At that point the map has assigned its state to the controller
Only use this if your map isn't built immediately (like inside FutureBuilder)
and you need to access the controller as soon as the map is built.
Otherwise you can use WidgetsBinding.instance.addPostFrameCallback
In initState to controll the map before the next frame.