From 8d3f666ec799e596f2c438c0b4ac2deb3793b608 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Fri, 3 Jul 2026 11:06:38 +0200 Subject: [PATCH 1/9] add story --- .../MapStyle/SWRDataLabDark.stories.svelte | 20 +++++++++++++++++++ .../MapStyle/components/PlaceLabels.ts | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte index 804758df..38b55ac4 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte @@ -346,6 +346,26 @@ + + +
+
+ + + +
+
+
+
diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index bce54300..fd902a99 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -88,10 +88,11 @@ export default function makePlaceLabels(tokens: styleTokens) { ['<', 'population', 50_000], ['>', 'population', 15_000] ], - minzoom: 10, + minzoom: 8, layout: { 'text-size': { stops: [ + [8, 10], [10, 14], [12, 16] ] From f6df02002b44e2bbb55805b4f18d3d8e85fe52c2 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Fri, 3 Jul 2026 18:33:34 +0200 Subject: [PATCH 2/9] scaffold solution --- .../MapStyle/SWRDataLabDark.stories.svelte | 41 +++++++++++-------- .../MapStyle/SWRDataLabLight.stories.svelte | 2 +- .../MapStyle/components/PlaceLabels.ts | 2 +- .../MapStyle/components/RoadLabels.ts | 4 +- components/src/maplibre/MapStyle/types.ts | 11 ++--- 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte index 38b55ac4..567647ff 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte @@ -9,7 +9,7 @@ import { SWRDataLabDark, SWRDataLabLight } from './index'; import locations from './storyLocations'; import NavigationControl from '../NavigationControl/NavigationControl.svelte'; - import { type RoadLabelDensity } from './types'; + import { type LabelDensity } from './types'; const { Story } = defineMeta({ title: 'Maplibre/Style/SWR Data Lab Dark', @@ -51,7 +51,7 @@
- + +
-
- - - -
+ {#each ['none', 'default', 'dense'] as s} +
+ {s} + + + +
+ {/each}
+
diff --git a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte index c052e977..04632c12 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte @@ -50,7 +50,7 @@
Date: Mon, 6 Jul 2026 10:48:15 +0200 Subject: [PATCH 3/9] iterate labels --- .../MapStyle/SWRDataLabDark.stories.svelte | 15 +- .../src/maplibre/MapStyle/SWRDataLabDark.ts | 3 +- .../MapStyle/components/PlaceLabels.ts | 131 ++++++++++++++---- 3 files changed, 114 insertions(+), 35 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte index 567647ff..97ba3d37 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte @@ -9,7 +9,6 @@ import { SWRDataLabDark, SWRDataLabLight } from './index'; import locations from './storyLocations'; import NavigationControl from '../NavigationControl/NavigationControl.svelte'; - import { type LabelDensity } from './types'; const { Story } = defineMeta({ title: 'Maplibre/Style/SWR Data Lab Dark', @@ -347,20 +346,20 @@ - +
- {#each ['none', 'default', 'dense'] as s} + {#each ['default'] as s}
{s} diff --git a/components/src/maplibre/MapStyle/SWRDataLabDark.ts b/components/src/maplibre/MapStyle/SWRDataLabDark.ts index bb855197..79a29d06 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabDark.ts +++ b/components/src/maplibre/MapStyle/SWRDataLabDark.ts @@ -54,7 +54,7 @@ const tokens: styleTokens = { }; const { landuse } = makeLanduse(tokens); -const { placeLabels, boundaryLabels } = makePlaceLabels(tokens); +const { placeLabels, boundaryLabels, placeDots } = makePlaceLabels(tokens, {}); const { airports, transitBridges, transitSurface, transitTunnels } = makeTransit(tokens); const { walkingLabels, walkingTunnels, walkingSurface, walkingBridges } = makeWalking(tokens); const { roadBridges, roadSurface, roadTunnels } = makeRoads(tokens); @@ -158,6 +158,7 @@ const style: styleFunction = (opts) => { // 10. Point labels ...(options.places?.showLabels ? placeLabels : []), + ...(options.places?.showLabels ? placeDots : []), // 11. Admin boundary labels ...(options.admin?.showLabels ? boundaryLabels : []) diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index 2cec8f82..dae02866 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -1,11 +1,11 @@ -import type { SymbolLayerSpecification } from 'maplibre-gl'; +import type { CircleLayerSpecification, SymbolLayerSpecification } from 'maplibre-gl'; import type { styleTokens } from '../../types'; // Hand-authored list of place labes we want to show at low zoom levels // Ideally majorCities would include Frankfurt and Leipzig, but they're not // state capitals so they're not available in the versatiles data until z6 -const majorCities = ['Berlin', 'Stuttgart', 'München', 'Frankfurt', 'Hamburg', 'Mainz']; +const majorCities = ['Berlin', 'Stuttgart', 'München', 'Frankfurt', 'Hamburg', 'Mainz', 'Nürnberg']; // For smaller cities we use the population field to derive our hierarchy, // though that's limited by the fact that versatiles hard-codes population @@ -42,7 +42,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { ['in', 'kind', 'suburb', 'village', 'hamlet', 'town'], ['<', 'population', 2000] ], - minzoom: 13.5, + minzoom: 12, layout: { 'text-font': tokens.sans_regular, 'text-size': { @@ -50,7 +50,8 @@ export default function makePlaceLabels(tokens: styleTokens, options) { [13, 13], [16, 17] ] - } + }, + 'text-max-width': 8 }, paint: { 'text-color': tokens.label_secondary, @@ -63,40 +64,42 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'all', ['in', 'kind', 'suburb', 'village', 'hamlet', 'town'], ['>=', 'population', 2000], - ['<', 'population', 15_000] + ['<', 'population', 5_000] ], - minzoom: 12, + minzoom: 10, layout: { 'text-font': tokens.sans_regular, 'text-size': { stops: [ - [13, 14], - [16, 18] + [10, 11], + [16, 14] ] } }, paint: { - 'text-color': tokens.label_secondary, - 'text-halo-color': tokens.background + 'text-color': tokens.label_secondary } }, { id: 'label-place-town', filter: [ 'all', - ['in', 'kind', 'village', 'hamlet', 'town'], - ['<', 'population', 50_000], - ['>', 'population', 15_000] + ['in', 'kind', 'suburb', 'village', 'hamlet', 'town'], + ['>', 'population', 20_000], + ['<', 'population', 50_000] ], minzoom: 8, layout: { + 'text-max-width': 8, 'text-size': { stops: [ - [8, 10], - [10, 14], + [8, 11], [12, 16] ] } + }, + paint: { + 'text-color': tokens.label_secondary } }, @@ -109,14 +112,14 @@ export default function makePlaceLabels(tokens: styleTokens, options) { ['<', 'population', 100_000], ['!in', 'name', ...majorCities] ], - minzoom: 8.5, + minzoom: 8, maxzoom: 13, - layout: { + 'text-max-width': 10, 'text-size': { stops: [ - [8, 14], - [12, 18] + [8, 12], + [12, 16] ] } } @@ -131,12 +134,14 @@ export default function makePlaceLabels(tokens: styleTokens, options) { ['<', 'population', 400_000], ['!in', 'name', ...majorCities] ], - minzoom: 7.5, + minzoom: 7, maxzoom: 13, layout: { + 'text-variable-anchor': ['bottom', 'bottom-left', 'bottom-right', 'right', 'left'], + 'text-offset': [0.3, 0.4], 'text-size': { stops: [ - [7, 13], + [7, 14], [13, 17] ] } @@ -148,11 +153,21 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'all', ['in', 'kind', 'city', 'town', 'state_capital'], ['>', 'population', 400_000], - ['!in', 'name', ...majorCities] + ['!in', 'name', ...majorCities, 'Frankfurt am Main'] ], minzoom: 7, maxzoom: 12, layout: { + 'text-variable-anchor': [ + 'bottom', + 'bottom-left', + 'top-right', + 'top-left', + 'bottom-right', + 'right', + 'left' + ], + 'text-offset': [0.2, 0.4], 'text-size': { stops: [ [7, 15], @@ -170,12 +185,36 @@ export default function makePlaceLabels(tokens: styleTokens, options) { minzoom: 5.5, maxzoom: 12, layout: { + 'text-variable-anchor': ['bottom', 'bottom-right', 'right', 'left'], + 'text-offset': [0.4, 0.4], 'text-size': { stops: [ [7, 14], - [15, 25] + [15, 28] ] - } + }, + 'text-font': tokens.sans_bold + }, + paint: { + 'text-color': tokens.label_secondary + } + }, + { + id: 'label-place-frankfurt', + filter: ['==', 'name', 'Frankfurt am Main'], + minzoom: 5.5, + maxzoom: 12, + layout: { + 'text-variable-anchor': ['bottom', 'bottom-right', 'right', 'left'], + 'text-offset': [0.4, 0.4], + 'text-field': 'Frankfurt', + 'text-size': { + stops: [ + [7, 14], + [15, 28] + ] + }, + 'text-font': tokens.sans_bold }, paint: { 'text-color': tokens.label_secondary @@ -201,7 +240,47 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-halo-blur': 0.5, ...el.paint } - } as SymbolLayerSpecification; + }; + }); + + const placeDots: CircleLayerSpecification[] = [ + { + id: 'place-dots-minor', + minzoom: 7, + maxzoom: 13, + filter: [ + 'all', + ['in', 'kind', 'city', 'town'], + ['>', 'population', 100_000], + ['<', 'population', 400_000], + ['!in', 'name', ...majorCities] + ], + layout: {}, + paint: { + 'circle-radius': 2, + 'circle-stroke-color': tokens.background, + 'circle-color': tokens.label_tertiary + } + }, + { + id: 'place-dots-major', + filter: ['in', 'name', ...majorCities, 'Frankfurt am Main'], + minzoom: 5.5, + maxzoom: 12, + layout: {}, + paint: { + 'circle-radius': 3, + 'circle-stroke-color': tokens.background, + 'circle-color': tokens.label_tertiary + } + } + ].map((el) => { + return { + type: 'circle', + source: 'versatiles-osm', + 'source-layer': 'place_labels', + ...el + } as CircleLayerSpecification; }); const boundaryLabels = [ @@ -237,5 +316,5 @@ export default function makePlaceLabels(tokens: styleTokens, options) { } as SymbolLayerSpecification; }); - return { placeLabels, boundaryLabels }; + return { placeLabels, boundaryLabels, placeDots }; } From 1c8ca487192bd9725a50fc096cdfda37397d9feb Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 6 Jul 2026 10:56:42 +0200 Subject: [PATCH 4/9] iterate --- .../src/maplibre/MapStyle/SWRDataLabDark.stories.svelte | 6 +++--- components/src/maplibre/MapStyle/components/Hillshade.ts | 1 + .../src/maplibre/MapStyle/components/PlaceLabels.ts | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte index 97ba3d37..3774fa38 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte @@ -357,9 +357,9 @@ maxZoom={20} style={SWRDataLabDark({ enableHillshade: true })} initialLocation={{ - lng: 11.041399193292023, - lat: 49.42147382696706, - zoom: 11.198697801346833 + lng: 11.585027613393322, + lat: 48.150788140862915, + zoom: 11.114287648697289 }} > diff --git a/components/src/maplibre/MapStyle/components/Hillshade.ts b/components/src/maplibre/MapStyle/components/Hillshade.ts index cb609ae0..54136105 100644 --- a/components/src/maplibre/MapStyle/components/Hillshade.ts +++ b/components/src/maplibre/MapStyle/components/Hillshade.ts @@ -5,6 +5,7 @@ export default function makeHillshade(tokens: styleTokens): any { { id: 'hillshade', type: 'hillshade', + maxzoom: 13, source: 'versatiles-elevation', paint: { 'hillshade-exaggeration': 0.05, diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index dae02866..06083be4 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -189,7 +189,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-offset': [0.4, 0.4], 'text-size': { stops: [ - [7, 14], + [7, 15], [15, 28] ] }, @@ -210,7 +210,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-field': 'Frankfurt', 'text-size': { stops: [ - [7, 14], + [7, 15], [15, 28] ] }, @@ -269,9 +269,9 @@ export default function makePlaceLabels(tokens: styleTokens, options) { maxzoom: 12, layout: {}, paint: { - 'circle-radius': 3, + 'circle-radius': ['interpolate', ['linear'], ['zoom'], 5, 2, 10, 3], 'circle-stroke-color': tokens.background, - 'circle-color': tokens.label_tertiary + 'circle-color': tokens.label_secondary } } ].map((el) => { From 78a1df2fea1adec4e9e7ff7ef219ed469a6bcf61 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 6 Jul 2026 11:14:49 +0200 Subject: [PATCH 5/9] iterate --- .../maplibre/MapStyle/components/PlaceLabels.ts | 15 ++++++++------- .../src/maplibre/MapStyle/components/Roads.ts | 5 ++++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index 06083be4..a92c7402 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -115,7 +115,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { minzoom: 8, maxzoom: 13, layout: { - 'text-max-width': 10, + 'text-max-width': 8, 'text-size': { stops: [ [8, 12], @@ -139,9 +139,10 @@ export default function makePlaceLabels(tokens: styleTokens, options) { layout: { 'text-variable-anchor': ['bottom', 'bottom-left', 'bottom-right', 'right', 'left'], 'text-offset': [0.3, 0.4], + 'text-max-width': 10, 'text-size': { stops: [ - [7, 14], + [7, 13], [13, 17] ] } @@ -167,10 +168,10 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'right', 'left' ], - 'text-offset': [0.2, 0.4], + 'text-offset': [0.2, 0.35], 'text-size': { stops: [ - [7, 15], + [7, 14], [15, 20] ] } @@ -189,11 +190,11 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-offset': [0.4, 0.4], 'text-size': { stops: [ - [7, 15], + [7, 16], [15, 28] ] }, - 'text-font': tokens.sans_bold + 'text-font': tokens.sans_medium }, paint: { 'text-color': tokens.label_secondary @@ -214,7 +215,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { [15, 28] ] }, - 'text-font': tokens.sans_bold + 'text-font': tokens.sans_medium }, paint: { 'text-color': tokens.label_secondary diff --git a/components/src/maplibre/MapStyle/components/Roads.ts b/components/src/maplibre/MapStyle/components/Roads.ts index 0b228937..b8efc5cb 100644 --- a/components/src/maplibre/MapStyle/components/Roads.ts +++ b/components/src/maplibre/MapStyle/components/Roads.ts @@ -200,7 +200,10 @@ export default function makeRoads(tokens: styleTokens) { line_width: { stops: [ [14, 0], - [15, 4] + [16, 4], + [18, 26], + [19, 62], + [20, 122] ] }, line_opacity: { From 573fdbcbef02a89765305ed15f43c871f62bd5eb Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 6 Jul 2026 11:26:47 +0200 Subject: [PATCH 6/9] iterate --- .../MapStyle/SWRDataLabDark.stories.svelte | 6 +++--- .../MapStyle/components/PlaceLabels.ts | 21 ++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte index 3774fa38..c9b9d14d 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte +++ b/components/src/maplibre/MapStyle/SWRDataLabDark.stories.svelte @@ -357,9 +357,9 @@ maxZoom={20} style={SWRDataLabDark({ enableHillshade: true })} initialLocation={{ - lng: 11.585027613393322, - lat: 48.150788140862915, - zoom: 11.114287648697289 + lng: 8.658579253384687, + lat: 50.100208477094526, + zoom: 10.66488980559805 }} > diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index a92c7402..aaa7ccb9 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -54,7 +54,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-max-width': 8 }, paint: { - 'text-color': tokens.label_secondary, + 'text-color': tokens.label_tertiary, 'text-halo-color': tokens.background } }, @@ -64,20 +64,21 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'all', ['in', 'kind', 'suburb', 'village', 'hamlet', 'town'], ['>=', 'population', 2000], - ['<', 'population', 5_000] + ['<', 'population', 10_000] ], minzoom: 10, layout: { 'text-font': tokens.sans_regular, + 'text-max-width': 8, 'text-size': { stops: [ - [10, 11], + [10, 12], [16, 14] ] } }, paint: { - 'text-color': tokens.label_secondary + 'text-color': tokens.label_tertiary } }, { @@ -85,16 +86,16 @@ export default function makePlaceLabels(tokens: styleTokens, options) { filter: [ 'all', ['in', 'kind', 'suburb', 'village', 'hamlet', 'town'], - ['>', 'population', 20_000], + ['>', 'population', 10_000], ['<', 'population', 50_000] ], - minzoom: 8, + minzoom: 9, layout: { 'text-max-width': 8, 'text-size': { stops: [ - [8, 11], - [12, 16] + [8, 12], + [12, 14] ] } }, @@ -118,7 +119,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-max-width': 8, 'text-size': { stops: [ - [8, 12], + [8, 13], [12, 16] ] } @@ -143,7 +144,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-size': { stops: [ [7, 13], - [13, 17] + [13, 18] ] } } From 44903e5e150e98d24692e97529fadabf4e1ec9db Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 6 Jul 2026 11:39:25 +0200 Subject: [PATCH 7/9] tweak town label --- components/src/maplibre/MapStyle/components/PlaceLabels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index aaa7ccb9..629de919 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -95,7 +95,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-size': { stops: [ [8, 12], - [12, 14] + [12, 15] ] } }, From 7e510c4b9b170286d5d5272a175f8aef6637aa84 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 6 Jul 2026 11:43:42 +0200 Subject: [PATCH 8/9] drop unused name --- components/src/maplibre/MapStyle/components/PlaceLabels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index 629de919..a15d96a3 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -5,7 +5,7 @@ import type { styleTokens } from '../../types'; // Ideally majorCities would include Frankfurt and Leipzig, but they're not // state capitals so they're not available in the versatiles data until z6 -const majorCities = ['Berlin', 'Stuttgart', 'München', 'Frankfurt', 'Hamburg', 'Mainz', 'Nürnberg']; +const majorCities = ['Berlin', 'Stuttgart', 'München', 'Hamburg', 'Mainz', 'Nürnberg']; // For smaller cities we use the population field to derive our hierarchy, // though that's limited by the fact that versatiles hard-codes population From 33cc80272f3a7bd8a0d49eff1cdbd26b46c841d1 Mon Sep 17 00:00:00 2001 From: Max Kohler Date: Mon, 6 Jul 2026 11:51:25 +0200 Subject: [PATCH 9/9] update light style --- components/src/maplibre/MapStyle/SWRDataLabLight.ts | 4 ++-- components/src/maplibre/MapStyle/components/PlaceLabels.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/src/maplibre/MapStyle/SWRDataLabLight.ts b/components/src/maplibre/MapStyle/SWRDataLabLight.ts index 3959080a..e6b7255c 100644 --- a/components/src/maplibre/MapStyle/SWRDataLabLight.ts +++ b/components/src/maplibre/MapStyle/SWRDataLabLight.ts @@ -60,7 +60,7 @@ const tokens: styleTokens = { }; const { landuse } = makeLanduse(tokens); -const { placeLabels, boundaryLabels } = makePlaceLabels(tokens); +const { placeLabels, boundaryLabels, placeDots } = makePlaceLabels(tokens, {}); const { airports, transitBridges, transitSurface, transitTunnels } = makeTransit(tokens); const { walkingLabels, walkingTunnels, walkingSurface, walkingBridges } = makeWalking(tokens); const { roadBridges, roadSurface, roadTunnels } = makeRoads(tokens); @@ -166,7 +166,7 @@ const style: styleFunction = (opts) => { // 10. Point labels ...(options.places?.showLabels ? placeLabels : []), - + ...(options.places?.showLabels ? placeDots : []), // 11. Admin boundary labels ...(options.admin?.showLabels ? boundaryLabels : []) ] diff --git a/components/src/maplibre/MapStyle/components/PlaceLabels.ts b/components/src/maplibre/MapStyle/components/PlaceLabels.ts index a15d96a3..dc18c1e7 100644 --- a/components/src/maplibre/MapStyle/components/PlaceLabels.ts +++ b/components/src/maplibre/MapStyle/components/PlaceLabels.ts @@ -192,7 +192,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-size': { stops: [ [7, 16], - [15, 28] + [15, 26] ] }, 'text-font': tokens.sans_medium @@ -213,7 +213,7 @@ export default function makePlaceLabels(tokens: styleTokens, options) { 'text-size': { stops: [ [7, 15], - [15, 28] + [15, 26] ] }, 'text-font': tokens.sans_medium