@@ -3,7 +3,6 @@ import 'dart:math' as math;
33
44import 'package:collection/collection.dart' show MapEquality;
55import 'package:flutter/material.dart' ;
6- import 'package:flutter/widgets.dart' ;
76import 'package:flutter_map/plugin_api.dart' ;
87import 'package:flutter_map/src/layer/tile_layer/tile.dart' ;
98import 'package:flutter_map/src/layer/tile_layer/tile_bounds/tile_bounds.dart' ;
@@ -104,6 +103,11 @@ class TileLayer extends StatefulWidget {
104103 final TileDisplay tileDisplay;
105104
106105 /// Color shown behind the tiles
106+ @Deprecated (
107+ 'Prefer `MapOptions.backgroundColor`. '
108+ 'This property has been removed simplify interaction when using multiple `TileLayer`s. '
109+ 'This property is deprecated since v6.' ,
110+ )
107111 final Color backgroundColor;
108112
109113 /// Provider with which to load map tiles
@@ -231,7 +235,7 @@ class TileLayer extends StatefulWidget {
231235 this .subdomains = const < String > [],
232236 this .keepBuffer = 2 ,
233237 this .panBuffer = 0 ,
234- this .backgroundColor = const Color ( 0xFFE0E0E0 ) ,
238+ this .backgroundColor = Colors .transparent ,
235239 this .errorImage,
236240 TileProvider ? tileProvider,
237241 this .tms = false ,
@@ -474,7 +478,8 @@ class _TileLayerState extends State<TileLayer> with TickerProviderStateMixin {
474478
475479 _tileScaleCalculator.clearCacheUnlessZoomMatches (map.zoom);
476480
477- return Container (
481+ return ColoredBox (
482+ // ignore: deprecated_member_use_from_same_package
478483 color: widget.backgroundColor,
479484 child: Stack (
480485 children: [
0 commit comments