MapOptions constructor

MapOptions({
  1. Crs crs = CRS.EPSG3857,
  2. dynamic center,
  3. Size? size,
  4. ZoomOptions? zoomOptions,
  5. double rotation = rotationDef,
  6. bool disableRotation = disableRotationDef,
  7. bool showCenterMarker = showCenterMarkerDef,
  8. num? centerMarkerSize,
  9. dynamic centerMarker = markerDef,
  10. bool live = liveDef,
  11. bool moveWhenLive = moveWhenLiveDef,
  12. bool showLocator = showLocatorDef,
  13. Locator? locator,
  14. dynamic locationMarker = markerDef,
  15. num? locationMarkerSize,
  16. bool showLocationMarker = showLocationMarkerDef,
  17. bool showLocationIndicator = showLocationIndicatorDef,
  18. LocationIndicator? locationIndicator,
  19. bool showCompass = showCompassDef,
  20. Compass? compass,
  21. bool showScale = showScaleDef,
  22. Scale? scale,
  23. bool interactive = interactiveDef,
  24. LatLngBounds? maxBounds,
  25. LatLngBounds? fitBounds,
  26. FitBoundsOptions? fitBoundsOptions,
  27. bool slideOnBoundaries = slideOnBoundariesDef,
  28. bool adaptiveBoundaries = adaptiveBoundariesDef,
  29. dynamic onTap(
    1. LatLng?
    )?,
  30. dynamic onLongPress(
    1. LatLng?
    )?,
  31. MapChangedCallback? onChanged,
  32. Function? onReady,
  33. String attribution = attributionDef,
  34. 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();