CyclOSMMap static method

Universe CyclOSMMap({
  1. Key? key,
  2. required dynamic center,
  3. TileLayerOptions? options,
  4. double? zoom,
  5. double? minZoom,
  6. double? maxZoom,
  7. double? rotation,
  8. bool? disableRotation,
  9. Color? background,
  10. MapController? controller,
  11. TileLayer? base,
  12. MarkerLayer? markers,
  13. CircleLayer? circles,
  14. PolylineLayer? polylines,
  15. PolygonLayer? polygons,
  16. RectangleLayer? rectangles,
  17. List<TileLayer> tiles = const [],
  18. List<ImageOverlay> images = const [],
  19. List<VideoOverlay> videos = const [],
  20. List<MapLayer> layers = const [],
  21. List<Widget> controls = const [],
  22. Crs? crs,
  23. Size? size,
  24. bool? live,
  25. bool? moveWhenLive,
  26. dynamic centerMarker,
  27. dynamic locationMarker,
  28. num? centerMarkerSize,
  29. num? locationMarkerSize,
  30. bool? showCenterMarker,
  31. bool? showLocator,
  32. Locator? locator,
  33. bool? showLocationMarker,
  34. bool? showLocationIndicator,
  35. LocationIndicator? locationIndicator,
  36. bool? showCompass,
  37. Compass? compass,
  38. bool? showScale,
  39. Scale? scale,
  40. bool? interactive,
  41. LatLngBounds? maxBounds,
  42. LatLngBounds? fitBounds,
  43. FitBoundsOptions? fitBoundsOptions,
  44. bool? slideOnBoundaries,
  45. bool? adaptiveBoundaries,
  46. bool? hideAttribution,
  47. dynamic onTap(
    1. LatLng?
    )?,
  48. dynamic onLongPress(
    1. LatLng?
    )?,
  49. MapChangedCallback? onChanged,
  50. Function? onReady,
})

Used to display map with base TileLayer from SafeCast.

Example:

U.SafeCastMap(
  controller: MapController(),
  center: [-6.175329, 106.827253],
  zoom: 15,
)

@param: center

Used to define center latlng position of the map. It can accept many types of value:

A list of two (or three) values that represents latitude and longitude (and altitude).

U.SafeCastMap(
  controller: MapController(),
  center: [-6.175329, 106.827253],
  zoom: 15,
)

or an instance of LatLng object:

U.SafeCastMap(
  controller: MapController(),
  center: LatLng(-6.175329, 106.827253),
  zoom: 15,
)

or location name.

The built-in GeoCoder inside will automatically convert it to latlng position for you.

Default to LatLng(0.0, 0.0) if your location is not found.

U.SafeCastMap(
  controller: MapController(),
  center: 'Emirates Stadium',
  zoom: 15,
)

Used to display map with base TileLayer from CyclOSM.

Example:

U.CyclOSMMap(
  controller: MapController(),
  center: [-6.175329, 106.827253],
  zoom: 15,
)

@param: center

Used to define center latlng position of the map. It can accept many types of value:

A list of two (or three) values that represents latitude and longitude (and altitude).

U.CyclOSMMap(
  controller: MapController(),
  center: [-6.175329, 106.827253],
  zoom: 15,
)

or an instance of LatLng object:

U.CyclOSMMap(
  controller: MapController(),
  center: LatLng(-6.175329, 106.827253),
  zoom: 15,
)

or location name.

The built-in GeoCoder inside will automatically convert it to latlng position for you.

Default to LatLng(0.0, 0.0) if your location is not found.

U.CyclOSMMap(
  controller: MapController(),
  center: 'Emirates Stadium',
  zoom: 15,
)

Implementation

// ignore: non_constant_identifier_names
/* static Universe SafeCastMap({
  Key? key,
  required dynamic center,
  L.TileLayerOptions? options,
  double? zoom,
  double? minZoom,
  double? maxZoom,
  double? rotation,
  bool? disableRotation,
  Color? background,
  C.MapController? controller,
  L.TileLayer? base,
  L.MarkerLayer? markers,
  L.CircleLayer? circles,
  L.PolylineLayer? polylines,
  L.PolygonLayer? polygons,
  L.RectangleLayer? rectangles,
  List<L.TileLayer> tiles = const [],
  List<L.ImageOverlay> images = const [],
  List<L.VideoOverlay> videos = const [],
  List<L.MapLayer> layers = const [],
  List<Widget> controls = const [],
  Crs? crs,
  Size? size,
  bool? live,
  bool? moveWhenLive,
  dynamic centerMarker,
  dynamic locationMarker,
  bool? showCenterMarker,
  bool? showLocator,
  Locator? locator,
  bool? showLocationMarker,
  bool? showLocationIndicator,
  L.LocationIndicator? locationIndicator,
  bool? showCompass,
  Compass? compass,
  bool? showScale,
  Scale? scale,
  bool? interactive,
  LatLngBounds? maxBounds,
  LatLngBounds? fitBounds,
  FitBoundsOptions? fitBoundsOptions,
  bool? slideOnBoundaries,
  bool? adaptiveBoundaries,
  bool? hideAttribution,
  Function(LatLng?)? onTap,
  Function(LatLng?)? onLongPress,
  MapChangedCallback? onChanged,
  Function? onReady,
}) {
  return U.Map(
    key: key,
    center: center,
    zoom: zoom,
    minZoom: minZoom,
    maxZoom: maxZoom,
    rotation: rotation,
    disableRotation: disableRotation,
    background: background,
    controller: controller,
    markers: markers,
    circles: circles,
    polylines: polylines,
    polygons: polygons,
    rectangles: rectangles,
    tiles: tiles,
    images: images,
    videos: videos,
    layers: layers,
    controls: controls,
    crs: crs,
    size: size,
    live: live,
    moveWhenLive: moveWhenLive,
    centerMarker: centerMarker,
    locationMarker: locationMarker,
    showCenterMarker: showCenterMarker,
    showLocator: showLocator,
    locator: locator,
    showLocationMarker: showLocationMarker,
    showLocationIndicator: showLocationIndicator,
    locationIndicator: locationIndicator,
    showCompass: showCompass,
    compass: compass,
    showScale: showScale,
    scale: scale,
    interactive: interactive,
    maxBounds: maxBounds,
    fitBounds: fitBounds,
    fitBoundsOptions: fitBoundsOptions,
    slideOnBoundaries: slideOnBoundaries,
    adaptiveBoundaries: adaptiveBoundaries,
    hideAttribution: hideAttribution,
    onTap: onTap,
    onLongPress: onLongPress,
    onChanged: onChanged,
    onReady: onReady,
    base: SafeCastTileLayer(options: options ?? L.TileLayerOptions()),
  );
} */

/// Used to display map with base TileLayer from CyclOSM.
///
/// Example:
///
/// ```dart
/// U.CyclOSMMap(
///   controller: MapController(),
///   center: [-6.175329, 106.827253],
///   zoom: 15,
/// )
/// ```
///
/// @param: [center]
///
/// Used to define center latlng position of the map.
/// It can accept many types of value:
///
/// A list of two (or three) values
/// that represents latitude and longitude (and altitude).
///
/// ```dart
/// U.CyclOSMMap(
///   controller: MapController(),
///   center: [-6.175329, 106.827253],
///   zoom: 15,
/// )
/// ```
///
/// or an instance of LatLng object:
///
/// ```dart
/// U.CyclOSMMap(
///   controller: MapController(),
///   center: LatLng(-6.175329, 106.827253),
///   zoom: 15,
/// )
/// ```
///
/// or location name.
///
/// The built-in GeoCoder inside will automatically
/// convert it to latlng position for you.
///
/// Default to LatLng(0.0, 0.0) if your location is not found.
///
/// ```dart
/// U.CyclOSMMap(
///   controller: MapController(),
///   center: 'Emirates Stadium',
///   zoom: 15,
/// )
/// ```
///
// ignore: non_constant_identifier_names
static Universe CyclOSMMap({
  Key? key,
  required dynamic center,
  L.TileLayerOptions? options,
  double? zoom,
  double? minZoom,
  double? maxZoom,
  double? rotation,
  bool? disableRotation,
  Color? background,
  C.MapController? controller,
  L.TileLayer? base,
  L.MarkerLayer? markers,
  L.CircleLayer? circles,
  L.PolylineLayer? polylines,
  L.PolygonLayer? polygons,
  L.RectangleLayer? rectangles,
  List<L.TileLayer> tiles = const [],
  List<L.ImageOverlay> images = const [],
  List<L.VideoOverlay> videos = const [],
  List<L.MapLayer> layers = const [],
  List<Widget> controls = const [],
  Crs? crs,
  Size? size,
  bool? live,
  bool? moveWhenLive,
  dynamic centerMarker,
  dynamic locationMarker,
  num? centerMarkerSize,
  num? locationMarkerSize,
  bool? showCenterMarker,
  bool? showLocator,
  Locator? locator,
  bool? showLocationMarker,
  bool? showLocationIndicator,
  L.LocationIndicator? locationIndicator,
  bool? showCompass,
  Compass? compass,
  bool? showScale,
  Scale? scale,
  bool? interactive,
  LatLngBounds? maxBounds,
  LatLngBounds? fitBounds,
  FitBoundsOptions? fitBoundsOptions,
  bool? slideOnBoundaries,
  bool? adaptiveBoundaries,
  bool? hideAttribution,
  Function(LatLng?)? onTap,
  Function(LatLng?)? onLongPress,
  MapChangedCallback? onChanged,
  Function? onReady,
}) {
  return U.Map(
    key: key,
    center: center,
    zoom: zoom,
    minZoom: minZoom,
    maxZoom: maxZoom,
    rotation: rotation,
    disableRotation: disableRotation,
    background: background,
    controller: controller,
    markers: markers,
    circles: circles,
    polylines: polylines,
    polygons: polygons,
    rectangles: rectangles,
    tiles: tiles,
    images: images,
    videos: videos,
    layers: layers,
    controls: controls,
    crs: crs,
    size: size,
    live: live,
    moveWhenLive: moveWhenLive,
    centerMarker: centerMarker,
    locationMarker: locationMarker,
    centerMarkerSize: centerMarkerSize,
    locationMarkerSize: locationMarkerSize,
    showCenterMarker: showCenterMarker,
    showLocator: showLocator,
    locator: locator,
    showLocationMarker: showLocationMarker,
    showLocationIndicator: showLocationIndicator,
    locationIndicator: locationIndicator,
    showCompass: showCompass,
    compass: compass,
    showScale: showScale,
    scale: scale,
    interactive: interactive,
    maxBounds: maxBounds,
    fitBounds: fitBounds,
    fitBoundsOptions: fitBoundsOptions,
    slideOnBoundaries: slideOnBoundaries,
    adaptiveBoundaries: adaptiveBoundaries,
    hideAttribution: hideAttribution,
    onTap: onTap,
    onLongPress: onLongPress,
    onChanged: onChanged,
    onReady: onReady,
    base: CyclOSMTileLayer(options: options ?? L.TileLayerOptions()),
  );
}