diff --git a/example/lib/common/attribution_widget.dart b/example/lib/common/attribution_widget.dart new file mode 100644 index 0000000..5c47c27 --- /dev/null +++ b/example/lib/common/attribution_widget.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:url_launcher/url_launcher_string.dart'; + +class OsmAttributionWidget extends StatelessWidget { + const OsmAttributionWidget({super.key}); + + @override + Widget build(BuildContext context) { + return SimpleAttributionWidget( + onTap: () => launchUrlString('https://openstreetmap.org/copyright'), + source: const Text('OpenStreetMap contributors'), + ); + } +} diff --git a/example/lib/flutter_map_cache/page.dart b/example/lib/flutter_map_cache/page.dart index 81d4b7b..147217c 100644 --- a/example/lib/flutter_map_cache/page.dart +++ b/example/lib/flutter_map_cache/page.dart @@ -6,6 +6,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_cache/flutter_map_cache.dart'; +import 'package:flutter_map_plugins_example/common/attribution_widget.dart'; import 'package:flutter_map_plugins_example/flutter_map_cache/cache_store_types.dart'; import 'package:flutter_map_plugins_example/flutter_map_cache/connectivity_icon.dart'; import 'package:latlong2/latlong.dart'; @@ -59,6 +60,7 @@ class _FlutterMapCachePageState extends State { ), userAgentPackageName: 'com.github.josxha/flutter_map_plugins', ), + const OsmAttributionWidget(), ], ), ), diff --git a/example/lib/flutter_map_compass/page.dart b/example/lib/flutter_map_compass/page.dart index 173b8a4..729984f 100644 --- a/example/lib/flutter_map_compass/page.dart +++ b/example/lib/flutter_map_compass/page.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_compass/flutter_map_compass.dart'; +import 'package:flutter_map_plugins_example/common/attribution_widget.dart'; import 'package:latlong2/latlong.dart'; class FlutterMapCompassPage extends StatefulWidget { @@ -36,6 +37,7 @@ class _FlutterMapCompassPageState extends State { onPressed: () => rotateMap(90), icon: const Icon(Icons.rotate_right), ), + const SizedBox(height: 24), ], ), body: FlutterMap( @@ -50,6 +52,7 @@ class _FlutterMapCompassPageState extends State { urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', ), const MapCompass.cupertino(), + const OsmAttributionWidget(), ], ), ); diff --git a/example/lib/flutter_map_pmtiles/page.dart b/example/lib/flutter_map_pmtiles/page.dart index bb97218..abc081a 100644 --- a/example/lib/flutter_map_pmtiles/page.dart +++ b/example/lib/flutter_map_pmtiles/page.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_plugins_example/common/attribution_widget.dart'; import 'package:flutter_map_pmtiles/flutter_map_pmtiles.dart'; import 'package:latlong2/latlong.dart'; @@ -11,12 +12,13 @@ class FlutterMapPmTilesPage extends StatefulWidget { } // TODO: use your own tile source https://docs.protomaps.com/pmtiles/cloud-storage -const tileSource = +/// This can be a hosted file or local file in your file system, +/// However, flutter assets are not supported. +const String tileSource = 'https://raw.githubusercontent.com/protomaps/PMTiles/main/spec/v3/stamen_toner(raster)CC-BY%2BODbL_z3.pmtiles'; class _FlutterMapPmTilesPageState extends State { - final Future _futureTileProvider = - PmTilesTileProvider.fromSource(tileSource); + final _futureTileProvider = PmTilesTileProvider.fromSource(tileSource); @override Widget build(BuildContext context) { @@ -38,6 +40,7 @@ class _FlutterMapPmTilesPageState extends State { ), children: [ TileLayer(tileProvider: tileProvider), + const OsmAttributionWidget(), ], ); } diff --git a/example/lib/vector_map_tiles_pmtiles/page.dart b/example/lib/vector_map_tiles_pmtiles/page.dart index 0200b5a..ad195cc 100644 --- a/example/lib/vector_map_tiles_pmtiles/page.dart +++ b/example/lib/vector_map_tiles_pmtiles/page.dart @@ -1,18 +1,31 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_plugins_example/common/attribution_widget.dart'; import 'package:latlong2/latlong.dart'; import 'package:vector_map_tiles/vector_map_tiles.dart'; import 'package:vector_map_tiles_pmtiles/vector_map_tiles_pmtiles.dart'; -import 'package:vector_tile_renderer/vector_tile_renderer.dart'; +import 'package:vector_tile_renderer/vector_tile_renderer.dart' as vtr; -// It could be that the hosted PMTiles file is no longer available. -// Check https://maps.protomaps.com/builds/ to get an up to date build. -// TODO: use your own tile source https://docs.protomaps.com/pmtiles/cloud-storage -const tileSource = 'https://build.protomaps.com/20240128.pmtiles'; +/// TODO: use your own tile source https://docs.protomaps.com/pmtiles/cloud-storage +/// This can be a hosted file or local file in your file system, +/// However, flutter assets are not supported. +const String tileSource = + 'https://raw.githubusercontent.com/protomaps/PMTiles/main/spec/v3/protomaps(vector)ODbL_firenze.pmtiles'; class VectorMapTilesPmTilesPage extends StatelessWidget { - final Future _futureTileProvider = - PmTilesVectorTileProvider.fromSource(tileSource); + /// The theme specifies the look of the rendered map. + /// + /// Note: Styles from Mapbox, OpenMapTiles and others and not compatible + /// with Protomaps styles. + final vtr.Theme mapTheme = ProtomapsThemes.light( + logger: kDebugMode ? const vtr.Logger.console() : null, + ); + + final _futureTileProvider = PmTilesVectorTileProvider.fromSource( + tileSource, + silenceTileNotFound: true, + ); VectorMapTilesPmTilesPage({super.key}); @@ -30,17 +43,20 @@ class VectorMapTilesPmTilesPage extends StatelessWidget { final tileProvider = snapshot.data!; return FlutterMap( options: const MapOptions( - initialZoom: 1, - initialCenter: LatLng(0, 0), - maxZoom: 3.49, + initialCenter: LatLng(43.787942, 11.237517), // firenze + maxZoom: 18, + minZoom: 0, ), children: [ VectorTileLayer( - theme: ProvidedThemes.lightTheme(), + // disable the file cache when you change the PMTiles source + fileCacheTtl: Duration.zero, + theme: mapTheme, tileProviders: TileProviders({ - 'openmaptiles': tileProvider, + 'protomaps': tileProvider, }), ), + const OsmAttributionWidget(), ], ); } diff --git a/flutter_map_pmtiles/example/example.md b/flutter_map_pmtiles/example/example.md index 68a88e9..5889ca2 100644 --- a/flutter_map_pmtiles/example/example.md +++ b/flutter_map_pmtiles/example/example.md @@ -2,8 +2,8 @@ ```dart // initiate your tile provider -final Future _futureTileProvider = PmTilesTileProvider - .fromSource('eitherAnUrlOrFileSystemPath'); +final _futureTileProvider = PmTilesTileProvider + .fromSource('eitherAnUrlOrFileSystemPath'); @override Widget build(BuildContext context) { diff --git a/vector_map_tiles_pmtiles/CHANGELOG.md b/vector_map_tiles_pmtiles/CHANGELOG.md index 1cc6b5a..7b5542c 100644 --- a/vector_map_tiles_pmtiles/CHANGELOG.md +++ b/vector_map_tiles_pmtiles/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.1.0] 2024-02-10 + +- Add `ProtomapsThemes` with all Protomaps basemap themes. +- Add the parameter `bool silenceTileNotFound` to silence "tile not found" + exceptions (`TileNotFoundException`). +- Update example and docs + ## [1.0.1] 2024-01-30 - Improve documentation diff --git a/vector_map_tiles_pmtiles/README.md b/vector_map_tiles_pmtiles/README.md index 0bd9dc6..2fefe9c 100644 --- a/vector_map_tiles_pmtiles/README.md +++ b/vector_map_tiles_pmtiles/README.md @@ -1,6 +1,9 @@ # vector_map_tiles_pmtiles -A TileProvider for flutter_map that adds support for PMTiles. +A tile provider +for [vector_map_tiles](https://pub.dev/packages/vector_map_tiles) that adds +support +for PMTiles. [![Pub Version](https://img.shields.io/pub/v/vector_map_tiles_pmtiles)](https://pub.dev/packages/vector_map_tiles_pmtiles) [![likes](https://img.shields.io/pub/likes/vector_map_tiles_pmtiles?logo=flutter)](https://pub.dev/packages/vector_map_tiles_pmtiles) @@ -12,14 +15,38 @@ A TileProvider for flutter_map that adds support for PMTiles. [![GitHub issues](https://img.shields.io/github/issues/josxha/flutter_map_plugins)](https://github.com/josxha/flutter_map_plugins/issues) [![codecov](https://codecov.io/gh/josxha/flutter_map_plugins/graph/badge.svg?token=5045489G7X)](https://codecov.io/gh/josxha/flutter_map_plugins) + + + + + + + + + + + +
lightwhitegrayscale
Example screenshotExample screenshotExample screenshot
+ + + + + + + + + + +
darkblack
Example screenshotExample screenshot
+ ## Getting started Add the following packages to your `pubspec.yaml` file: ```yaml dependencies: - flutter_map: ^6.0.0 # in case you don't have it yet - vector_map_tiles_pmtiles: ^1.0.0 # this package + flutter_map: ^6.0.0 # in case you don't have it yet + vector_map_tiles_pmtiles: ^1.1.0 # this package ``` ## Usage @@ -28,23 +55,32 @@ dependencies: ```dart // ...from an URL -final Future< - PmTilesVectorTileProvider> _futureTileProvider = PmTilesVectorTileProvider +final _futureTileProvider = PmTilesVectorTileProvider .fromSource('https://example.com/useYourOwnHostedPMTilesFile.pmtiles'); // ...from an local file on the file system -final Future< - PmTilesVectorTileProvider> _futureTileProvider = PmTilesVectorTileProvider +final _futureTileProvider = PmTilesVectorTileProvider .fromSource('some/file/system/path.pmtiles'); // ...or provide a PmTilesArchive directly -// (you'll need to add pmtiles as direct dependency to your project) -final Future< - PmTilesVectorTileProvider> _futureTileProvider = PmTilesVectorTileProvider +// (you'll have to add pmtiles as direct dependency to your project) +final _futureTileProvider = PmTilesVectorTileProvider .fromArchive(somePmTilesArchive); ``` -2. Await the response of the future, e.g. by using a `FutureBuilder`. +2. Create your map theme + +The theme specifies the look of the rendered map. + +- You can use one of the default Protomaps basemap + themes, for example the light theme: `ProtomapsThemes.light()`. +- or provide your own style with: `ThemeReader().read(myStyleJson)`. + +Note: Styles from Mapbox, OpenMapTiles and others and not compatible +with Protomaps styles. -3. Provide your `PmTilesVectorTileProvider` to your `TileLayer` +3. Await the future, e.g. by using a `FutureBuilder`. + +4. Provide your `PmTilesVectorTileProvider` and your map theme to + your `TileLayer`. ```dart @override @@ -53,16 +89,49 @@ Widget build(BuildContext context) { options: MapOptions(), children: [ VectorTileLayer( - theme: ProvidedThemes.lightTheme(), + // the map theme + theme: mapTheme, + tileProviders: TileProviders({ - 'openmaptiles': tileProvider, + // the awaited vector tile provider + 'protomaps': tileProvider, }), + + // disable the file cache when you change the PMTiles source + // fileCacheTtl: Duration.zero, ), ], ); } ``` +## Frequent questions + +
+ +Where do I get PMTiles files from? + +Visit +the [Getting Started](https://docs.protomaps.com/guide/getting-started) guide on +protomaps.com. + +
+ +
+ +Can I use a custom style? + +Yes that's possible. Start with one of the basemap themes and make the changes +you want. Then use `ThemeReader().read(style)` to use your theme. + +Maputnik has currently no built-in support for +PMTiles ([open issue here](https://github.com/maplibre/maputnik/issues/807)). +But you can use the +fork [maputnik-with-pmtiles](https://github.com/a-nyx/maputnik-with-pmtiles) in +the meantime. + +
+ ## Additional information If you need help you diff --git a/vector_map_tiles_pmtiles/example/example.md b/vector_map_tiles_pmtiles/example/example.md index 39c57da..ed6191f 100644 --- a/vector_map_tiles_pmtiles/example/example.md +++ b/vector_map_tiles_pmtiles/example/example.md @@ -1,20 +1,33 @@ ### Basic usage ```dart -// initiate your tile provider -final Future< - PmTilesVectorTileProvider> _futureTileProvider = PmTilesVectorTileProvider - .fromSource('eitherAnUrlOrFileSystemPath'); +/// Initiate your tile provider. +/// The source can be a PMTiles file that is either hosted or local on +/// your file system. flutter assets however are not supported. +final _futureTileProvider = PmTilesVectorTileProvider + .fromSource('eitherAnUrlOrFileSystemPath'); + +/// The theme specifies the look of the rendered map. +/// Note: Styles from Mapbox, OpenMapTiles and others and not compatible +/// with Protomaps styles. +final mapTheme = ProtomapsThemes.light(); @override Widget build(BuildContext context) { return FlutterMap( options: MapOptions(), children: [ - TileLayer( - urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', - // use your awaited PmTilesVectorTileProvider - tileProvider: tileProvider, + VectorTileLayer( + // the map theme + theme: mapTheme, + + tileProviders: TileProviders({ + // the awaited vector tile provider + 'protomaps': tileProvider, + }), + + // disable the file cache when you change the PMTiles source + // fileCacheTtl: Duration.zero, ), ], ); diff --git a/vector_map_tiles_pmtiles/images/screenshot-black.jpg b/vector_map_tiles_pmtiles/images/screenshot-black.jpg new file mode 100644 index 0000000..f4a225d Binary files /dev/null and b/vector_map_tiles_pmtiles/images/screenshot-black.jpg differ diff --git a/vector_map_tiles_pmtiles/images/screenshot-dark.jpg b/vector_map_tiles_pmtiles/images/screenshot-dark.jpg new file mode 100644 index 0000000..38a6455 Binary files /dev/null and b/vector_map_tiles_pmtiles/images/screenshot-dark.jpg differ diff --git a/vector_map_tiles_pmtiles/images/screenshot-grayscale.jpg b/vector_map_tiles_pmtiles/images/screenshot-grayscale.jpg new file mode 100644 index 0000000..a10eb97 Binary files /dev/null and b/vector_map_tiles_pmtiles/images/screenshot-grayscale.jpg differ diff --git a/vector_map_tiles_pmtiles/images/screenshot-light.jpg b/vector_map_tiles_pmtiles/images/screenshot-light.jpg new file mode 100644 index 0000000..ad26cac Binary files /dev/null and b/vector_map_tiles_pmtiles/images/screenshot-light.jpg differ diff --git a/vector_map_tiles_pmtiles/images/screenshot-white.jpg b/vector_map_tiles_pmtiles/images/screenshot-white.jpg new file mode 100644 index 0000000..fbf3d70 Binary files /dev/null and b/vector_map_tiles_pmtiles/images/screenshot-white.jpg differ diff --git a/vector_map_tiles_pmtiles/lib/src/themes/black.dart b/vector_map_tiles_pmtiles/lib/src/themes/black.dart new file mode 100644 index 0000000..ad62c99 --- /dev/null +++ b/vector_map_tiles_pmtiles/lib/src/themes/black.dart @@ -0,0 +1,2149 @@ +part of 'protomaps_themes.dart'; + +// ignore_for_file: prefer_single_quotes, require_trailing_commas + +const themeBlack = [ + { + "id": "background", + "type": "background", + "paint": {"background-color": "#2b2b2b"} + }, + { + "id": "earth", + "type": "fill", + "source": "protomaps", + "source-layer": "earth", + "paint": {"fill-color": "#141414"} + }, + { + "id": "landuse_park", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "national_park", + "park", + "cemetery", + "protected_area", + "nature_reserve", + "forest", + "golf_course" + ] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#181818", + 12, + "#181818" + ] + } + }, + { + "id": "landuse_urban_green", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "allotments", "village_green", "playground"] + ], + "paint": {"fill-color": "#181818", "fill-opacity": 0.7} + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "hospital"] + ], + "paint": {"fill-color": "#1d1d1d"} + }, + { + "id": "landuse_industrial", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "industrial"] + ], + "paint": {"fill-color": "#101010"} + }, + { + "id": "landuse_school", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "school", "university", "college"] + ], + "paint": {"fill-color": "#111111"} + }, + { + "id": "landuse_beach", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "beach"] + ], + "paint": {"fill-color": "#1f1f1f"} + }, + { + "id": "landuse_zoo", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "zoo"] + ], + "paint": {"fill-color": "#191919"} + }, + { + "id": "landuse_military", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "military", "naval_base", "airfield"] + ], + "paint": {"fill-color": "#191919"} + }, + { + "id": "natural_wood", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": [ + "any", + ["in", "pmap:kind", "wood", "nature_reserve", "forest"] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#1a1a1a", + 12, + "#1a1a1a" + ] + } + }, + { + "id": "natural_scrub", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["in", "pmap:kind", "scrub", "grassland", "grass"], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#1c1c1c", + 12, + "#1c1c1c" + ] + } + }, + { + "id": "natural_glacier", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "glacier"], + "paint": {"fill-color": "#191919"} + }, + { + "id": "natural_sand", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "sand"], + "paint": {"fill-color": "#161616"} + }, + { + "id": "landuse_aerodrome", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "aerodrome"] + ], + "paint": {"fill-color": "#191919"} + }, + { + "id": "transit_runway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["in", "pmap:kind_detail", "runway"] + ], + "paint": { + "line-color": "#323232", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 12, + 4, + 18, + 30 + ] + } + }, + { + "id": "transit_taxiway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "minzoom": 13, + "filter": [ + "any", + ["in", "pmap:kind_detail", "taxiway"] + ], + "paint": { + "line-color": "#323232", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 15, + 6 + ] + } + }, + { + "id": "water", + "type": "fill", + "source": "protomaps", + "source-layer": "water", + "paint": {"fill-color": "#333333"} + }, + { + "id": "physical_line_stream", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 14, + "filter": [ + "all", + ["in", "pmap:kind", "stream"] + ], + "paint": {"line-color": "#333333", "line-width": 0.5} + }, + { + "id": "physical_line_river", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 9, + "filter": [ + "all", + ["in", "pmap:kind", "river"] + ], + "paint": { + "line-color": "#333333", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1, + 18, + 12 + ] + } + }, + { + "id": "landuse_pedestrian", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pedestrian"] + ], + "paint": {"fill-color": "#191919"} + }, + { + "id": "landuse_pier", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": {"fill-color": "#0a0a0a"} + }, + { + "id": "roads_tunnels_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#101010", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#101010", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#101010", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#101010", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#101010", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#101010", + "line-dasharray": [6, 0.5], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_tunnels_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#292929", + "line-dasharray": [4.5, 0.5], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "buildings", + "type": "fill", + "source": "protomaps", + "source-layer": "buildings", + "paint": {"fill-color": "#0a0a0a", "fill-opacity": 0.5} + }, + { + "id": "transit_pier", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": { + "line-color": "#0a0a0a", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 0.5, + 20, + 16 + ] + } + }, + { + "id": "roads_minor_service_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1.5 + ] + } + }, + { + "id": "roads_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_major_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_highway_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-dasharray": [3, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#1f1f1f", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_minor_service", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ] + } + }, + { + "id": "roads_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + "#292929", + 16, + "#1f1f1f" + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_major_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_highway_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1 + ] + } + }, + { + "id": "roads_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "transit_railway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "all", + ["==", "pmap:kind", "rail"] + ], + "paint": { + "line-dasharray": [0.3, 0.75], + "line-opacity": 0.5, + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 0.15, + 18, + 9 + ] + } + }, + { + "id": "boundaries_country", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": ["<=", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#707070", + "line-width": 1, + "line-dasharray": [3, 2] + } + }, + { + "id": "boundaries", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": [">", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#707070", + "line-width": 0.5, + "line-dasharray": [3, 2] + } + }, + { + "id": "roads_bridges_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_bridges_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 10 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-dasharray": [2, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#1f1f1f", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_bridges_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "physical_line_waterway_label", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 13, + "filter": [ + "all", + ["in", "pmap:kind", "river", "stream"] + ], + "layout": { + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12, + "text-letter-spacing": 0.3 + }, + "paint": {"text-color": "#707070"} + }, + { + "id": "physical_point_peak", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["==", "pmap:kind", "peak"] + ], + "layout": { + "text-font": ["Noto Sans Italic"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 10, + 8, + 16, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#707070", "text-halo-width": 1.5} + }, + { + "id": "roads_labels_minor", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 15, + "filter": [ + "any", + ["in", "pmap:kind", "minor_road", "other", "path"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#525252", + "text-halo-color": "#141414", + "text-halo-width": 2 + } + }, + { + "id": "physical_point_ocean", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "sea", + "ocean", + "lake", + "water", + "bay", + "strait", + "fjord" + ] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 10, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-transform": "uppercase" + }, + "paint": {"text-color": "#707070"} + }, + { + "id": "physical_point_lakes", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["in", "pmap:kind", "lake", "water"] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 0, + 6, + 12, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#707070"} + }, + { + "id": "roads_labels_major", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 11, + "filter": [ + "any", + ["in", "pmap:kind", "highway", "major_road", "medium_road"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#5c5c5c", + "text-halo-color": "#141414", + "text-halo-width": 2 + } + }, + { + "id": "places_subplace", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "neighbourhood"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 7, + "text-letter-spacing": 0.1, + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 2, + 8, + 4, + 12, + 18, + 15, + 20 + ], + "text-size": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 11, + 8, + 14, + 14, + 18, + 24 + ], + "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", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "locality"], + "layout": { + "text-field": "{name}", + "text-font": [ + "case", + [ + "<=", + ["get", "pmap:min_zoom"], + 5 + ], + [ + "literal", + ["Noto Sans Medium"] + ], + [ + "literal", + ["Noto Sans Regular"] + ] + ], + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 3, + 8, + 7, + 12, + 11 + ], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 13, + 0 + ], + 4, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 15, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 12 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 12 + ], + 17, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 11 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 11 + ], + 18, + 0 + ], + 10, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 9 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 9 + ], + 20, + 0 + ], + 15, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 22, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 8, + 4, + 10, + 8, + 12, + 6, + 22, + 2 + ], + "text-anchor": [ + "step", + ["zoom"], + "left", + 8, + "center" + ], + "text-radial-offset": 0.2 + }, + "paint": { + "text-color": "#999999", + "text-halo-color": "#141414", + "text-halo-width": 1 + } + }, + { + "id": "places_region", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "region"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": [ + "step", + ["zoom"], + ["get", "name:short"], + 6, + ["get", "name"] + ], + "text-font": ["Noto Sans Regular"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 11, + 7, + 16 + ], + "text-radial-offset": 0.2, + "text-anchor": "center", + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#3d3d3d", + "text-halo-color": "#141414", + "text-halo-width": 2 + } + }, + { + "id": "places_country", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "country"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Medium"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 10 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 10 + ], + 12, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 18, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 7 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 7 + ], + 20, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 14, + 2, + 16, + 20, + 17, + 2, + 22, + 2 + ], + "text-transform": "uppercase" + }, + "paint": {"text-color": "#707070"} + } +]; diff --git a/vector_map_tiles_pmtiles/lib/src/themes/dark.dart b/vector_map_tiles_pmtiles/lib/src/themes/dark.dart new file mode 100644 index 0000000..053358d --- /dev/null +++ b/vector_map_tiles_pmtiles/lib/src/themes/dark.dart @@ -0,0 +1,2149 @@ +part of 'protomaps_themes.dart'; + +// ignore_for_file: prefer_single_quotes, require_trailing_commas + +const themeDark = [ + { + "id": "background", + "type": "background", + "paint": {"background-color": "#34373d"} + }, + { + "id": "earth", + "type": "fill", + "source": "protomaps", + "source-layer": "earth", + "paint": {"fill-color": "#1f1f1f"} + }, + { + "id": "landuse_park", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "national_park", + "park", + "cemetery", + "protected_area", + "nature_reserve", + "forest", + "golf_course" + ] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#232325", + 12, + "#232325" + ] + } + }, + { + "id": "landuse_urban_green", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "allotments", "village_green", "playground"] + ], + "paint": {"fill-color": "#232325", "fill-opacity": 0.7} + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "hospital"] + ], + "paint": {"fill-color": "#252424"} + }, + { + "id": "landuse_industrial", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "industrial"] + ], + "paint": {"fill-color": "#222222"} + }, + { + "id": "landuse_school", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "school", "university", "college"] + ], + "paint": {"fill-color": "#262323"} + }, + { + "id": "landuse_beach", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "beach"] + ], + "paint": {"fill-color": "#28282a"} + }, + { + "id": "landuse_zoo", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "zoo"] + ], + "paint": {"fill-color": "#222323"} + }, + { + "id": "landuse_military", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "military", "naval_base", "airfield"] + ], + "paint": {"fill-color": "#222323"} + }, + { + "id": "natural_wood", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": [ + "any", + ["in", "pmap:kind", "wood", "nature_reserve", "forest"] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#202121", + 12, + "#202121" + ] + } + }, + { + "id": "natural_scrub", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["in", "pmap:kind", "scrub", "grassland", "grass"], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#222323", + 12, + "#222323" + ] + } + }, + { + "id": "natural_glacier", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "glacier"], + "paint": {"fill-color": "#1c1c1c"} + }, + { + "id": "natural_sand", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "sand"], + "paint": {"fill-color": "#212123"} + }, + { + "id": "landuse_aerodrome", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "aerodrome"] + ], + "paint": {"fill-color": "#1e1e1e"} + }, + { + "id": "transit_runway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["in", "pmap:kind_detail", "runway"] + ], + "paint": { + "line-color": "#333333", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 12, + 4, + 18, + 30 + ] + } + }, + { + "id": "transit_taxiway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "minzoom": 13, + "filter": [ + "any", + ["in", "pmap:kind_detail", "taxiway"] + ], + "paint": { + "line-color": "#333333", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 15, + 6 + ] + } + }, + { + "id": "water", + "type": "fill", + "source": "protomaps", + "source-layer": "water", + "paint": {"fill-color": "#34373d"} + }, + { + "id": "physical_line_stream", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 14, + "filter": [ + "all", + ["in", "pmap:kind", "stream"] + ], + "paint": {"line-color": "#34373d", "line-width": 0.5} + }, + { + "id": "physical_line_river", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 9, + "filter": [ + "all", + ["in", "pmap:kind", "river"] + ], + "paint": { + "line-color": "#34373d", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1, + 18, + 12 + ] + } + }, + { + "id": "landuse_pedestrian", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pedestrian"] + ], + "paint": {"fill-color": "#1e1e1e"} + }, + { + "id": "landuse_pier", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": {"fill-color": "#222222"} + }, + { + "id": "roads_tunnels_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#141414", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#141414", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#141414", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#141414", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#141414", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#141414", + "line-dasharray": [6, 0.5], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_tunnels_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#292929", + "line-dasharray": [4.5, 0.5], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#292929", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "buildings", + "type": "fill", + "source": "protomaps", + "source-layer": "buildings", + "paint": {"fill-color": "#111111", "fill-opacity": 0.5} + }, + { + "id": "transit_pier", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": { + "line-color": "#333333", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 0.5, + 20, + 16 + ] + } + }, + { + "id": "roads_minor_service_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1.5 + ] + } + }, + { + "id": "roads_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_major_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_highway_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#333333", + "line-dasharray": [3, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#3d3d3d", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_minor_service", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#333333", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ] + } + }, + { + "id": "roads_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + "#3d3d3d", + 16, + "#333333" + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#3d3d3d", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_major_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#3d3d3d", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_highway_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1 + ] + } + }, + { + "id": "roads_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#474747", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "transit_railway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "all", + ["==", "pmap:kind", "rail"] + ], + "paint": { + "line-dasharray": [0.3, 0.75], + "line-opacity": 0.5, + "line-color": "#000000", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 0.15, + 18, + 9 + ] + } + }, + { + "id": "boundaries_country", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": ["<=", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#5b6374", + "line-width": 1, + "line-dasharray": [3, 2] + } + }, + { + "id": "boundaries", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": [">", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#5b6374", + "line-width": 0.5, + "line-dasharray": [3, 2] + } + }, + { + "id": "roads_bridges_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#2b2b2b", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_bridges_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 10 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#333333", + "line-dasharray": [2, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#333333", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#333333", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#3d3d3d", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#3d3d3d", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#1f1f1f", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_bridges_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#474747", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "physical_line_waterway_label", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 13, + "filter": [ + "all", + ["in", "pmap:kind", "river", "stream"] + ], + "layout": { + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12, + "text-letter-spacing": 0.3 + }, + "paint": {"text-color": "#717784"} + }, + { + "id": "physical_point_peak", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["==", "pmap:kind", "peak"] + ], + "layout": { + "text-font": ["Noto Sans Italic"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 10, + 8, + 16, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#898080", "text-halo-width": 1.5} + }, + { + "id": "roads_labels_minor", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 15, + "filter": [ + "any", + ["in", "pmap:kind", "minor_road", "other", "path"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#525252", + "text-halo-color": "#1f1f1f", + "text-halo-width": 2 + } + }, + { + "id": "physical_point_ocean", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "sea", + "ocean", + "lake", + "water", + "bay", + "strait", + "fjord" + ] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 10, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-transform": "uppercase" + }, + "paint": {"text-color": "#717784"} + }, + { + "id": "physical_point_lakes", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["in", "pmap:kind", "lake", "water"] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 0, + 6, + 12, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#717784"} + }, + { + "id": "roads_labels_major", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 11, + "filter": [ + "any", + ["in", "pmap:kind", "highway", "major_road", "medium_road"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#666666", + "text-halo-color": "#1f1f1f", + "text-halo-width": 2 + } + }, + { + "id": "places_subplace", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "neighbourhood"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 7, + "text-letter-spacing": 0.1, + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 2, + 8, + 4, + 12, + 18, + 15, + 20 + ], + "text-size": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 11, + 8, + 14, + 14, + 18, + 24 + ], + "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", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "locality"], + "layout": { + "text-field": "{name}", + "text-font": [ + "case", + [ + "<=", + ["get", "pmap:min_zoom"], + 5 + ], + [ + "literal", + ["Noto Sans Medium"] + ], + [ + "literal", + ["Noto Sans Regular"] + ] + ], + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 3, + 8, + 7, + 12, + 11 + ], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 13, + 0 + ], + 4, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 15, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 12 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 12 + ], + 17, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 11 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 11 + ], + 18, + 0 + ], + 10, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 9 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 9 + ], + 20, + 0 + ], + 15, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 22, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 8, + 4, + 10, + 8, + 12, + 6, + 22, + 2 + ], + "text-anchor": [ + "step", + ["zoom"], + "left", + 8, + "center" + ], + "text-radial-offset": 0.2 + }, + "paint": { + "text-color": "#7a7a7a", + "text-halo-color": "#212121", + "text-halo-width": 1 + } + }, + { + "id": "places_region", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "region"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": [ + "step", + ["zoom"], + ["get", "name:short"], + 6, + ["get", "name"] + ], + "text-font": ["Noto Sans Regular"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 11, + 7, + 16 + ], + "text-radial-offset": 0.2, + "text-anchor": "center", + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#3d3d3d", + "text-halo-color": "#1f1f1f", + "text-halo-width": 2 + } + }, + { + "id": "places_country", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "country"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Medium"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 10 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 10 + ], + 12, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 18, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 7 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 7 + ], + 20, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 14, + 2, + 16, + 20, + 17, + 2, + 22, + 2 + ], + "text-transform": "uppercase" + }, + "paint": {"text-color": "#5c5c5c"} + } +]; diff --git a/vector_map_tiles_pmtiles/lib/src/themes/grayscale.dart b/vector_map_tiles_pmtiles/lib/src/themes/grayscale.dart new file mode 100644 index 0000000..349c1e5 --- /dev/null +++ b/vector_map_tiles_pmtiles/lib/src/themes/grayscale.dart @@ -0,0 +1,2149 @@ +part of 'protomaps_themes.dart'; + +// ignore_for_file: prefer_single_quotes, require_trailing_commas + +const themeGrayscale = [ + { + "id": "background", + "type": "background", + "paint": {"background-color": "#a3a3a3"} + }, + { + "id": "earth", + "type": "fill", + "source": "protomaps", + "source-layer": "earth", + "paint": {"fill-color": "#cccccc"} + }, + { + "id": "landuse_park", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "national_park", + "park", + "cemetery", + "protected_area", + "nature_reserve", + "forest", + "golf_course" + ] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#c2c2c2", + 12, + "#c2c2c2" + ] + } + }, + { + "id": "landuse_urban_green", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "allotments", "village_green", "playground"] + ], + "paint": {"fill-color": "#c2c2c2", "fill-opacity": 0.7} + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "hospital"] + ], + "paint": {"fill-color": "#d0d0d0"} + }, + { + "id": "landuse_industrial", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "industrial"] + ], + "paint": {"fill-color": "#c6c6c6"} + }, + { + "id": "landuse_school", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "school", "university", "college"] + ], + "paint": {"fill-color": "#d0d0d0"} + }, + { + "id": "landuse_beach", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "beach"] + ], + "paint": {"fill-color": "#d2d2d2"} + }, + { + "id": "landuse_zoo", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "zoo"] + ], + "paint": {"fill-color": "#c7c7c7"} + }, + { + "id": "landuse_military", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "military", "naval_base", "airfield"] + ], + "paint": {"fill-color": "#c7c7c7"} + }, + { + "id": "natural_wood", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": [ + "any", + ["in", "pmap:kind", "wood", "nature_reserve", "forest"] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#c2c2c2", + 12, + "#c2c2c2" + ] + } + }, + { + "id": "natural_scrub", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["in", "pmap:kind", "scrub", "grassland", "grass"], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#c2c2c2", + 12, + "#c2c2c2" + ] + } + }, + { + "id": "natural_glacier", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "glacier"], + "paint": {"fill-color": "#d2d2d2"} + }, + { + "id": "natural_sand", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "sand"], + "paint": {"fill-color": "#d2d2d2"} + }, + { + "id": "landuse_aerodrome", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "aerodrome"] + ], + "paint": {"fill-color": "#c9c9c9"} + }, + { + "id": "transit_runway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["in", "pmap:kind_detail", "runway"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 12, + 4, + 18, + 30 + ] + } + }, + { + "id": "transit_taxiway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "minzoom": 13, + "filter": [ + "any", + ["in", "pmap:kind_detail", "taxiway"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 15, + 6 + ] + } + }, + { + "id": "water", + "type": "fill", + "source": "protomaps", + "source-layer": "water", + "paint": {"fill-color": "#a3a3a3"} + }, + { + "id": "physical_line_stream", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 14, + "filter": [ + "all", + ["in", "pmap:kind", "stream"] + ], + "paint": {"line-color": "#a3a3a3", "line-width": 0.5} + }, + { + "id": "physical_line_river", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 9, + "filter": [ + "all", + ["in", "pmap:kind", "river"] + ], + "paint": { + "line-color": "#a3a3a3", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1, + 18, + 12 + ] + } + }, + { + "id": "landuse_pedestrian", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pedestrian"] + ], + "paint": {"fill-color": "#c4c4c4"} + }, + { + "id": "landuse_pier", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": {"fill-color": "#b8b8b8"} + }, + { + "id": "roads_tunnels_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#b8b8b8", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#b8b8b8", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#b8b8b8", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#b8b8b8", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#b8b8b8", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#b8b8b8", + "line-dasharray": [6, 0.5], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_tunnels_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-dasharray": [4.5, 0.5], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "buildings", + "type": "fill", + "source": "protomaps", + "source-layer": "buildings", + "paint": {"fill-color": "#e0e0e0", "fill-opacity": 0.5} + }, + { + "id": "transit_pier", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": { + "line-color": "#b8b8b8", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 0.5, + 20, + 16 + ] + } + }, + { + "id": "roads_minor_service_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1.5 + ] + } + }, + { + "id": "roads_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_major_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_highway_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [3, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_minor_service", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ] + } + }, + { + "id": "roads_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + "#ebebeb", + 16, + "#e0e0e0" + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_major_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_highway_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1 + ] + } + }, + { + "id": "roads_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "transit_railway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "all", + ["==", "pmap:kind", "rail"] + ], + "paint": { + "line-dasharray": [0.3, 0.75], + "line-opacity": 0.5, + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 0.15, + 18, + 9 + ] + } + }, + { + "id": "boundaries_country", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": ["<=", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#5c5c5c", + "line-width": 1, + "line-dasharray": [3, 2] + } + }, + { + "id": "boundaries", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": [">", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#5c5c5c", + "line-width": 0.5, + "line-dasharray": [3, 2] + } + }, + { + "id": "roads_bridges_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_bridges_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 10 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [2, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#cccccc", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_bridges_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "physical_line_waterway_label", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 13, + "filter": [ + "all", + ["in", "pmap:kind", "river", "stream"] + ], + "layout": { + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12, + "text-letter-spacing": 0.3 + }, + "paint": {"text-color": "#7a7a7a"} + }, + { + "id": "physical_point_peak", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["==", "pmap:kind", "peak"] + ], + "layout": { + "text-font": ["Noto Sans Italic"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 10, + 8, + 16, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#5c5c5c", "text-halo-width": 1.5} + }, + { + "id": "roads_labels_minor", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 15, + "filter": [ + "any", + ["in", "pmap:kind", "minor_road", "other", "path"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#999999", + "text-halo-color": "#e0e0e0", + "text-halo-width": 2 + } + }, + { + "id": "physical_point_ocean", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "sea", + "ocean", + "lake", + "water", + "bay", + "strait", + "fjord" + ] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 10, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-transform": "uppercase" + }, + "paint": {"text-color": "#7a7a7a"} + }, + { + "id": "physical_point_lakes", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["in", "pmap:kind", "lake", "water"] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 0, + 6, + 12, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#7a7a7a"} + }, + { + "id": "roads_labels_major", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 11, + "filter": [ + "any", + ["in", "pmap:kind", "highway", "major_road", "medium_road"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#8f8f8f", + "text-halo-color": "#ebebeb", + "text-halo-width": 2 + } + }, + { + "id": "places_subplace", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "neighbourhood"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 7, + "text-letter-spacing": 0.1, + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 2, + 8, + 4, + 12, + 18, + 15, + 20 + ], + "text-size": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 11, + 8, + 14, + 14, + 18, + 24 + ], + "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", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "locality"], + "layout": { + "text-field": "{name}", + "text-font": [ + "case", + [ + "<=", + ["get", "pmap:min_zoom"], + 5 + ], + [ + "literal", + ["Noto Sans Medium"] + ], + [ + "literal", + ["Noto Sans Regular"] + ] + ], + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 3, + 8, + 7, + 12, + 11 + ], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 13, + 0 + ], + 4, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 15, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 12 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 12 + ], + 17, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 11 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 11 + ], + 18, + 0 + ], + 10, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 9 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 9 + ], + 20, + 0 + ], + 15, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 22, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 8, + 4, + 10, + 8, + 12, + 6, + 22, + 2 + ], + "text-anchor": [ + "step", + ["zoom"], + "left", + 8, + "center" + ], + "text-radial-offset": 0.2 + }, + "paint": { + "text-color": "#474747", + "text-halo-color": "#cccccc", + "text-halo-width": 1 + } + }, + { + "id": "places_region", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "region"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": [ + "step", + ["zoom"], + ["get", "name:short"], + 6, + ["get", "name"] + ], + "text-font": ["Noto Sans Regular"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 11, + 7, + 16 + ], + "text-radial-offset": 0.2, + "text-anchor": "center", + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#999999", + "text-halo-color": "#cccccc", + "text-halo-width": 2 + } + }, + { + "id": "places_country", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "country"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Medium"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 10 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 10 + ], + 12, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 18, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 7 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 7 + ], + 20, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 14, + 2, + 16, + 20, + 17, + 2, + 22, + 2 + ], + "text-transform": "uppercase" + }, + "paint": {"text-color": "#858585"} + } +]; diff --git a/vector_map_tiles_pmtiles/lib/src/themes/light.dart b/vector_map_tiles_pmtiles/lib/src/themes/light.dart new file mode 100644 index 0000000..252e727 --- /dev/null +++ b/vector_map_tiles_pmtiles/lib/src/themes/light.dart @@ -0,0 +1,2149 @@ +part of 'protomaps_themes.dart'; + +// ignore_for_file: prefer_single_quotes, require_trailing_commas + +const themeLight = [ + { + "id": "background", + "type": "background", + "paint": {"background-color": "#cccccc"} + }, + { + "id": "earth", + "type": "fill", + "source": "protomaps", + "source-layer": "earth", + "paint": {"fill-color": "#e0e0e0"} + }, + { + "id": "landuse_park", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "national_park", + "park", + "cemetery", + "protected_area", + "nature_reserve", + "forest", + "golf_course" + ] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#cfddd5", + 12, + "#9cd3b4" + ] + } + }, + { + "id": "landuse_urban_green", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "allotments", "village_green", "playground"] + ], + "paint": {"fill-color": "#9cd3b4", "fill-opacity": 0.7} + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "hospital"] + ], + "paint": {"fill-color": "#e4dad9"} + }, + { + "id": "landuse_industrial", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "industrial"] + ], + "paint": {"fill-color": "#d1dde1"} + }, + { + "id": "landuse_school", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "school", "university", "college"] + ], + "paint": {"fill-color": "#e4ded7"} + }, + { + "id": "landuse_beach", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "beach"] + ], + "paint": {"fill-color": "#e8e4d0"} + }, + { + "id": "landuse_zoo", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "zoo"] + ], + "paint": {"fill-color": "#c6dcdc"} + }, + { + "id": "landuse_military", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "military", "naval_base", "airfield"] + ], + "paint": {"fill-color": "#c6dcdc"} + }, + { + "id": "natural_wood", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": [ + "any", + ["in", "pmap:kind", "wood", "nature_reserve", "forest"] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#d0ded0", + 12, + "#a0d9a0" + ] + } + }, + { + "id": "natural_scrub", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["in", "pmap:kind", "scrub", "grassland", "grass"], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#cedcd7", + 12, + "#99d2bb" + ] + } + }, + { + "id": "natural_glacier", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "glacier"], + "paint": {"fill-color": "#e7e7e7"} + }, + { + "id": "natural_sand", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "sand"], + "paint": {"fill-color": "#e2e0d7"} + }, + { + "id": "landuse_aerodrome", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "aerodrome"] + ], + "paint": {"fill-color": "#dadbdf"} + }, + { + "id": "transit_runway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["in", "pmap:kind_detail", "runway"] + ], + "paint": { + "line-color": "#e9e9ed", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 12, + 4, + 18, + 30 + ] + } + }, + { + "id": "transit_taxiway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "minzoom": 13, + "filter": [ + "any", + ["in", "pmap:kind_detail", "taxiway"] + ], + "paint": { + "line-color": "#e9e9ed", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 15, + 6 + ] + } + }, + { + "id": "water", + "type": "fill", + "source": "protomaps", + "source-layer": "water", + "paint": {"fill-color": "#80deea"} + }, + { + "id": "physical_line_stream", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 14, + "filter": [ + "all", + ["in", "pmap:kind", "stream"] + ], + "paint": {"line-color": "#80deea", "line-width": 0.5} + }, + { + "id": "physical_line_river", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 9, + "filter": [ + "all", + ["in", "pmap:kind", "river"] + ], + "paint": { + "line-color": "#80deea", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1, + 18, + 12 + ] + } + }, + { + "id": "landuse_pedestrian", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pedestrian"] + ], + "paint": {"fill-color": "#e3e0d4"} + }, + { + "id": "landuse_pier", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": {"fill-color": "#e0e0e0"} + }, + { + "id": "roads_tunnels_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-dasharray": [6, 0.5], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_tunnels_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#d5d5d5", + "line-dasharray": [4.5, 0.5], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#d5d5d5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "buildings", + "type": "fill", + "source": "protomaps", + "source-layer": "buildings", + "paint": {"fill-color": "#cccccc", "fill-opacity": 0.5} + }, + { + "id": "transit_pier", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 0.5, + 20, + 16 + ] + } + }, + { + "id": "roads_minor_service_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1.5 + ] + } + }, + { + "id": "roads_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_major_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_highway_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#ebebeb", + "line-dasharray": [3, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_minor_service", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ] + } + }, + { + "id": "roads_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + "#ebebeb", + 16, + "#ffffff" + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_major_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_highway_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1 + ] + } + }, + { + "id": "roads_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "transit_railway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "all", + ["==", "pmap:kind", "rail"] + ], + "paint": { + "line-dasharray": [0.3, 0.75], + "line-opacity": 0.5, + "line-color": "#a7b1b3", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 0.15, + 18, + 9 + ] + } + }, + { + "id": "boundaries_country", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": ["<=", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#adadad", + "line-width": 1, + "line-dasharray": [3, 2] + } + }, + { + "id": "boundaries", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": [">", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#adadad", + "line-width": 0.5, + "line-dasharray": [3, 2] + } + }, + { + "id": "roads_bridges_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_bridges_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 10 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#ebebeb", + "line-dasharray": [2, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#f0eded", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#e0e0e0", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_bridges_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "physical_line_waterway_label", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 13, + "filter": [ + "all", + ["in", "pmap:kind", "river", "stream"] + ], + "layout": { + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12, + "text-letter-spacing": 0.3 + }, + "paint": {"text-color": "#ffffff"} + }, + { + "id": "physical_point_peak", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["==", "pmap:kind", "peak"] + ], + "layout": { + "text-font": ["Noto Sans Italic"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 10, + 8, + 16, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#7e9aa0", "text-halo-width": 1.5} + }, + { + "id": "roads_labels_minor", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 15, + "filter": [ + "any", + ["in", "pmap:kind", "minor_road", "other", "path"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#91888b", + "text-halo-color": "#ffffff", + "text-halo-width": 2 + } + }, + { + "id": "physical_point_ocean", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "sea", + "ocean", + "lake", + "water", + "bay", + "strait", + "fjord" + ] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 10, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-transform": "uppercase" + }, + "paint": {"text-color": "#ffffff"} + }, + { + "id": "physical_point_lakes", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["in", "pmap:kind", "lake", "water"] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 0, + 6, + 12, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#ffffff"} + }, + { + "id": "roads_labels_major", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 11, + "filter": [ + "any", + ["in", "pmap:kind", "highway", "major_road", "medium_road"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#938a8d", + "text-halo-color": "#ffffff", + "text-halo-width": 2 + } + }, + { + "id": "places_subplace", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "neighbourhood"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 7, + "text-letter-spacing": 0.1, + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 2, + 8, + 4, + 12, + 18, + 15, + 20 + ], + "text-size": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 11, + 8, + 14, + 14, + 18, + 24 + ], + "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", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "locality"], + "layout": { + "text-field": "{name}", + "text-font": [ + "case", + [ + "<=", + ["get", "pmap:min_zoom"], + 5 + ], + [ + "literal", + ["Noto Sans Medium"] + ], + [ + "literal", + ["Noto Sans Regular"] + ] + ], + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 3, + 8, + 7, + 12, + 11 + ], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 13, + 0 + ], + 4, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 15, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 12 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 12 + ], + 17, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 11 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 11 + ], + 18, + 0 + ], + 10, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 9 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 9 + ], + 20, + 0 + ], + 15, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 22, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 8, + 4, + 10, + 8, + 12, + 6, + 22, + 2 + ], + "text-anchor": [ + "step", + ["zoom"], + "left", + 8, + "center" + ], + "text-radial-offset": 0.2 + }, + "paint": { + "text-color": "#5c5c5c", + "text-halo-color": "#e0e0e0", + "text-halo-width": 1 + } + }, + { + "id": "places_region", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "region"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": [ + "step", + ["zoom"], + ["get", "name:short"], + 6, + ["get", "name"] + ], + "text-font": ["Noto Sans Regular"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 11, + 7, + 16 + ], + "text-radial-offset": 0.2, + "text-anchor": "center", + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#b3b3b3", + "text-halo-color": "#e0e0e0", + "text-halo-width": 2 + } + }, + { + "id": "places_country", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "country"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Medium"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 10 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 10 + ], + 12, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 18, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 7 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 7 + ], + 20, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 14, + 2, + 16, + 20, + 17, + 2, + 22, + 2 + ], + "text-transform": "uppercase" + }, + "paint": {"text-color": "#a3a3a3"} + } +]; diff --git a/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart b/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart new file mode 100644 index 0000000..1d762ee --- /dev/null +++ b/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart @@ -0,0 +1,62 @@ +import 'package:vector_tile_renderer/vector_tile_renderer.dart'; + +// ignore_for_file: prefer_single_quotes, require_trailing_commas + +part 'black.dart'; +part 'dark.dart'; +part 'grayscale.dart'; +part 'light.dart'; +part 'white.dart'; + +/// Protomaps themes, version 2.0.0-alpha.5 +/// +/// All themes are published by Protomaps under CC0 / public domain. +/// +/// https://unpkg.com/browse/protomaps-themes-base@2.0.0-alpha.5/dist/layers/ +class ProtomapsThemes { + final Logger? logger; + final Map sources; + final String glyphs; + + const ProtomapsThemes({ + this.logger, + this.sources = const { + "protomaps": { + "type": "vector", + "attribution": + "Protomaps © OpenStreetMap", + "url": "https://example.com/tiles.json" + } + }, + this.glyphs = + "https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf", + }); + + Theme build(List> layers) => + ThemeReader(logger: logger).read({ + "version": 8, + "sources": sources, + "layers": layers, + "glyphs": glyphs, + }); + + /// Default Protomaps black theme + static Theme black({Logger? logger}) => + ProtomapsThemes(logger: logger).build(themeBlack); + + /// Default Protomaps dark theme + static Theme dark({Logger? logger}) => + ProtomapsThemes(logger: logger).build(themeDark); + + /// Default Protomaps grayscale theme + static Theme grayscale({Logger? logger}) => + ProtomapsThemes(logger: logger).build(themeGrayscale); + + /// Default Protomaps light theme + static Theme light({Logger? logger}) => + ProtomapsThemes(logger: logger).build(themeLight); + + /// Default Protomaps white theme + static Theme white({Logger? logger}) => + ProtomapsThemes(logger: logger).build(themeWhite); +} diff --git a/vector_map_tiles_pmtiles/lib/src/themes/white.dart b/vector_map_tiles_pmtiles/lib/src/themes/white.dart new file mode 100644 index 0000000..51bd4ed --- /dev/null +++ b/vector_map_tiles_pmtiles/lib/src/themes/white.dart @@ -0,0 +1,2149 @@ +part of 'protomaps_themes.dart'; + +// ignore_for_file: prefer_single_quotes, require_trailing_commas + +const themeWhite = [ + { + "id": "background", + "type": "background", + "paint": {"background-color": "#ffffff"} + }, + { + "id": "earth", + "type": "fill", + "source": "protomaps", + "source-layer": "earth", + "paint": {"fill-color": "#ffffff"} + }, + { + "id": "landuse_park", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "national_park", + "park", + "cemetery", + "protected_area", + "nature_reserve", + "forest", + "golf_course" + ] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#fcfcfc", + 12, + "#fcfcfc" + ] + } + }, + { + "id": "landuse_urban_green", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "allotments", "village_green", "playground"] + ], + "paint": {"fill-color": "#fcfcfc", "fill-opacity": 0.7} + }, + { + "id": "landuse_hospital", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "hospital"] + ], + "paint": {"fill-color": "#f8f8f8"} + }, + { + "id": "landuse_industrial", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "industrial"] + ], + "paint": {"fill-color": "#fcfcfc"} + }, + { + "id": "landuse_school", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "school", "university", "college"] + ], + "paint": {"fill-color": "#f8f8f8"} + }, + { + "id": "landuse_beach", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "beach"] + ], + "paint": {"fill-color": "#f6f6f6"} + }, + { + "id": "landuse_zoo", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "zoo"] + ], + "paint": {"fill-color": "#f7f7f7"} + }, + { + "id": "landuse_military", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "military", "naval_base", "airfield"] + ], + "paint": {"fill-color": "#f7f7f7"} + }, + { + "id": "natural_wood", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": [ + "any", + ["in", "pmap:kind", "wood", "nature_reserve", "forest"] + ], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#fafafa", + 12, + "#fafafa" + ] + } + }, + { + "id": "natural_scrub", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["in", "pmap:kind", "scrub", "grassland", "grass"], + "paint": { + "fill-color": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + "#fafafa", + 12, + "#fafafa" + ] + } + }, + { + "id": "natural_glacier", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "glacier"], + "paint": {"fill-color": "#fcfcfc"} + }, + { + "id": "natural_sand", + "type": "fill", + "source": "protomaps", + "source-layer": "natural", + "filter": ["==", "pmap:kind", "sand"], + "paint": {"fill-color": "#fafafa"} + }, + { + "id": "landuse_aerodrome", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["in", "pmap:kind", "aerodrome"] + ], + "paint": {"fill-color": "#fdfdfd"} + }, + { + "id": "transit_runway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["in", "pmap:kind_detail", "runway"] + ], + "paint": { + "line-color": "#efefef", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 12, + 4, + 18, + 30 + ] + } + }, + { + "id": "transit_taxiway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "minzoom": 13, + "filter": [ + "any", + ["in", "pmap:kind_detail", "taxiway"] + ], + "paint": { + "line-color": "#efefef", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 15, + 6 + ] + } + }, + { + "id": "water", + "type": "fill", + "source": "protomaps", + "source-layer": "water", + "paint": {"fill-color": "#dcdcdc"} + }, + { + "id": "physical_line_stream", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 14, + "filter": [ + "all", + ["in", "pmap:kind", "stream"] + ], + "paint": {"line-color": "#dcdcdc", "line-width": 0.5} + }, + { + "id": "physical_line_river", + "type": "line", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 9, + "filter": [ + "all", + ["in", "pmap:kind", "river"] + ], + "paint": { + "line-color": "#dcdcdc", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1, + 18, + 12 + ] + } + }, + { + "id": "landuse_pedestrian", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pedestrian"] + ], + "paint": {"fill-color": "#fdfdfd"} + }, + { + "id": "landuse_pier", + "type": "fill", + "source": "protomaps", + "source-layer": "landuse", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": {"fill-color": "#f5f5f5"} + }, + { + "id": "roads_tunnels_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#fcfcfc", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#fcfcfc", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#fcfcfc", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#fcfcfc", + "line-dasharray": [3, 2], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_tunnels_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#fcfcfc", + "line-dasharray": [6, 0.5], + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_tunnels_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-dasharray": [4.5, 0.5], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_tunnels_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_tunnels_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_tunnels_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["<", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "buildings", + "type": "fill", + "source": "protomaps", + "source-layer": "buildings", + "paint": {"fill-color": "#efefef", "fill-opacity": 0.5} + }, + { + "id": "transit_pier", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "any", + ["==", "pmap:kind", "pier"] + ], + "paint": { + "line-color": "#efefef", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 0.5, + 20, + 16 + ] + } + }, + { + "id": "roads_minor_service_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1 + ] + } + }, + { + "id": "roads_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 13, + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1.5 + ] + } + }, + { + "id": "roads_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_major_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_highway_casing_late", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-dasharray": [3, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_minor_service", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["==", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 18, + 8 + ] + } + }, + { + "id": "roads_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"], + ["!=", "pmap:kind_detail", "service"] + ], + "paint": { + "line-color": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + "#ebebeb", + 16, + "#f5f5f5" + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_major_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1 + ] + } + }, + { + "id": "roads_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_highway_casing_early", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "maxzoom": 12, + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1 + ] + } + }, + { + "id": "roads_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + ["==", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "transit_railway", + "type": "line", + "source": "protomaps", + "source-layer": "transit", + "filter": [ + "all", + ["==", "pmap:kind", "rail"] + ], + "paint": { + "line-dasharray": [0.3, 0.75], + "line-opacity": 0.5, + "line-color": "#d6d6d6", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 0.15, + 18, + 9 + ] + } + }, + { + "id": "boundaries_country", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": ["<=", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#adadad", + "line-width": 1, + "line-dasharray": [3, 2] + } + }, + { + "id": "boundaries", + "type": "line", + "source": "protomaps", + "source-layer": "boundaries", + "filter": [">", "pmap:min_admin_level", 2], + "paint": { + "line-color": "#adadad", + "line-width": 0.5, + "line-dasharray": [3, 2] + } + }, + { + "id": "roads_bridges_other_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_link_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 12, + 0, + 12.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_minor_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 0.8 + ] + } + }, + { + "id": "roads_bridges_medium_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 10, + 0, + 10.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_major_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 0.5, + 18, + 10 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 9, + 0, + 9.5, + 1.5 + ] + } + }, + { + "id": "roads_bridges_other", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["in", "pmap:kind", "other", "path"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-dasharray": [2, 1], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 14, + 0, + 20, + 7 + ] + } + }, + { + "id": "roads_bridges_minor", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "minor_road"] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 11, + 0, + 12.5, + 0.5, + 15, + 2, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_link", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:link", 1] + ], + "paint": { + "line-color": "#f5f5f5", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 13, + 0, + 13.5, + 1, + 18, + 11 + ] + } + }, + { + "id": "roads_bridges_medium", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "medium_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 12, + 1.2, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_major", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "major_road"] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 6, + 0, + 12, + 1.6, + 15, + 3, + 18, + 13 + ] + } + }, + { + "id": "roads_bridges_highway_casing", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 12, + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ffffff", + "line-gap-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 3.5, + 0.5, + 18, + 15 + ], + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 7, + 0, + 7.5, + 1, + 20, + 15 + ] + } + }, + { + "id": "roads_bridges_highway", + "type": "line", + "source": "protomaps", + "source-layer": "roads", + "filter": [ + "all", + [">", "pmap:level", 0], + ["==", "pmap:kind", "highway"], + ["!=", "pmap:link", 1] + ], + "paint": { + "line-color": "#ebebeb", + "line-width": [ + "interpolate", + ["exponential", 1.6], + ["zoom"], + 3, + 0, + 6, + 1.1, + 12, + 1.6, + 15, + 5, + 18, + 15 + ] + } + }, + { + "id": "physical_line_waterway_label", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_line", + "minzoom": 13, + "filter": [ + "all", + ["in", "pmap:kind", "river", "stream"] + ], + "layout": { + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12, + "text-letter-spacing": 0.3 + }, + "paint": {"text-color": "#adadad"} + }, + { + "id": "physical_point_peak", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["==", "pmap:kind", "peak"] + ], + "layout": { + "text-font": ["Noto Sans Italic"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 10, + 8, + 16, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#adadad", "text-halo-width": 1.5} + }, + { + "id": "roads_labels_minor", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 15, + "filter": [ + "any", + ["in", "pmap:kind", "minor_road", "other", "path"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#adadad", + "text-halo-color": "#ffffff", + "text-halo-width": 2 + } + }, + { + "id": "physical_point_ocean", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + [ + "in", + "pmap:kind", + "sea", + "ocean", + "lake", + "water", + "bay", + "strait", + "fjord" + ] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 10, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-transform": "uppercase" + }, + "paint": {"text-color": "#adadad"} + }, + { + "id": "physical_point_lakes", + "type": "symbol", + "source": "protomaps", + "source-layer": "physical_point", + "filter": [ + "any", + ["in", "pmap:kind", "lake", "water"] + ], + "layout": { + "text-font": ["Noto Sans Medium"], + "text-field": ["get", "name"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 0, + 6, + 12, + 10, + 12 + ], + "text-letter-spacing": 0.1, + "text-max-width": 9 + }, + "paint": {"text-color": "#adadad"} + }, + { + "id": "roads_labels_major", + "type": "symbol", + "source": "protomaps", + "source-layer": "roads", + "minzoom": 11, + "filter": [ + "any", + ["in", "pmap:kind", "highway", "major_road", "medium_road"] + ], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "symbol-placement": "line", + "text-font": ["Noto Sans Regular"], + "text-field": ["get", "name"], + "text-size": 12 + }, + "paint": { + "text-color": "#999999", + "text-halo-color": "#ffffff", + "text-halo-width": 2 + } + }, + { + "id": "places_subplace", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "neighbourhood"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 7, + "text-letter-spacing": 0.1, + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 2, + 8, + 4, + 12, + 18, + 15, + 20 + ], + "text-size": [ + "interpolate", + ["exponential", 1.2], + ["zoom"], + 11, + 8, + 14, + 14, + 18, + 24 + ], + "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", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "locality"], + "layout": { + "text-field": "{name}", + "text-font": [ + "case", + [ + "<=", + ["get", "pmap:min_zoom"], + 5 + ], + [ + "literal", + ["Noto Sans Medium"] + ], + [ + "literal", + ["Noto Sans Regular"] + ] + ], + "text-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 5, + 3, + 8, + 7, + 12, + 11 + ], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 13, + 0 + ], + 4, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 13 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 13 + ], + 15, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 12 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 12 + ], + 17, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 11 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 11 + ], + 18, + 0 + ], + 10, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 9 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 9 + ], + 20, + 0 + ], + 15, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 12, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 22, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 8, + 4, + 10, + 8, + 12, + 6, + 22, + 2 + ], + "text-anchor": [ + "step", + ["zoom"], + "left", + 8, + "center" + ], + "text-radial-offset": 0.2 + }, + "paint": { + "text-color": "#5c5c5c", + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "places_region", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "region"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": [ + "step", + ["zoom"], + ["get", "name:short"], + 6, + ["get", "name"] + ], + "text-font": ["Noto Sans Regular"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 3, + 11, + 7, + 16 + ], + "text-radial-offset": 0.2, + "text-anchor": "center", + "text-transform": "uppercase" + }, + "paint": { + "text-color": "#b3b3b3", + "text-halo-color": "#ffffff", + "text-halo-width": 2 + } + }, + { + "id": "places_country", + "type": "symbol", + "source": "protomaps", + "source-layer": "places", + "filter": ["==", "pmap:kind", "country"], + "layout": { + "symbol-sort-key": ["get", "pmap:min_zoom"], + "text-field": "{name}", + "text-font": ["Noto Sans Medium"], + "text-size": [ + "interpolate", + ["linear"], + ["zoom"], + 2, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 10 + ], + 8, + [ + ">=", + ["get", "pmap:population_rank"], + 10 + ], + 12, + 0 + ], + 6, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 8 + ], + 10, + [ + ">=", + ["get", "pmap:population_rank"], + 8 + ], + 18, + 0 + ], + 8, + [ + "case", + [ + "<", + ["get", "pmap:population_rank"], + 7 + ], + 11, + [ + ">=", + ["get", "pmap:population_rank"], + 7 + ], + 20, + 0 + ] + ], + "icon-padding": [ + "interpolate", + ["linear"], + ["zoom"], + 0, + 2, + 14, + 2, + 16, + 20, + 17, + 2, + 22, + 2 + ], + "text-transform": "uppercase" + }, + "paint": {"text-color": "#b8b8b8"} + } +]; diff --git a/vector_map_tiles_pmtiles/lib/src/vector_tile_provider.dart b/vector_map_tiles_pmtiles/lib/src/vector_tile_provider.dart index 277bd6c..3e2c110 100644 --- a/vector_map_tiles_pmtiles/lib/src/vector_tile_provider.dart +++ b/vector_map_tiles_pmtiles/lib/src/vector_tile_provider.dart @@ -1,5 +1,4 @@ -import 'dart:typed_data'; - +import 'package:flutter/foundation.dart'; import 'package:pmtiles/pmtiles.dart'; import 'package:vector_map_tiles/vector_map_tiles.dart'; @@ -11,14 +10,29 @@ class PmTilesVectorTileProvider extends VectorTileProvider { /// Create a tile provider directly with a [PmTilesArchive] from the /// pmtiles package. - PmTilesVectorTileProvider.fromArchive(this.archive); + PmTilesVectorTileProvider.fromArchive( + this.archive, { + this.silenceTileNotFound = !kDebugMode, + }); + + /// Set to true if [TileNotFoundException]s should not be visible in the + /// console. + /// + /// By default this is disabled in debug mode and enabled else. + final bool silenceTileNotFound; /// Create a tile provider by specifying the source of the PMTiles file. /// /// [source] can either be a URL or path on your file system. - static Future fromSource(String source) async { + static Future fromSource( + String source, { + bool silenceTileNotFound = !kDebugMode, + }) async { final archive = await PmTilesArchive.from(source); - return PmTilesVectorTileProvider.fromArchive(archive); + return PmTilesVectorTileProvider.fromArchive( + archive, + silenceTileNotFound: silenceTileNotFound, + ); } /// The maximum zoom level that the tile provider supports. @@ -33,7 +47,15 @@ class PmTilesVectorTileProvider extends VectorTileProvider { @override Future provide(TileIdentity tile) async { final tileId = ZXY(tile.z, tile.x, tile.y).toTileId(); - final data = await archive.tile(tileId); - return Uint8List.fromList(data.bytes()); + try { + final data = await archive.tile(tileId); + return Uint8List.fromList(data.bytes()); + } on TileNotFoundException { + if (silenceTileNotFound) { + return Uint8List(0); + } else { + rethrow; + } + } } } diff --git a/vector_map_tiles_pmtiles/lib/vector_map_tiles_pmtiles.dart b/vector_map_tiles_pmtiles/lib/vector_map_tiles_pmtiles.dart index 5c42305..293f376 100644 --- a/vector_map_tiles_pmtiles/lib/vector_map_tiles_pmtiles.dart +++ b/vector_map_tiles_pmtiles/lib/vector_map_tiles_pmtiles.dart @@ -1 +1,2 @@ +export 'src/themes/protomaps_themes.dart'; export 'src/vector_tile_provider.dart'; diff --git a/vector_map_tiles_pmtiles/pubspec.yaml b/vector_map_tiles_pmtiles/pubspec.yaml index df1b154..7a2c029 100644 --- a/vector_map_tiles_pmtiles/pubspec.yaml +++ b/vector_map_tiles_pmtiles/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: sdk: flutter pmtiles: ^1.2.0 vector_map_tiles: ^7.0.1 + vector_tile_renderer: ^5.2.0 dev_dependencies: flutter_test: