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
46 changes: 46 additions & 0 deletions components/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,53 @@
</div>
</DesignTokens>
</Story>
<Story asChild name="fix/122">
<DesignTokens>
<div class="grid">
<div class="container">
<Map
showDebug
style={SWRDataLabLight()}
initialLocation={{ lng: 10.941447898724618, lat: 50.84067324785988, zoom: 5.5, pitch: 0 }}
>
<VectorTileSource
id="demo-source"
url={`https://static.datenhub.net/data/p118_correctiv_waermewende/heating_merged.versatiles?tiles/{z}/{x}/{y}`}
attribution="Demo attribution"
/>

<VectorLayer
type="fill"
id="demo-10km"
sourceId="demo-source"
sourceLayer="heating_10km_squares"
placeBelow="street-residential"
minZoom={5}
paint={{
'fill-color': [
'match',
['get', 'dominant_source'],
'Gas',
'#CCDCFF',
'Heizoel',
'#5BCFE1',
'Holz_Holzpellets',
'#499F73',
'Fernwaerme',
'#A86C07',
'Strom',
'#FFD584',
'gray'
],
'fill-opacity': 1
}}
/>
<AttributionControl position="bottom-left" />
</Map>
</div>
</div>
</DesignTokens>
</Story>
<Story asChild name="fix/118">
<DesignTokens>
<div class="grid">
Expand Down
26 changes: 13 additions & 13 deletions components/src/maplibre/MapStyle/components/PlaceLabels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ export default function makePlaceLabels() {
layout: {
'text-size': {
stops: [
[7, 14],
[15, 20]
[7, 15],
[15, 21]
]
}
},
paint: {
'text-color': tokens.label_primary
'text-color': tokens.label_secondary
}
},
{
Expand All @@ -182,12 +182,12 @@ export default function makePlaceLabels() {
'text-size': {
stops: [
[7, 15],
[14, 23]
[15, 21]
]
}
},
paint: {
'text-color': tokens.label_primary
'text-color': tokens.label_secondary
}
}
].map((el) => {
Expand All @@ -198,16 +198,16 @@ export default function makePlaceLabels() {
'source-layer': 'place_labels',
layout: {
'text-font': tokens.sans_regular,
'text-letter-spacing': 0.035,
'text-letter-spacing': 0.05,
'text-field': '{name_de}',
...el.layout
},

paint: {
'text-color': tokens.label_secondary,
'text-halo-color': tokens.background,
'text-halo-width': 2.5,
'text-halo-blur': 0,
'text-halo-width': 2,
'text-halo-blur': 0.5,
...el.paint
}
} as SymbolLayerSpecification;
Expand All @@ -221,21 +221,21 @@ export default function makePlaceLabels() {
maxzoom: 8,
layout: {
'text-field': '{name_de}',
'text-letter-spacing': 0.0825,
'text-letter-spacing': 0.085,
'text-font': tokens.sans_regular,
'text-transform': 'uppercase',
'text-size': {
stops: [
[4, 10],
[7, 17]
[4, 11],
[7, 18]
]
}
},
paint: {
'text-color': tokens.label_tertiary,
'text-halo-color': tokens.background,
'text-halo-width': 2,
'text-halo-blur': 0
'text-halo-width': 2.5,
'text-halo-blur': 0.5
}
}
].map((el) => {
Expand Down