GebetaMap constructor
const
GebetaMap({
- Key? key,
- required CameraPosition initialCameraPosition,
- String styleString = MapLibreStyles.demo,
- MapCreatedCallback? onMapCreated,
- OnStyleLoadedCallback? onStyleLoadedCallback,
- Set<
Factory< ? gestureRecognizers,OneSequenceGestureRecognizer> > - bool compassEnabled = true,
- CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded,
- MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded,
- bool rotateGesturesEnabled = true,
- bool scrollGesturesEnabled = true,
- bool zoomGesturesEnabled = true,
- bool tiltGesturesEnabled = true,
- bool? doubleClickZoomEnabled,
- bool dragEnabled = true,
- bool trackCameraPosition = false,
- bool myLocationEnabled = false,
- MyLocationTrackingMode myLocationTrackingMode = MyLocationTrackingMode.none,
- MyLocationRenderMode myLocationRenderMode = MyLocationRenderMode.normal,
- Point<
num> ? logoViewMargins, - CompassViewPosition? compassViewPosition,
- Point<
num> ? compassViewMargins, - AttributionButtonPosition? attributionButtonPosition = AttributionButtonPosition.bottomRight,
- Point<
num> ? attributionButtonMargins, - Duration? iosLongClickDuration,
- OnMapClickCallback? onMapClick,
- OnUserLocationUpdated? onUserLocationUpdated,
- OnMapClickCallback? onMapLongClick,
- OnCameraTrackingDismissedCallback? onCameraTrackingDismissed,
- OnCameraTrackingChangedCallback? onCameraTrackingChanged,
- OnCameraIdleCallback? onCameraIdle,
- OnMapIdleCallback? onMapIdle,
- TransformRequestCallback? transformRequest,
- String? apiKey,
- List<
AnnotationType> annotationOrder = const [AnnotationType.line, AnnotationType.symbol, AnnotationType.circle, AnnotationType.fill], - 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);