map: removed Stamen Toner, changed Stamen Watercolor host

This commit is contained in:
Thibault Deckers 2023-10-14 01:01:28 +02:00
parent 1d8bc20070
commit 817bc4bc1e
10 changed files with 6 additions and 34 deletions

View file

@ -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)
## <a id="v1.9.6"></a>[v1.9.6] - 2023-09-25
### Fixed

View file

@ -223,7 +223,6 @@
"mapStyleHuaweiNormal": "Petal Maps",
"mapStyleHuaweiTerrain": "Petal Maps (Terrain)",
"mapStyleOsmHot": "Humanitarian OSM",
"mapStyleStamenToner": "Stamen Toner",
"mapStyleStamenWatercolor": "Stamen Watercolor",
"maxBrightnessNever": "Never",

View file

@ -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:

View file

@ -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,
};
}

View file

@ -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:

View file

@ -185,7 +185,6 @@ class _GeoMapState extends State<GeoMap> {
onMarkerLongPress: onMarkerLongPress,
);
case EntryMapStyle.osmHot:
case EntryMapStyle.stamenToner:
case EntryMapStyle.stamenWatercolor:
child = EntryLeafletMap<AvesEntry>(
controller: controller,

View file

@ -198,8 +198,6 @@ class _EntryLeafletMapState<T> extends State<EntryLeafletMap<T>> with TickerProv
switch (widget.style) {
case EntryMapStyle.osmHot:
return const OSMHotLayer();
case EntryMapStyle.stamenToner:
return const StamenTonerLayer();
case EntryMapStyle.stamenWatercolor:
return const StamenWatercolorLayer();
default:

View file

@ -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,

View file

@ -9,6 +9,5 @@ enum EntryMapStyle {
// Leaflet
// browse providers at https://leaflet-extras.github.io/leaflet-providers/preview/
osmHot,
stamenToner,
stamenWatercolor,
}

View file

@ -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",