MapboxMap constructor

const MapboxMap({
  1. Key? key,
  2. required CameraPosition initialCameraPosition,
  3. String? accessToken,
  4. MapCreatedCallback? onMapCreated,
  5. OnStyleLoadedCallback? onStyleLoadedCallback,
  6. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers,
  7. bool compassEnabled = true,
  8. CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded,
  9. String? styleString,
  10. MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded,
  11. bool rotateGesturesEnabled = true,
  12. bool scrollGesturesEnabled = true,
  13. bool zoomGesturesEnabled = true,
  14. bool tiltGesturesEnabled = true,
  15. bool? doubleClickZoomEnabled,
  16. bool dragEnabled = true,
  17. bool trackCameraPosition = false,
  18. bool myLocationEnabled = false,
  19. MyLocationTrackingMode myLocationTrackingMode = MyLocationTrackingMode.None,
  20. MyLocationRenderMode myLocationRenderMode = MyLocationRenderMode.COMPASS,
  21. Point<num>? logoViewMargins,
  22. CompassViewPosition? compassViewPosition,
  23. Point<num>? compassViewMargins,
  24. AttributionButtonPosition? attributionButtonPosition,
  25. Point<num>? attributionButtonMargins,
  26. OnMapClickCallback? onMapClick,
  27. OnUserLocationUpdated? onUserLocationUpdated,
  28. OnMapClickCallback? onMapLongClick,
  29. OnAttributionClickCallback? onAttributionClick,
  30. OnCameraTrackingDismissedCallback? onCameraTrackingDismissed,
  31. OnCameraTrackingChangedCallback? onCameraTrackingChanged,
  32. OnCameraIdleCallback? onCameraIdle,
  33. OnMapIdleCallback? onMapIdle,
  34. List<AnnotationType> annotationOrder = const [AnnotationType.line, AnnotationType.symbol, AnnotationType.circle, AnnotationType.fill],
  35. List<AnnotationType> annotationConsumeTapEvents = const [AnnotationType.symbol, AnnotationType.fill, AnnotationType.line, AnnotationType.circle],
})

Implementation

const MapboxMap({
  Key? key,
  required this.initialCameraPosition,
  this.accessToken,
  this.onMapCreated,
  this.onStyleLoadedCallback,
  this.gestureRecognizers,
  this.compassEnabled = true,
  this.cameraTargetBounds = CameraTargetBounds.unbounded,
  this.styleString,
  this.minMaxZoomPreference = MinMaxZoomPreference.unbounded,
  this.rotateGesturesEnabled = true,
  this.scrollGesturesEnabled = true,
  this.zoomGesturesEnabled = true,
  this.tiltGesturesEnabled = true,
  this.doubleClickZoomEnabled,
  this.dragEnabled = true,
  this.trackCameraPosition = false,
  this.myLocationEnabled = false,
  this.myLocationTrackingMode = MyLocationTrackingMode.None,
  this.myLocationRenderMode = MyLocationRenderMode.COMPASS,
  this.logoViewMargins,
  this.compassViewPosition,
  this.compassViewMargins,
  this.attributionButtonPosition,
  this.attributionButtonMargins,
  this.onMapClick,
  this.onUserLocationUpdated,
  this.onMapLongClick,
  this.onAttributionClick,
  this.onCameraTrackingDismissed,
  this.onCameraTrackingChanged,
  this.onCameraIdle,
  this.onMapIdle,
  this.annotationOrder = const [
    AnnotationType.line,
    AnnotationType.symbol,
    AnnotationType.circle,
    AnnotationType.fill,
  ],
  this.annotationConsumeTapEvents = const [
    AnnotationType.symbol,
    AnnotationType.fill,
    AnnotationType.line,
    AnnotationType.circle,
  ],
})  : assert(annotationOrder.length <= 4),
      assert(annotationConsumeTapEvents.length > 0),
      super(key: key);