Last active
May 9, 2025 14:07
-
-
Save zbycz/b2460d1a32b94f2a258dc24fb33722e0 to your computer and use it in GitHub Desktop.
For addition to Maptiler Outdoor style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { LayerSpecification } from '@maplibre/maplibre-gl-style-spec'; | |
| export const cliffsLayers: LayerSpecification[] = [ | |
| { | |
| id: 'Cliffs base', | |
| type: 'line', | |
| source: 'maptiler_planet', | |
| layout: { | |
| 'line-cap': 'butt', | |
| 'line-join': 'miter', | |
| 'line-miter-limit': 2, | |
| visibility: 'visible', | |
| }, | |
| paint: { | |
| 'line-width': ['interpolate', ['linear'], ['zoom'], 15, 1, 22, 1.5], | |
| 'line-gap-width': 0, | |
| 'line-offset': 0, | |
| 'line-blur': 0, | |
| 'line-color': [ | |
| 'interpolate', | |
| ['linear'], | |
| ['zoom'], | |
| 13, | |
| 'hsla(0, 0%, 50%, 0.5)', | |
| 17, | |
| 'hsl(0,0%,58%)', | |
| ], | |
| }, | |
| filter: ['==', ['geometry-type'], 'LineString'], | |
| 'source-layer': 'mountain_peak', | |
| minzoom: 7, | |
| }, | |
| { | |
| id: 'Cliffs ticks 0-18', | |
| type: 'line', | |
| source: 'maptiler_planet', | |
| layout: { | |
| 'line-cap': 'butt', | |
| 'line-join': 'miter', | |
| 'line-miter-limit': 2, | |
| visibility: 'visible', | |
| }, | |
| paint: { | |
| 'line-width': ['interpolate', ['linear'], ['zoom'], 16, 2, 22, 10], | |
| 'line-gap-width': 0, | |
| 'line-offset': ['interpolate', ['linear'], ['zoom'], 16, 1.2, 22, 5], | |
| 'line-blur': 0, | |
| 'line-color': [ | |
| 'interpolate', | |
| ['linear'], | |
| ['zoom'], | |
| 13, | |
| 'hsla(0, 0%, 50%, 0.3)', | |
| 17, | |
| 'hsla(0, 0%, 50%, 0.8)', | |
| ], | |
| 'line-dasharray': [0.2, 2], | |
| }, | |
| filter: ['==', ['geometry-type'], 'LineString'], | |
| 'source-layer': 'mountain_peak', | |
| minzoom: 7, | |
| maxzoom: 18, | |
| }, | |
| { | |
| id: 'Cliffs ticks 18-22', | |
| type: 'line', | |
| source: 'maptiler_planet', | |
| layout: { | |
| 'line-cap': 'butt', | |
| 'line-join': 'miter', | |
| 'line-miter-limit': 2, | |
| visibility: 'visible', | |
| }, | |
| paint: { | |
| 'line-width': ['interpolate', ['linear'], ['zoom'], 16, 2, 22, 10], | |
| 'line-gap-width': 0, | |
| 'line-offset': ['interpolate', ['linear'], ['zoom'], 16, 1.2, 22, 5], | |
| 'line-blur': 0, | |
| 'line-color': [ | |
| 'interpolate', | |
| ['linear'], | |
| ['zoom'], | |
| 13, | |
| 'hsla(0, 0%, 50%, 0.3)', | |
| 17, | |
| 'hsla(0, 0%, 50%, 0.8)', | |
| ], | |
| 'line-dasharray': [0.2, 1], | |
| }, | |
| filter: ['==', ['geometry-type'], 'LineString'], | |
| 'source-layer': 'mountain_peak', | |
| minzoom: 18, | |
| }, | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment