MapTileLayer constructor

const MapTileLayer({
  1. Key? key,
  2. required String urlTemplate,
  3. MapLatLng initialFocalLatLng = const MapLatLng(0.0, 0.0),
  4. int initialZoomLevel = 1,
  5. MapLatLngBounds? initialLatLngBounds,
  6. MapTileLayerController? controller,
  7. List<MapSublayer>? sublayers,
  8. int initialMarkersCount = 0,
  9. MapMarkerBuilder? markerBuilder,
  10. IndexedWidgetBuilder? markerTooltipBuilder,
  11. MapTooltipSettings tooltipSettings = const MapTooltipSettings(),
  12. MapZoomPanBehavior? zoomPanBehavior,
  13. WillZoomCallback? onWillZoom,
  14. WillPanCallback? onWillPan,
})

Creates a MapTileLayer.

Implementation

const MapTileLayer({
  Key? key,
  required this.urlTemplate,
  this.initialFocalLatLng = const MapLatLng(0.0, 0.0),
  this.initialZoomLevel = 1,
  MapLatLngBounds? initialLatLngBounds,
  this.controller,
  List<MapSublayer>? sublayers,
  int initialMarkersCount = 0,
  MapMarkerBuilder? markerBuilder,
  IndexedWidgetBuilder? markerTooltipBuilder,
  MapTooltipSettings tooltipSettings = const MapTooltipSettings(),
  MapZoomPanBehavior? zoomPanBehavior,
  WillZoomCallback? onWillZoom,
  WillPanCallback? onWillPan,
})  : assert(initialZoomLevel >= 1 && initialZoomLevel <= 15),
      assert(initialMarkersCount == 0 ||
          initialMarkersCount != 0 && markerBuilder != null),
      super(
        key: key,
        initialLatLngBounds: initialLatLngBounds,
        sublayers: sublayers,
        initialMarkersCount: initialMarkersCount,
        markerBuilder: markerBuilder,
        markerTooltipBuilder: markerTooltipBuilder,
        tooltipSettings: tooltipSettings,
        zoomPanBehavior: zoomPanBehavior,
        onWillZoom: onWillZoom,
        onWillPan: onWillPan,
      );