Skip to content

Commit a7ece45

Browse files
committed
set sky
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent fb7c87a commit a7ece45

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

src/components/map/MaplibreMap.vue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,31 @@ export default {
350350
this.handleMapEvents()
351351
352352
this.map.once('load', () => {
353+
// https://maplibre.org/maplibre-gl-js/docs/examples/sky-with-fog-and-terrain/
354+
// https://maplibre.org/maplibre-style-spec/sky/
355+
this.map.setSky({
356+
'sky-color': '#199EF3',
357+
'sky-horizon-blend': 0.5,
358+
'horizon-color': '#ffffff',
359+
'horizon-fog-blend': 0.5,
360+
'fog-color': '#0000ff',
361+
'fog-ground-blend': 0.5,
362+
'atmosphere-blend': 0,
363+
/*
364+
'atmosphere-blend': [
365+
'interpolate',
366+
['linear'],
367+
['zoom'],
368+
0,
369+
1,
370+
10,
371+
1,
372+
12,
373+
0,
374+
],
375+
*/
376+
})
377+
353378
this.loadImages()
354379
355380
const bounds = this.map.getBounds()

0 commit comments

Comments
 (0)