GebetaMap constructor

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

Implementation

const GebetaMap({
  super.key,
  required this.initialCameraPosition,
  this.styleString = MapLibreStyles.demo,
  this.onMapCreated,
  this.onStyleLoadedCallback,
  this.gestureRecognizers,
  this.compassEnabled = true,
  this.cameraTargetBounds = CameraTargetBounds.unbounded,
  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.normal,
  this.logoViewMargins,
  this.compassViewPosition,
  this.compassViewMargins,
  this.attributionButtonPosition = AttributionButtonPosition.bottomRight,
  this.attributionButtonMargins,
  this.iosLongClickDuration,
  this.onMapClick,
  this.onUserLocationUpdated,
  this.onMapLongClick,
  this.onCameraTrackingDismissed,
  this.onCameraTrackingChanged,
  this.onCameraIdle,
  this.onMapIdle,
  this.transformRequest,
  this.apiKey,
  this.annotationOrder = const [
    AnnotationType.line,
    AnnotationType.symbol,
    AnnotationType.circle,
    AnnotationType.fill,
  ],
  this.annotationConsumeTapEvents = const [
    AnnotationType.symbol,
    AnnotationType.fill,
    AnnotationType.line,
    AnnotationType.circle,
  ],
})  : assert(
        myLocationRenderMode == MyLocationRenderMode.normal ||
            myLocationEnabled,
        "$myLocationRenderMode requires [myLocationEnabled] set to true.",
      ),
      assert(annotationOrder.length <= 4),
      assert(annotationConsumeTapEvents.length > 0);