From 817bc4bc1e0dcdc0f2a9b6012b2d384467e8ef54 Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Sat, 14 Oct 2023 01:01:28 +0200 Subject: [PATCH] map: removed Stamen Toner, changed Stamen Watercolor host --- CHANGELOG.md | 5 +++++ lib/l10n/app_en.arb | 1 - lib/model/settings/enums/map_style.dart | 1 - lib/view/src/settings/enums.dart | 1 - lib/widgets/common/map/attribution.dart | 1 - lib/widgets/common/map/geo_map.dart | 1 - lib/widgets/common/map/leaflet/map.dart | 2 -- lib/widgets/common/map/leaflet/tile_layers.dart | 17 +---------------- plugins/aves_map/lib/src/style.dart | 1 - untranslated.json | 10 ---------- 10 files changed, 6 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ae57482..d6bbdd376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,13 @@ All notable changes to this project will be documented in this file. - mosaic layout: clamp ratio to 32/9 - Video: disable subtitles by default +- Map: Stamen Watercolor layer (no longer served for free by Stamen) now served by Smithsonian Institution - upgraded Flutter to stable v3.13.6 +### Removed + +- Map: Stamen Toner layer (no longer served for free by Stamen) + ## [v1.9.6] - 2023-09-25 ### Fixed diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index aa4bd3f2a..65d5ab093 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -223,7 +223,6 @@ "mapStyleHuaweiNormal": "Petal Maps", "mapStyleHuaweiTerrain": "Petal Maps (Terrain)", "mapStyleOsmHot": "Humanitarian OSM", - "mapStyleStamenToner": "Stamen Toner", "mapStyleStamenWatercolor": "Stamen Watercolor", "maxBrightnessNever": "Never", diff --git a/lib/model/settings/enums/map_style.dart b/lib/model/settings/enums/map_style.dart index 89e0e6e26..3f0ab2a6f 100644 --- a/lib/model/settings/enums/map_style.dart +++ b/lib/model/settings/enums/map_style.dart @@ -17,7 +17,6 @@ extension ExtraEntryMapStyle on EntryMapStyle { bool get needMobileService { switch (this) { case EntryMapStyle.osmHot: - case EntryMapStyle.stamenToner: case EntryMapStyle.stamenWatercolor: return false; default: diff --git a/lib/view/src/settings/enums.dart b/lib/view/src/settings/enums.dart index bdc6d08f4..7e4277958 100644 --- a/lib/view/src/settings/enums.dart +++ b/lib/view/src/settings/enums.dart @@ -71,7 +71,6 @@ extension ExtraEntryMapStyleView on EntryMapStyle { EntryMapStyle.hmsNormal => l10n.mapStyleHuaweiNormal, EntryMapStyle.hmsTerrain => l10n.mapStyleHuaweiTerrain, EntryMapStyle.osmHot => l10n.mapStyleOsmHot, - EntryMapStyle.stamenToner => l10n.mapStyleStamenToner, EntryMapStyle.stamenWatercolor => l10n.mapStyleStamenWatercolor, }; } diff --git a/lib/widgets/common/map/attribution.dart b/lib/widgets/common/map/attribution.dart index e53a1e250..e025d64ea 100644 --- a/lib/widgets/common/map/attribution.dart +++ b/lib/widgets/common/map/attribution.dart @@ -18,7 +18,6 @@ class Attribution extends StatelessWidget { switch (style) { case EntryMapStyle.osmHot: return _buildAttributionMarkdown(context, context.l10n.mapAttributionOsmHot); - case EntryMapStyle.stamenToner: case EntryMapStyle.stamenWatercolor: return _buildAttributionMarkdown(context, context.l10n.mapAttributionStamen); default: diff --git a/lib/widgets/common/map/geo_map.dart b/lib/widgets/common/map/geo_map.dart index a69e189ff..6ab91cd2d 100644 --- a/lib/widgets/common/map/geo_map.dart +++ b/lib/widgets/common/map/geo_map.dart @@ -185,7 +185,6 @@ class _GeoMapState extends State { onMarkerLongPress: onMarkerLongPress, ); case EntryMapStyle.osmHot: - case EntryMapStyle.stamenToner: case EntryMapStyle.stamenWatercolor: child = EntryLeafletMap( controller: controller, diff --git a/lib/widgets/common/map/leaflet/map.dart b/lib/widgets/common/map/leaflet/map.dart index 0c3fe7d5d..b8498fa97 100644 --- a/lib/widgets/common/map/leaflet/map.dart +++ b/lib/widgets/common/map/leaflet/map.dart @@ -198,8 +198,6 @@ class _EntryLeafletMapState extends State> with TickerProv switch (widget.style) { case EntryMapStyle.osmHot: return const OSMHotLayer(); - case EntryMapStyle.stamenToner: - return const StamenTonerLayer(); case EntryMapStyle.stamenWatercolor: return const StamenWatercolorLayer(); default: diff --git a/lib/widgets/common/map/leaflet/tile_layers.dart b/lib/widgets/common/map/leaflet/tile_layers.dart index 2a547a0a3..9c4d38a27 100644 --- a/lib/widgets/common/map/leaflet/tile_layers.dart +++ b/lib/widgets/common/map/leaflet/tile_layers.dart @@ -19,28 +19,13 @@ class OSMHotLayer extends StatelessWidget { } } -class StamenTonerLayer extends StatelessWidget { - const StamenTonerLayer({super.key}); - - @override - Widget build(BuildContext context) { - return TileLayer( - urlTemplate: 'https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.png', - subdomains: const ['a', 'b', 'c', 'd'], - backgroundColor: _tileLayerBackgroundColor, - retinaMode: MediaQuery.devicePixelRatioOf(context) > 1, - userAgentPackageName: device.userAgent, - ); - } -} - class StamenWatercolorLayer extends StatelessWidget { const StamenWatercolorLayer({super.key}); @override Widget build(BuildContext context) { return TileLayer( - urlTemplate: 'https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg', + urlTemplate: 'https://watercolormaps.collection.cooperhewitt.org/tile/watercolor/{z}/{x}/{y}.jpg', subdomains: const ['a', 'b', 'c', 'd'], backgroundColor: _tileLayerBackgroundColor, retinaMode: MediaQuery.devicePixelRatioOf(context) > 1, diff --git a/plugins/aves_map/lib/src/style.dart b/plugins/aves_map/lib/src/style.dart index 60cf96799..e5cd839f7 100644 --- a/plugins/aves_map/lib/src/style.dart +++ b/plugins/aves_map/lib/src/style.dart @@ -9,6 +9,5 @@ enum EntryMapStyle { // Leaflet // browse providers at https://leaflet-extras.github.io/leaflet-providers/preview/ osmHot, - stamenToner, stamenWatercolor, } diff --git a/untranslated.json b/untranslated.json index 2e4409065..cb38526b1 100644 --- a/untranslated.json +++ b/untranslated.json @@ -135,7 +135,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways", @@ -1160,7 +1159,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways", @@ -1725,7 +1723,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "overlayHistogramRGB", "overlayHistogramLuminance", @@ -2779,7 +2776,6 @@ "mapStyleGoogleHybrid", "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "overlayHistogramRGB", "overlayHistogramLuminance", @@ -3996,7 +3992,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways", @@ -4652,7 +4647,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways", @@ -5363,7 +5357,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways", @@ -6130,7 +6123,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways", @@ -7046,7 +7038,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways", @@ -7699,7 +7690,6 @@ "mapStyleHuaweiNormal", "mapStyleHuaweiTerrain", "mapStyleOsmHot", - "mapStyleStamenToner", "mapStyleStamenWatercolor", "maxBrightnessNever", "maxBrightnessAlways",