From 30a0df2bd422546649ffd72c8480fd1cfd511693 Mon Sep 17 00:00:00 2001 From: Joscha <34318751+josxha@users.noreply.github.com> Date: Tue, 21 May 2024 11:58:35 +0200 Subject: [PATCH] feat(vmt-pmtiles): protomaps themes v3.0.1, release v1.3.0 --- vector_map_tiles_pmtiles/CHANGELOG.md | 5 ++ .../lib/src/themes/black.dart | 68 +++---------------- .../lib/src/themes/dark.dart | 68 +++---------------- .../lib/src/themes/grayscale.dart | 68 +++---------------- .../lib/src/themes/light.dart | 68 +++---------------- .../lib/src/themes/protomaps_themes.dart | 4 +- .../lib/src/themes/white.dart | 68 +++---------------- vector_map_tiles_pmtiles/pubspec.yaml | 2 +- 8 files changed, 59 insertions(+), 292 deletions(-) diff --git a/vector_map_tiles_pmtiles/CHANGELOG.md b/vector_map_tiles_pmtiles/CHANGELOG.md index b57ad95..dd53fd0 100644 --- a/vector_map_tiles_pmtiles/CHANGELOG.md +++ b/vector_map_tiles_pmtiles/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.3.0] 2024-05-21 + +- Update `ProtomapsThemes` to + include [version 3.0.1 themes](https://github.com/protomaps/basemaps/blob/main/CHANGELOG.md) + ## [1.2.0] 2024-02-19 - Update `vector_map_tiles` to version 7.3.0 and bump the dependency constraints diff --git a/vector_map_tiles_pmtiles/lib/src/themes/black.dart b/vector_map_tiles_pmtiles/lib/src/themes/black.dart index ad62c99..2430e1a 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/black.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/black.dart @@ -1792,68 +1792,12 @@ const themeBlack = [ ], "text-transform": "uppercase" }, - "paint": { - "text-color": "#5c5c5c", - "text-halo-color": "#141414", - "text-halo-width": 2 - } - }, - { - "id": "pois_important", - "type": "symbol", - "source": "protomaps", - "source-layer": "pois", - "filter": [ - "any", - [ - "<", - ["get", "pmap:min_zoom"], - 13 - ] - ], - "layout": { - "symbol-sort-key": ["get", "pmap:min_zoom"], - "text-font": ["Noto Sans Regular"], - "text-field": ["get", "name"], - "text-size": 11, - "text-max-width": 9, - "icon-padding": [ - "interpolate", - ["linear"], - ["zoom"], - 0, - 2, - 14, - 2, - 16, - 20, - 17, - 2, - 22, - 2 - ] - }, "paint": { "text-color": "#5c5c5c", "text-halo-color": "#141414", "text-halo-width": 1.5 } }, - { - "id": "places_locality_circle", - "type": "circle", - "source": "protomaps", - "source-layer": "places", - "filter": ["==", "pmap:kind", "locality"], - "paint": { - "circle-radius": 2, - "circle-stroke-width": 1.5, - "circle-stroke-color": "#666666", - "circle-color": "#000000", - "circle-translate": [-6, 0] - }, - "maxzoom": 8 - }, { "id": "places_locality", "type": "symbol", @@ -1861,6 +1805,14 @@ const themeBlack = [ "source-layer": "places", "filter": ["==", "pmap:kind", "locality"], "layout": { + "icon-image": [ + "step", + ["zoom"], + "townspot", + 8, + "" + ], + "icon-size": 0.7, "text-field": "{name}", "text-font": [ "case", @@ -2001,7 +1953,7 @@ const themeBlack = [ ["linear"], ["zoom"], 0, - 2, + 0, 8, 4, 10, @@ -2018,7 +1970,7 @@ const themeBlack = [ 8, "center" ], - "text-radial-offset": 0.2 + "text-radial-offset": 0.4 }, "paint": { "text-color": "#999999", diff --git a/vector_map_tiles_pmtiles/lib/src/themes/dark.dart b/vector_map_tiles_pmtiles/lib/src/themes/dark.dart index 053358d..91be339 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/dark.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/dark.dart @@ -1792,68 +1792,12 @@ const themeDark = [ ], "text-transform": "uppercase" }, - "paint": { - "text-color": "#525252", - "text-halo-color": "#1f1f1f", - "text-halo-width": 2 - } - }, - { - "id": "pois_important", - "type": "symbol", - "source": "protomaps", - "source-layer": "pois", - "filter": [ - "any", - [ - "<", - ["get", "pmap:min_zoom"], - 13 - ] - ], - "layout": { - "symbol-sort-key": ["get", "pmap:min_zoom"], - "text-font": ["Noto Sans Regular"], - "text-field": ["get", "name"], - "text-size": 11, - "text-max-width": 9, - "icon-padding": [ - "interpolate", - ["linear"], - ["zoom"], - 0, - 2, - 14, - 2, - 16, - 20, - 17, - 2, - 22, - 2 - ] - }, "paint": { "text-color": "#525252", "text-halo-color": "#1f1f1f", "text-halo-width": 1.5 } }, - { - "id": "places_locality_circle", - "type": "circle", - "source": "protomaps", - "source-layer": "places", - "filter": ["==", "pmap:kind", "locality"], - "paint": { - "circle-radius": 2, - "circle-stroke-width": 1.5, - "circle-stroke-color": "#7a7a7a", - "circle-color": "#000000", - "circle-translate": [-6, 0] - }, - "maxzoom": 8 - }, { "id": "places_locality", "type": "symbol", @@ -1861,6 +1805,14 @@ const themeDark = [ "source-layer": "places", "filter": ["==", "pmap:kind", "locality"], "layout": { + "icon-image": [ + "step", + ["zoom"], + "townspot", + 8, + "" + ], + "icon-size": 0.7, "text-field": "{name}", "text-font": [ "case", @@ -2001,7 +1953,7 @@ const themeDark = [ ["linear"], ["zoom"], 0, - 2, + 0, 8, 4, 10, @@ -2018,7 +1970,7 @@ const themeDark = [ 8, "center" ], - "text-radial-offset": 0.2 + "text-radial-offset": 0.4 }, "paint": { "text-color": "#7a7a7a", diff --git a/vector_map_tiles_pmtiles/lib/src/themes/grayscale.dart b/vector_map_tiles_pmtiles/lib/src/themes/grayscale.dart index 349c1e5..601b548 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/grayscale.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/grayscale.dart @@ -1792,68 +1792,12 @@ const themeGrayscale = [ ], "text-transform": "uppercase" }, - "paint": { - "text-color": "#7a7a7a", - "text-halo-color": "#cccccc", - "text-halo-width": 2 - } - }, - { - "id": "pois_important", - "type": "symbol", - "source": "protomaps", - "source-layer": "pois", - "filter": [ - "any", - [ - "<", - ["get", "pmap:min_zoom"], - 13 - ] - ], - "layout": { - "symbol-sort-key": ["get", "pmap:min_zoom"], - "text-font": ["Noto Sans Regular"], - "text-field": ["get", "name"], - "text-size": 11, - "text-max-width": 9, - "icon-padding": [ - "interpolate", - ["linear"], - ["zoom"], - 0, - 2, - 14, - 2, - 16, - 20, - 17, - 2, - 22, - 2 - ] - }, "paint": { "text-color": "#7a7a7a", "text-halo-color": "#cccccc", "text-halo-width": 1.5 } }, - { - "id": "places_locality_circle", - "type": "circle", - "source": "protomaps", - "source-layer": "places", - "filter": ["==", "pmap:kind", "locality"], - "paint": { - "circle-radius": 2, - "circle-stroke-width": 1.5, - "circle-stroke-color": "#7a7a7a", - "circle-color": "#c2c2c2", - "circle-translate": [-6, 0] - }, - "maxzoom": 8 - }, { "id": "places_locality", "type": "symbol", @@ -1861,6 +1805,14 @@ const themeGrayscale = [ "source-layer": "places", "filter": ["==", "pmap:kind", "locality"], "layout": { + "icon-image": [ + "step", + ["zoom"], + "townspot", + 8, + "" + ], + "icon-size": 0.7, "text-field": "{name}", "text-font": [ "case", @@ -2001,7 +1953,7 @@ const themeGrayscale = [ ["linear"], ["zoom"], 0, - 2, + 0, 8, 4, 10, @@ -2018,7 +1970,7 @@ const themeGrayscale = [ 8, "center" ], - "text-radial-offset": 0.2 + "text-radial-offset": 0.4 }, "paint": { "text-color": "#474747", diff --git a/vector_map_tiles_pmtiles/lib/src/themes/light.dart b/vector_map_tiles_pmtiles/lib/src/themes/light.dart index 252e727..aae0864 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/light.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/light.dart @@ -1792,68 +1792,12 @@ const themeLight = [ ], "text-transform": "uppercase" }, - "paint": { - "text-color": "#8f8f8f", - "text-halo-color": "#e0e0e0", - "text-halo-width": 2 - } - }, - { - "id": "pois_important", - "type": "symbol", - "source": "protomaps", - "source-layer": "pois", - "filter": [ - "any", - [ - "<", - ["get", "pmap:min_zoom"], - 13 - ] - ], - "layout": { - "symbol-sort-key": ["get", "pmap:min_zoom"], - "text-font": ["Noto Sans Regular"], - "text-field": ["get", "name"], - "text-size": 11, - "text-max-width": 9, - "icon-padding": [ - "interpolate", - ["linear"], - ["zoom"], - 0, - 2, - 14, - 2, - 16, - 20, - 17, - 2, - 22, - 2 - ] - }, "paint": { "text-color": "#8f8f8f", "text-halo-color": "#e0e0e0", "text-halo-width": 1.5 } }, - { - "id": "places_locality_circle", - "type": "circle", - "source": "protomaps", - "source-layer": "places", - "filter": ["==", "pmap:kind", "locality"], - "paint": { - "circle-radius": 2, - "circle-stroke-width": 1.5, - "circle-stroke-color": "#a3a3a3", - "circle-color": "#ffffff", - "circle-translate": [-6, 0] - }, - "maxzoom": 8 - }, { "id": "places_locality", "type": "symbol", @@ -1861,6 +1805,14 @@ const themeLight = [ "source-layer": "places", "filter": ["==", "pmap:kind", "locality"], "layout": { + "icon-image": [ + "step", + ["zoom"], + "townspot", + 8, + "" + ], + "icon-size": 0.7, "text-field": "{name}", "text-font": [ "case", @@ -2001,7 +1953,7 @@ const themeLight = [ ["linear"], ["zoom"], 0, - 2, + 0, 8, 4, 10, @@ -2018,7 +1970,7 @@ const themeLight = [ 8, "center" ], - "text-radial-offset": 0.2 + "text-radial-offset": 0.4 }, "paint": { "text-color": "#5c5c5c", diff --git a/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart b/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart index 1d762ee..2fe2341 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart @@ -8,11 +8,13 @@ part 'grayscale.dart'; part 'light.dart'; part 'white.dart'; -/// Protomaps themes, version 2.0.0-alpha.5 +/// Protomaps themes, version 3.0.1 /// /// All themes are published by Protomaps under CC0 / public domain. /// /// https://unpkg.com/browse/protomaps-themes-base@2.0.0-alpha.5/dist/layers/ +/// +/// https://github.com/protomaps/basemaps/blob/main/CHANGELOG.md class ProtomapsThemes { final Logger? logger; final Map sources; diff --git a/vector_map_tiles_pmtiles/lib/src/themes/white.dart b/vector_map_tiles_pmtiles/lib/src/themes/white.dart index 51bd4ed..fbde9a4 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/white.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/white.dart @@ -1792,68 +1792,12 @@ const themeWhite = [ ], "text-transform": "uppercase" }, - "paint": { - "text-color": "#8f8f8f", - "text-halo-color": "#ffffff", - "text-halo-width": 2 - } - }, - { - "id": "pois_important", - "type": "symbol", - "source": "protomaps", - "source-layer": "pois", - "filter": [ - "any", - [ - "<", - ["get", "pmap:min_zoom"], - 13 - ] - ], - "layout": { - "symbol-sort-key": ["get", "pmap:min_zoom"], - "text-font": ["Noto Sans Regular"], - "text-field": ["get", "name"], - "text-size": 11, - "text-max-width": 9, - "icon-padding": [ - "interpolate", - ["linear"], - ["zoom"], - 0, - 2, - 14, - 2, - 16, - 20, - 17, - 2, - 22, - 2 - ] - }, "paint": { "text-color": "#8f8f8f", "text-halo-color": "#ffffff", "text-halo-width": 1.5 } }, - { - "id": "places_locality_circle", - "type": "circle", - "source": "protomaps", - "source-layer": "places", - "filter": ["==", "pmap:kind", "locality"], - "paint": { - "circle-radius": 2, - "circle-stroke-width": 1.5, - "circle-stroke-color": "#adadad", - "circle-color": "#ffffff", - "circle-translate": [-6, 0] - }, - "maxzoom": 8 - }, { "id": "places_locality", "type": "symbol", @@ -1861,6 +1805,14 @@ const themeWhite = [ "source-layer": "places", "filter": ["==", "pmap:kind", "locality"], "layout": { + "icon-image": [ + "step", + ["zoom"], + "townspot", + 8, + "" + ], + "icon-size": 0.7, "text-field": "{name}", "text-font": [ "case", @@ -2001,7 +1953,7 @@ const themeWhite = [ ["linear"], ["zoom"], 0, - 2, + 0, 8, 4, 10, @@ -2018,7 +1970,7 @@ const themeWhite = [ 8, "center" ], - "text-radial-offset": 0.2 + "text-radial-offset": 0.4 }, "paint": { "text-color": "#5c5c5c", diff --git a/vector_map_tiles_pmtiles/pubspec.yaml b/vector_map_tiles_pmtiles/pubspec.yaml index 014abf9..7b63cab 100644 --- a/vector_map_tiles_pmtiles/pubspec.yaml +++ b/vector_map_tiles_pmtiles/pubspec.yaml @@ -3,7 +3,7 @@ description: PMTiles tile provider for vector_map_tiles (flutter_map vector tile repository: https://github.com/josxha/flutter_map_plugins issue_tracker: https://github.com/josxha/flutter_map_plugins/issues topics: [ flutter-map, vector-map-tiles, map, pmtiles ] -version: 1.2.0 +version: 1.3.0 environment: sdk: '>=3.2.5 <4.0.0'