Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,19 @@
<DesignTokens theme="light">
<div class="grid">
<div class="container">
<Map showDebug style={SWRDataLabLight()} initialLocation={locations.stugge}>
<Map showDebug style={SWRDataLabLight({roads: {showLabels: true}})} initialLocation={locations.stugge}>
<AttributionControl position="bottom-left" />
</Map>
</div>
</div>
</DesignTokens>
</Story>
<Story asChild name="Berlin z15">
<DesignTokens theme="light">
<div class="grid">
<div class="container">
<Map showDebug style={SWRDataLabLight({ roads: {
showLabels: true}})} initialLocation={{"lng":13.397677524739947,"lat":52.5175142188192,"zoom":14.99}}>
<AttributionControl position="bottom-left" />
</Map>
</div>
Expand Down
14 changes: 7 additions & 7 deletions components/src/maplibre/MapStyle/components/PlaceLabels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function makePlaceLabels(tokens) {
['in', 'kind', 'city', 'town'],
['>', 'population', 50_000],
['<', 'population', 100_000],
['!in', 'name_de', ...majorCities]
['!in', 'name', ...majorCities]
],
minzoom: 8.5,
layout: {
Expand All @@ -96,7 +96,7 @@ export default function makePlaceLabels(tokens) {
['in', 'kind', 'city', 'town'],
['>', 'population', 100_000],
['<', 'population', 400_000],
['!in', 'name_de', ...majorCities]
['!in', 'name', ...majorCities]
],
minzoom: 7,
maxzoom: 13,
Expand All @@ -115,7 +115,7 @@ export default function makePlaceLabels(tokens) {
'all',
['in', 'kind', 'city', 'town', 'state_capital'],
['>', 'population', 400_000],
['!in', 'name_de', ...majorCities]
['!in', 'name', ...majorCities]
],
minzoom: 7,
maxzoom: 12,
Expand All @@ -138,7 +138,7 @@ export default function makePlaceLabels(tokens) {
},
{
id: 'label-place-major-city',
filter: ['in', 'name_de', ...majorCities],
filter: ['in', 'name', ...majorCities],
minzoom: 5.5,
maxzoom: 12,
layout: {
Expand Down Expand Up @@ -167,7 +167,7 @@ export default function makePlaceLabels(tokens) {
layout: {
'text-font': tokens.sans_regular,
'text-letter-spacing': 0.01,
'text-field': '{name_de}',
'text-field': '{name}',
...el.layout
},

Expand All @@ -187,12 +187,12 @@ export default function makePlaceLabels(tokens) {
filter: [
'all',
['==', 'admin_level', 2],
['!in', 'name_de', 'Jersey', 'Guernsey', 'Insel Man']
['!in', 'name', 'Jersey', 'Guernsey', 'Insel Man']
],
minzoom: 4,
maxzoom: 8,
layout: {
'text-field': '{name_de}',
'text-field': '{name}',
'text-letter-spacing': 0.02,
'text-font': tokens.sans_regular,
'text-size': {
Expand Down
3 changes: 1 addition & 2 deletions components/src/maplibre/MapStyle/components/Roads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,10 @@ export default function makeRoads(tokens) {
'source-layer': 'street_labels',
...el,
layout: {
'text-field': '{name_de}',
'text-field': '{name}',
'text-font': tokens.sans_regular,
'symbol-placement': 'line',
'text-anchor': 'center',

...el.layout
},
paint: {
Expand Down
2 changes: 1 addition & 1 deletion components/src/maplibre/MapStyle/components/Walking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ export default function makeWalking(tokens): any {
filter: ['==', 'kind', 'pedestrian'],
minzoom: 14,
layout: {
'text-field': '{name_de}',
'text-field': '{name}',
'text-font': tokens.sans_regular,
'symbol-placement': 'line',
'text-anchor': 'center',
Expand Down
Loading