MapOptions constructor
MapOptions({
- Crs crs = CRS.EPSG3857,
- dynamic center,
- Size? size,
- ZoomOptions? zoomOptions,
- double rotation = rotationDef,
- bool disableRotation = disableRotationDef,
- bool showCenterMarker = showCenterMarkerDef,
- num? centerMarkerSize,
- dynamic centerMarker = markerDef,
- bool live = liveDef,
- bool moveWhenLive = moveWhenLiveDef,
- bool showLocator = showLocatorDef,
- Locator? locator,
- dynamic locationMarker = markerDef,
- num? locationMarkerSize,
- bool showLocationMarker = showLocationMarkerDef,
- bool showLocationIndicator = showLocationIndicatorDef,
- LocationIndicator? locationIndicator,
- bool showCompass = showCompassDef,
- Compass? compass,
- bool showScale = showScaleDef,
- Scale? scale,
- bool interactive = interactiveDef,
- LatLngBounds? maxBounds,
- LatLngBounds? fitBounds,
- FitBoundsOptions? fitBoundsOptions,
- bool slideOnBoundaries = slideOnBoundariesDef,
- bool adaptiveBoundaries = adaptiveBoundariesDef,
- dynamic onTap()?,
- dynamic onLongPress()?,
- MapChangedCallback? onChanged,
- Function? onReady,
- String attribution = attributionDef,
- bool hideAttribution = hideAttributionDef,
Implementation
MapOptions({
this.crs = CRS.EPSG3857,
dynamic center,
this.size,
ZoomOptions? zoomOptions,
this.rotation = rotationDef,
this.disableRotation = disableRotationDef,
this.showCenterMarker = showCenterMarkerDef,
num? centerMarkerSize,
this.centerMarker = markerDef,
this.live = liveDef,
this.moveWhenLive = moveWhenLiveDef,
this.showLocator = showLocatorDef,
this.locator,
this.locationMarker = markerDef,
num? locationMarkerSize,
this.showLocationMarker = showLocationMarkerDef,
this.showLocationIndicator = showLocationIndicatorDef,
this.locationIndicator,
this.showCompass = showCompassDef,
this.compass,
this.showScale = showScaleDef,
this.scale,
this.interactive = interactiveDef,
this.maxBounds,
this.fitBounds,
FitBoundsOptions? fitBoundsOptions,
this.slideOnBoundaries = slideOnBoundariesDef,
this.adaptiveBoundaries = adaptiveBoundariesDef,
this.onTap,
this.onLongPress,
this.onChanged,
this.onReady,
this.attribution = attributionDef,
this.hideAttribution = hideAttributionDef,
}) : assert(center is LatLng ||
center is String ||
(center is List &&
center.isNotEmpty &&
(center.first is int || center.first is double))),
center = (center is LatLng ||
(center is List &&
center.isNotEmpty &&
(center.first is int || center.first is double)))
? LatLng.from(center)
: null,
centerMarkerSize = centerMarkerSize?.toDouble() ?? markerSizeDef,
locationMarkerSize = locationMarkerSize?.toDouble() ?? markerSizeDef,
centerQuery = center is String ? center : null,
zoomOptions = zoomOptions ?? ZoomOptions(),
fitBoundsOptions = fitBoundsOptions ?? const FitBoundsOptions();