Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backgroundColor option to tile layer, fix #35 #36

Merged
merged 1 commit into from
May 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion flutter_map/lib/src/layer/tile_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class TileLayerOptions extends LayerOptions {
final bool zoomReverse;
final double zoomOffset;
final List<String> subdomains;
final Color backgroundColor;
Map<String, String> additionalOptions;

TileLayerOptions({
Expand All @@ -28,6 +29,7 @@ class TileLayerOptions extends LayerOptions {
this.zoomOffset = 0.0,
this.additionalOptions = const <String, String>{},
this.subdomains = const <String>[],
this.backgroundColor = Colors.grey[300],
});
}

Expand Down Expand Up @@ -277,7 +279,7 @@ class _TileLayerState extends State<TileLayer> {
child: new Stack(
children: tileWidgets,
),
color: Colors.grey[300],
color: this.options.backgroundColor,
);
}

Expand Down