MapOptions constructor
const
MapOptions({
- Crs crs = const Epsg3857(),
- LatLng initialCenter = const LatLng(50.5, 30.51),
- double initialZoom = 13.0,
- double initialRotation = 0.0,
- CameraFit? initialCameraFit,
- CameraConstraint cameraConstraint = const CameraConstraint.unconstrained(),
- InteractionOptions interactionOptions = const InteractionOptions(),
- double? minZoom,
- double? maxZoom,
- Color backgroundColor = const Color(0xFFE0E0E0),
- TapCallback? onTap,
- TapCallback? onSecondaryTap,
- LongPressCallback? onLongPress,
- PointerDownCallback? onPointerDown,
- PointerUpCallback? onPointerUp,
- PointerCancelCallback? onPointerCancel,
- PointerHoverCallback? onPointerHover,
- PositionCallback? onPositionChanged,
- MapEventCallback? onMapEvent,
- VoidCallback? onMapReady,
- bool keepAlive = false,
- @Deprecated('If necessary, manually wrap layers with `TransulcentPointer` widgets. ' 'This parameter will be removed as proper hit detection has now been incorporated into both `PolygonLayer` & `PolylineLayer`, which reduces the need for this workaround, and because it caused issues in some cases. More information about hit detection & interactivity rules can be found in the online documentation. ' 'The default of this parameter is now `false` and will use the rules above - the option is retained so as not to break APIs. ' 'This feature was deprecated (and the default changed) after v7.') bool applyPointerTranslucencyToLayers = false,
Create the map options for FlutterMap.
Implementation
const MapOptions({
this.crs = const Epsg3857(),
this.initialCenter = const LatLng(50.5, 30.51),
this.initialZoom = 13.0,
this.initialRotation = 0.0,
this.initialCameraFit,
this.cameraConstraint = const CameraConstraint.unconstrained(),
this.interactionOptions = const InteractionOptions(),
this.minZoom,
this.maxZoom,
this.backgroundColor = const Color(0xFFE0E0E0),
this.onTap,
this.onSecondaryTap,
this.onLongPress,
this.onPointerDown,
this.onPointerUp,
this.onPointerCancel,
this.onPointerHover,
this.onPositionChanged,
this.onMapEvent,
this.onMapReady,
this.keepAlive = false,
@Deprecated(
'If necessary, manually wrap layers with `TransulcentPointer` widgets. '
'This parameter will be removed as proper hit detection has now been incorporated into both `PolygonLayer` & `PolylineLayer`, which reduces the need for this workaround, and because it caused issues in some cases. More information about hit detection & interactivity rules can be found in the online documentation. '
'The default of this parameter is now `false` and will use the rules above - the option is retained so as not to break APIs. '
'This feature was deprecated (and the default changed) after v7.',
)
this.applyPointerTranslucencyToLayers = false,
});