MapOptions constructor

const MapOptions({
  1. Crs crs = const Epsg3857(),
  2. LatLng initialCenter = const LatLng(50.5, 30.51),
  3. double initialZoom = 13.0,
  4. double initialRotation = 0.0,
  5. CameraFit? initialCameraFit,
  6. CameraConstraint cameraConstraint = const CameraConstraint.unconstrained(),
  7. InteractionOptions interactionOptions = const InteractionOptions(),
  8. double? minZoom,
  9. double? maxZoom,
  10. Color backgroundColor = const Color(0xFFE0E0E0),
  11. TapCallback? onTap,
  12. TapCallback? onSecondaryTap,
  13. LongPressCallback? onLongPress,
  14. PointerDownCallback? onPointerDown,
  15. PointerUpCallback? onPointerUp,
  16. PointerCancelCallback? onPointerCancel,
  17. PointerHoverCallback? onPointerHover,
  18. PositionCallback? onPositionChanged,
  19. MapEventCallback? onMapEvent,
  20. VoidCallback? onMapReady,
  21. bool keepAlive = false,
  22. @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,
});