MapTileLayer constructor
const
MapTileLayer({
- Key? key,
- required String urlTemplate,
- MapLatLng initialFocalLatLng = const MapLatLng(0.0, 0.0),
- int initialZoomLevel = 1,
- MapLatLngBounds? initialLatLngBounds,
- MapTileLayerController? controller,
- List<
MapSublayer> ? sublayers, - int initialMarkersCount = 0,
- MapMarkerBuilder? markerBuilder,
- IndexedWidgetBuilder? markerTooltipBuilder,
- MapTooltipSettings tooltipSettings = const MapTooltipSettings(),
- MapZoomPanBehavior? zoomPanBehavior,
- WillZoomCallback? onWillZoom,
- 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,
);