HereMap static method

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

Used to display map with base TileLayer from HERE Map.

Example:

U.HereMap(
  appId: '',
  appCode: '',
  type: HereType.NormalDay,
  controller: MapController(),
  center: [-6.175329, 106.827253],
  zoom: 15,
)

@param: type

enum to define the type of HERE Map tiles to load.

Available values: HereType.NormalDay HereType.NormalDayCustom HereType.NormalDayGrey HereType.NormalDayMobile HereType.NormalDayGreyMobile HereType.NormalDayTransit HereType.NormalDayTransitMobile HereType.NormalDayTraffic HereType.NormalNight HereType.NormalNightMobile HereType.NormalNightGrey HereType.NormalNightGreyMobile HereType.NormalNightTransit HereType.NormalNightTransitMobile HereType.ReducedDay HereType.ReducedNight HereType.BasicMap HereType.MapLabels HereType.TrafficFlow HereType.CarnavDayGrey HereType.HybridDay HereType.HybridDayMobile HereType.HybridDayTransit HereType.HybridDayGrey HereType.HybridDayTraffic HereType.PedestrianDay HereType.PedestrianNight HereType.SatelliteDay HereType.TerrainDay HereType.TerrainDayMobile

@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.HereMap(
  appId: '',
  appCode: '',
  type: HereType.NormalDay,
  controller: MapController(),
  center: [-6.175329, 106.827253],
  zoom: 15,
)

or an instance of LatLng object:

U.HereMap(
  appId: '',
  appCode: '',
  type: HereType.NormalDay,
  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.HereMap(
  appId: '',
  appCode: '',
  type: HereType.NormalDay,
  controller: MapController(),
  center: 'Emirates Stadium',
  zoom: 15,
)

Implementation

// ignore: non_constant_identifier_names
static Universe HereMap({
  Key? key,
  required String appId,
  required String appCode,
  String version = 'v3',
  required HereType type,
  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: HereTileLayer(
      type: type,
      options: options ?? L.TileLayerOptions(),
      appId: appId,
      appCode: appCode,
      version: version,
    ),
  );
}