diff --git a/app/assets/stylesheets/carte.scss b/app/assets/stylesheets/carte.scss index a9def4820..372772419 100644 --- a/app/assets/stylesheets/carte.scss +++ b/app/assets/stylesheets/carte.scss @@ -1,6 +1,4 @@ @import "colors"; -@import "constants"; - .areas { margin-bottom: 10px; @@ -10,56 +8,49 @@ } } -.map-style-control { - position: absolute; - bottom: 4px; - left: 10px; +.ds-ctrl button { + color: $dark-grey; - img { - width: 100%; - } - - button { - padding: 0; - border: none; - cursor: pointer; - - > div { - position: absolute; - bottom: 5px; - left: 5px; - } - } - - .map-style-panel { - z-index: 1; - padding: $default-spacer; - margin-bottom: $default-spacer; - - ul { - list-style: none; - padding: $default-spacer; - padding-bottom: 0; - margin-bottom: -$default-spacer; - - label { - font-size: 12px; - font-weight: normal; - } - } + &.on, + &:hover { + background-color: rgba(0, 0, 0, 0.05); } } -.cadastres-selection-control { - z-index: 1; - position: absolute; - top: 135px; - left: 10px; +.react-aria-popover { + &[data-placement='top'] { + --origin: translateY(8px); + } - button { - &.on, - &:hover { - background-color: rgba(0, 0, 0, 0.05); - } + &[data-placement='bottom'] { + --origin: translateY(-8px); + } + + &[data-placement='right'] { + --origin: translateX(-8px); + } + + &[data-placement='left'] { + --origin: translateX(8px); + } + + &[data-entering] { + animation: popover-slide 200ms; + } + + &[data-exiting] { + animation: popover-slide 200ms reverse ease-in; + } +} + +@keyframes popover-slide { + from { + transform: var(--origin); + opacity: 0; + } + + to { + transform: translateY(0); + opacity: 1; } } diff --git a/app/javascript/components/MapEditor/components/CadastreLayer.tsx b/app/javascript/components/MapEditor/components/CadastreLayer.tsx index c8203d032..9b1ac8b5f 100644 --- a/app/javascript/components/MapEditor/components/CadastreLayer.tsx +++ b/app/javascript/components/MapEditor/components/CadastreLayer.tsx @@ -1,7 +1,9 @@ -import { useCallback, useRef } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; +import { createPortal } from 'react-dom'; import type { Feature, FeatureCollection } from 'geojson'; +import { CursorClickIcon } from '@heroicons/react/outline'; -import { useMapLibre } from '../../shared/maplibre/MapLibre'; +import { useMapLibre, ReactControl } from '../../shared/maplibre/MapLibre'; import { useEvent, useMapEvent, @@ -18,15 +20,31 @@ export function CadastreLayer({ featureCollection, createFeatures, deleteFeatures, + toggle, enabled }: { featureCollection: FeatureCollection; createFeatures: CreateFeatures; deleteFeatures: DeleteFeatures; + toggle: () => void; enabled: boolean; }) { const map = useMapLibre(); const selectedCadastresRef = useRef(new Set()); + const [controlElement, setControlElement] = useState( + null + ); + + useEffect(() => { + const control = new ReactControl(); + map.addControl(control, 'top-left'); + setControlElement(control.container); + + return () => { + map.removeControl(control); + setControlElement(null); + }; + }, [map, enabled]); const highlightFeature = useCallback( (cid: string, highlight: boolean) => { @@ -95,7 +113,35 @@ export function CadastreLayer({ useEvent('map:internal:cadastre:highlight', onHighlight); - return null; + return ( + <> + {controlElement != null + ? createPortal( + , + controlElement + ) + : null} + + ); +} + +function CadastreSwitch({ + enabled, + toggle +}: { + enabled: boolean; + toggle: () => void; +}) { + return ( + + ); } function useCadastres( diff --git a/app/javascript/components/MapEditor/components/DrawLayer.tsx b/app/javascript/components/MapEditor/components/DrawLayer.tsx index 63d29767c..cffb87486 100644 --- a/app/javascript/components/MapEditor/components/DrawLayer.tsx +++ b/app/javascript/components/MapEditor/components/DrawLayer.tsx @@ -1,5 +1,5 @@ import { useCallback, useRef, useEffect } from 'react'; -import type { LngLatBoundsLike, LngLatLike } from 'maplibre-gl'; +import type { LngLatBoundsLike, LngLatLike, IControl } from 'maplibre-gl'; import DrawControl from '@mapbox/mapbox-gl-draw'; import type { FeatureCollection, Feature, Point } from 'geojson'; @@ -52,18 +52,14 @@ export function DrawLayer({ }); // We use mapbox-draw plugin with maplibre. They are compatible but types are not. // eslint-disable-next-line @typescript-eslint/no-explicit-any - map.addControl(draw as any, 'top-left'); + const control = draw as any as IControl; + map.addControl(control, 'top-left'); draw.set( filterFeatureCollection(featureCollection, SOURCE_SELECTION_UTILISATEUR) ); drawRef.current = draw; - for (const [selector, translation] of translations) { - const element = document.querySelector(selector); - if (element) { - element.setAttribute('title', translation); - } - } + patchDrawControl(); } return () => { @@ -228,3 +224,15 @@ const translations = [ ['.mapbox-gl-draw_point', 'Ajouter un point'], ['.mapbox-gl-draw_trash', 'Supprimer'] ]; + +function patchDrawControl() { + document.querySelectorAll('.mapboxgl-ctrl').forEach((control) => { + control.classList.add('maplibregl-ctrl', 'maplibregl-ctrl-group'); + + for (const [selector, translation] of translations) { + for (const button of control.querySelectorAll(selector)) { + button.setAttribute('title', translation); + } + } + }); +} diff --git a/app/javascript/components/MapEditor/index.tsx b/app/javascript/components/MapEditor/index.tsx index 5bea4796c..f900e3fac 100644 --- a/app/javascript/components/MapEditor/index.tsx +++ b/app/javascript/components/MapEditor/index.tsx @@ -1,6 +1,4 @@ import { useState } from 'react'; -import { CursorClickIcon } from '@heroicons/react/outline'; -import 'maplibre-gl/dist/maplibre-gl.css'; import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css'; import type { FeatureCollection } from 'geojson'; @@ -51,25 +49,12 @@ export default function MapEditor({ enabled={!cadastreEnabled} /> {options.layers.includes('cadastres') ? ( - <> - -
- -
- + setCadastreEnabled((enabled) => !enabled)} + enabled={cadastreEnabled} + /> ) : null} diff --git a/app/javascript/components/MapReader/index.tsx b/app/javascript/components/MapReader/index.tsx index a8662f152..62652708e 100644 --- a/app/javascript/components/MapReader/index.tsx +++ b/app/javascript/components/MapReader/index.tsx @@ -1,4 +1,3 @@ -import 'maplibre-gl/dist/maplibre-gl.css'; import type { FeatureCollection } from 'geojson'; import { MapLibre } from '../shared/maplibre/MapLibre'; diff --git a/app/javascript/components/shared/maplibre/MapLibre.tsx b/app/javascript/components/shared/maplibre/MapLibre.tsx index d160775f8..4a66da89f 100644 --- a/app/javascript/components/shared/maplibre/MapLibre.tsx +++ b/app/javascript/components/shared/maplibre/MapLibre.tsx @@ -8,13 +8,15 @@ import { createContext, useCallback } from 'react'; -import maplibre, { Map, NavigationControl } from 'maplibre-gl'; -import type { Style } from 'maplibre-gl'; +import { createPortal } from 'react-dom'; +import { Map, NavigationControl } from 'maplibre-gl'; +import type { StyleSpecification, IControl } from 'maplibre-gl'; +import 'maplibre-gl/dist/maplibre-gl.css'; import invariant from 'tiny-invariant'; import { useStyle, useElementVisible } from './hooks'; -import { StyleControl } from './StyleControl'; +import { StyleSwitch } from './StyleControl'; const Context = createContext<{ map?: Map | null }>({}); @@ -30,16 +32,15 @@ export function useMapLibre() { } export function MapLibre({ children, layers }: MapLibreProps) { - const isSupported = useMemo( - () => maplibre.supported({ failIfMajorPerformanceCaveat: true }) && !isIE(), - [] - ); + const isSupported = useMemo(() => isWebglSupported(), []); const containerRef = useRef(null); const visible = useElementVisible(containerRef); const [map, setMap] = useState(); + const [styleControlElement, setStyleControlElement] = + useState(null); const onStyleChange = useCallback( - (style: Style) => { + (style: StyleSpecification) => { if (map) { map.setStyle(style); } @@ -56,8 +57,11 @@ export function MapLibre({ children, layers }: MapLibreProps) { style }); map.addControl(new NavigationControl({}), 'top-right'); + const styleControl = new ReactControl(); + map.addControl(styleControl, 'bottom-left'); map.on('load', () => { setMap(map); + setStyleControlElement(styleControl.container); }); } }, [map, style, visible, isSupported]); @@ -91,16 +95,54 @@ export function MapLibre({ children, layers }: MapLibreProps) { return (
- + {styleControlElement != null + ? createPortal( + , + styleControlElement + ) + : null} {map ? children : null}
); } -function isIE() { - const ua = window.navigator.userAgent; - const msie = ua.indexOf('MSIE '); - const trident = ua.indexOf('Trident/'); - return msie > 0 || trident > 0; +function isWebglSupported() { + if (window.WebGLRenderingContext) { + const canvas = document.createElement('canvas'); + try { + // Note that { failIfMajorPerformanceCaveat: true } can be passed as a second argument + // to canvas.getContext(), causing the check to fail if hardware rendering is not available. See + // https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext + // for more details. + const context = canvas.getContext('webgl2') || canvas.getContext('webgl'); + if (context && typeof context.getParameter == 'function') { + return true; + } + } catch (e) { + // WebGL is supported, but disabled + } + return false; + } + // WebGL not supported + return false; +} + +export class ReactControl implements IControl { + #container: HTMLElement | null = null; + + get container(): HTMLElement | null { + return this.#container; + } + + onAdd(): HTMLElement { + this.#container = document.createElement('div'); + this.#container.className = 'maplibregl-ctrl maplibregl-ctrl-group ds-ctrl'; + return this.#container; + } + + onRemove(): void { + this.#container?.remove(); + this.#container = null; + } } diff --git a/app/javascript/components/shared/maplibre/StyleControl.tsx b/app/javascript/components/shared/maplibre/StyleControl.tsx index afd46345c..c844531ed 100644 --- a/app/javascript/components/shared/maplibre/StyleControl.tsx +++ b/app/javascript/components/shared/maplibre/StyleControl.tsx @@ -1,6 +1,5 @@ -import { useState, useId } from 'react'; -import { Popover, RadioGroup } from '@headlessui/react'; -import { usePopper } from 'react-popper'; +import { useId, useRef, useEffect } from 'react'; +import { Button, Dialog, DialogTrigger, Popover } from 'react-aria-components'; import { MapIcon } from '@heroicons/react/outline'; import { Slider } from '@reach/slider'; import '@reach/slider/styles.css'; @@ -13,7 +12,7 @@ const STYLES = { ign: 'Carte IGN' }; -export function StyleControl({ +export function StyleSwitch({ styleId, layers, setStyle, @@ -26,107 +25,97 @@ export function StyleControl({ setLayerEnabled: (layer: string, enabled: boolean) => void; setLayerOpacity: (layer: string, opacity: number) => void; }) { - const [buttonElement, setButtonElement] = - useState(); - const [panelElement, setPanelElement] = useState(); - const { styles, attributes } = usePopper(buttonElement, panelElement, { - placement: 'bottom-end' - }); const configurableLayers = Object.entries(layers).filter( ([, { configurable }]) => configurable ); const mapId = useId(); + const buttonRef = useRef(null); + + useEffect(() => { + if (buttonRef.current) { + buttonRef.current.title = 'Sélectionner les couches cartographiques'; + } + }, []); return ( -
- - - - - - + + + +
event.preventDefault()} > - {Object.entries(STYLES).map(([style, title]) => ( - - {({ checked }) => ( - <> +
+ {Object.entries(STYLES).map(([style, title]) => ( +
+
- - {title.replace(/\s/g, ' ')} - - - )} - - ))} - - {configurableLayers.length ? ( -
    - {configurableLayers.map(([layer, { enabled, opacity, name }]) => ( -
  • -
    - { - setLayerEnabled(layer, event.target.checked); + setStyle(event.target.value); }} /> -
    - { - setLayerOpacity(layer, value); - }} - className="mb-1" - title={`Réglage de l’opacité de la couche «${NBS}${name}${NBS}»`} - getAriaLabel={() => - `Réglage de l’opacité de la couche «${NBS}${name}${NBS}»` - } - getAriaValueText={(value) => - `L’opacité de la couche «${NBS}${name}${NBS}» est à ${value}${NBS}%` - } - /> -
  • +
))} - - ) : null} - +
+ {configurableLayers.length ? ( +
+ {configurableLayers.map( + ([layer, { enabled, opacity, name }]) => ( +
+
+ { + setLayerEnabled(layer, event.target.checked); + }} + /> + +
+ { + setLayerOpacity(layer, value); + }} + className="fr-range fr-range--sm mt-1" + title={`Réglage de l’opacité de la couche «${NBS}${name}${NBS}»`} + getAriaLabel={() => + `Réglage de l’opacité de la couche «${NBS}${name}${NBS}»` + } + getAriaValueText={(value) => + `L’opacité de la couche «${NBS}${name}${NBS}» est à ${value}${NBS}%` + } + /> +
+ ) + )} +
+ ) : null} + +
-
+ ); } diff --git a/app/javascript/components/shared/maplibre/hooks.ts b/app/javascript/components/shared/maplibre/hooks.ts index 84f0542a1..348360146 100644 --- a/app/javascript/components/shared/maplibre/hooks.ts +++ b/app/javascript/components/shared/maplibre/hooks.ts @@ -9,7 +9,7 @@ import type { LngLatBoundsLike, LngLat, MapLayerEventType, - Style, + StyleSpecification, LngLatLike } from 'maplibre-gl'; import type { Feature, Geometry } from 'geojson'; @@ -104,7 +104,7 @@ function optionalLayersMap(optionalLayers: string[]): LayersMap { export function useStyle( optionalLayers: string[], - onStyleChange: (style: Style) => void + onStyleChange: (style: StyleSpecification) => void ) { const [styleId, setStyle] = useState('ortho'); const [layers, setLayers] = useState(() => optionalLayersMap(optionalLayers)); diff --git a/app/javascript/components/shared/maplibre/styles/base.ts b/app/javascript/components/shared/maplibre/styles/base.ts index 3400a6c09..8ed1eef44 100644 --- a/app/javascript/components/shared/maplibre/styles/base.ts +++ b/app/javascript/components/shared/maplibre/styles/base.ts @@ -1,7 +1,12 @@ -import type { AnyLayer, Style, RasterLayer, RasterSource } from 'maplibre-gl'; +import type { + LayerSpecification, + RasterLayerSpecification, + RasterSourceSpecification, + StyleSpecification +} from 'maplibre-gl'; import invariant from 'tiny-invariant'; -import cadastreLayers from './layers/cadastre'; +import cadastreLayers from './layers/cadastre.json'; function ignServiceURL(layer: string, style: string, format = 'image/png') { const url = `https://data.geopf.fr/wmts`; @@ -163,7 +168,10 @@ function buildSources() { ); } -function rasterSource(tiles: string[], attribution: string): RasterSource { +function rasterSource( + tiles: string[], + attribution: string +): RasterSourceSpecification { return { type: 'raster', tiles, @@ -174,7 +182,10 @@ function rasterSource(tiles: string[], attribution: string): RasterSource { }; } -function rasterLayer(source: string, opacity: number): RasterLayer { +function rasterLayer( + source: string, + opacity: number +): RasterLayerSpecification { return { id: source, source, @@ -186,14 +197,14 @@ function rasterLayer(source: string, opacity: number): RasterLayer { export function buildOptionalLayers( ids: string[], opacity: Record -): AnyLayer[] { +): LayerSpecification[] { return OPTIONAL_LAYERS.filter(({ id }) => ids.includes(id)) .flatMap(({ layers, id }) => layers.map(([, code]) => [code, opacity[id] / 100] as const) ) .flatMap(([code, opacity]) => code === 'CADASTRE' - ? cadastreLayers + ? (cadastreLayers as LayerSpecification[]) : [rasterLayer(getLayerCode(code), opacity)] ); } @@ -210,9 +221,9 @@ function getLayerCode(code: string) { return code.toLowerCase().replace(/\./g, '-'); } -export default { +export const style: StyleSpecification = { version: 8, - metadat: { + metadata: { 'mapbox:autocomposite': false, 'mapbox:groups': { 1444849242106.713: { collapsed: false, name: 'Places' }, @@ -257,5 +268,6 @@ export default { ...buildSources() }, sprite: 'https://openmaptiles.github.io/osm-bright-gl-style/sprite', - glyphs: 'https://openmaptiles.geo.data.gouv.fr/fonts/{fontstack}/{range}.pbf' -} as Style; + glyphs: 'https://openmaptiles.geo.data.gouv.fr/fonts/{fontstack}/{range}.pbf', + layers: [] +}; diff --git a/app/javascript/components/shared/maplibre/styles/index.ts b/app/javascript/components/shared/maplibre/styles/index.ts index b7d865e29..1b9088861 100644 --- a/app/javascript/components/shared/maplibre/styles/index.ts +++ b/app/javascript/components/shared/maplibre/styles/index.ts @@ -1,9 +1,14 @@ -import type { Style } from 'maplibre-gl'; +import type { LayerSpecification, StyleSpecification } from 'maplibre-gl'; -import baseStyle, { buildOptionalLayers, getLayerName, NBS } from './base'; -import orthoStyle from './layers/ortho'; -import vectorStyle from './layers/vector'; -import ignLayers from './layers/ign'; +import { + style as baseStyle, + buildOptionalLayers, + getLayerName, + NBS +} from './base'; +import ignLayers from './layers/ign.json'; +import orthoLayers from './layers/ortho.json'; +import vectorLayers from './layers/vector.json'; export { getLayerName, NBS }; @@ -21,20 +26,20 @@ export function getMapStyle( id: string, layers: string[], opacity: Record -): Style & { id: string } { +): StyleSpecification & { id: string } { const style = { ...baseStyle, id }; switch (id) { case 'ortho': - style.layers = orthoStyle; + style.layers = orthoLayers as LayerSpecification[]; style.name = 'Photographies aériennes'; break; case 'vector': - style.layers = vectorStyle; + style.layers = vectorLayers as LayerSpecification[]; style.name = 'Carte OSM'; break; case 'ign': - style.layers = ignLayers; + style.layers = ignLayers as LayerSpecification[]; style.name = 'Carte IGN'; break; } diff --git a/app/javascript/components/shared/maplibre/styles/layers/cadastre.json b/app/javascript/components/shared/maplibre/styles/layers/cadastre.json new file mode 100644 index 000000000..e72c332a2 --- /dev/null +++ b/app/javascript/components/shared/maplibre/styles/layers/cadastre.json @@ -0,0 +1,106 @@ +[ + { + "id": "batiments-line", + "type": "line", + "source": "cadastre", + "source-layer": "batiments", + "minzoom": 16, + "maxzoom": 22, + "layout": { "visibility": "visible" }, + "paint": { + "line-opacity": 1, + "line-color": "rgba(0, 0, 0, 1)", + "line-width": 1 + } + }, + { + "id": "batiments-fill", + "type": "fill", + "source": "cadastre", + "source-layer": "batiments", + "layout": { "visibility": "visible" }, + "paint": { + "fill-color": "rgba(150, 150, 150, 1)", + "fill-opacity": { + "stops": [ + [16, 0], + [17, 0.6] + ] + }, + "fill-antialias": true + } + }, + { + "id": "parcelles", + "type": "line", + "source": "cadastre", + "source-layer": "parcelles", + "minzoom": 15.5, + "maxzoom": 24, + "layout": { + "visibility": "visible", + "line-cap": "butt", + "line-join": "miter", + "line-miter-limit": 2 + }, + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-opacity": 0.8, + "line-width": { + "stops": [ + [16, 1.5], + [17, 2] + ] + }, + "line-offset": 0, + "line-blur": 0, + "line-translate": [0, 1], + "line-dasharray": [1], + "line-gap-width": 0 + } + }, + { + "id": "parcelles-fill", + "type": "fill", + "source": "cadastre", + "source-layer": "parcelles", + "layout": { + "visibility": "visible" + }, + "paint": { + "fill-color": "rgba(129, 123, 0, 1)", + "fill-opacity": [ + "case", + ["boolean", ["feature-state", "hover"], false], + 0.7, + 0.1 + ] + } + }, + { + "id": "parcelle-highlighted", + "type": "fill", + "source": "cadastre", + "source-layer": "parcelles", + "filter": ["in", "id", ""], + "paint": { + "fill-color": "rgba(1, 129, 0, 1)", + "fill-opacity": 0.7 + } + }, + { + "id": "sections", + "type": "line", + "source": "cadastre", + "source-layer": "sections", + "minzoom": 12, + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "rgba(0, 0, 0, 1)", + "line-opacity": 0.7, + "line-width": 2, + "line-dasharray": [3, 3], + "line-translate": [0, 0] + } + } +] diff --git a/app/javascript/components/shared/maplibre/styles/layers/cadastre.ts b/app/javascript/components/shared/maplibre/styles/layers/cadastre.ts deleted file mode 100644 index 4ef68ed6b..000000000 --- a/app/javascript/components/shared/maplibre/styles/layers/cadastre.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { AnyLayer } from 'maplibre-gl'; - -const layers: AnyLayer[] = [ - { - id: 'batiments-line', - type: 'line', - source: 'cadastre', - 'source-layer': 'batiments', - minzoom: 16, - maxzoom: 22, - layout: { visibility: 'visible' }, - paint: { - 'line-opacity': 1, - 'line-color': 'rgba(0, 0, 0, 1)', - 'line-width': 1 - } - }, - { - id: 'batiments-fill', - type: 'fill', - source: 'cadastre', - 'source-layer': 'batiments', - layout: { visibility: 'visible' }, - paint: { - 'fill-color': 'rgba(150, 150, 150, 1)', - 'fill-opacity': { - stops: [ - [16, 0], - [17, 0.6] - ] - }, - 'fill-antialias': true - } - }, - { - id: 'parcelles', - type: 'line', - source: 'cadastre', - 'source-layer': 'parcelles', - minzoom: 15.5, - maxzoom: 24, - layout: { - visibility: 'visible', - 'line-cap': 'butt', - 'line-join': 'miter', - 'line-miter-limit': 2 - }, - paint: { - 'line-color': 'rgba(255, 255, 255, 1)', - 'line-opacity': 0.8, - 'line-width': { - stops: [ - [16, 1.5], - [17, 2] - ] - }, - 'line-offset': 0, - 'line-blur': 0, - 'line-translate': [0, 1], - 'line-dasharray': [1], - 'line-gap-width': 0 - } - }, - { - id: 'parcelles-fill', - type: 'fill', - source: 'cadastre', - 'source-layer': 'parcelles', - layout: { - visibility: 'visible' - }, - paint: { - 'fill-color': 'rgba(129, 123, 0, 1)', - 'fill-opacity': [ - 'case', - ['boolean', ['feature-state', 'hover'], false], - 0.7, - 0.1 - ] - } - }, - { - id: 'parcelle-highlighted', - type: 'fill', - source: 'cadastre', - 'source-layer': 'parcelles', - filter: ['in', 'id', ''], - paint: { - 'fill-color': 'rgba(1, 129, 0, 1)', - 'fill-opacity': 0.7 - } - }, - { - id: 'sections', - type: 'line', - source: 'cadastre', - 'source-layer': 'sections', - minzoom: 12, - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'rgba(0, 0, 0, 1)', - 'line-opacity': 0.7, - 'line-width': 2, - 'line-dasharray': [3, 3], - 'line-translate': [0, 0] - } - } -]; - -export default layers; diff --git a/app/javascript/components/shared/maplibre/styles/layers/ign.json b/app/javascript/components/shared/maplibre/styles/layers/ign.json new file mode 100644 index 000000000..eb582b2af --- /dev/null +++ b/app/javascript/components/shared/maplibre/styles/layers/ign.json @@ -0,0 +1,8 @@ +[ + { + "id": "ign", + "source": "plan-ign", + "type": "raster", + "paint": { "raster-resampling": "linear" } + } +] diff --git a/app/javascript/components/shared/maplibre/styles/layers/ign.ts b/app/javascript/components/shared/maplibre/styles/layers/ign.ts deleted file mode 100644 index 545d41911..000000000 --- a/app/javascript/components/shared/maplibre/styles/layers/ign.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { RasterLayer } from 'maplibre-gl'; - -const layers: RasterLayer[] = [ - { - id: 'ign', - source: 'plan-ign', - type: 'raster', - paint: { 'raster-resampling': 'linear' } - } -]; - -export default layers; diff --git a/app/javascript/components/shared/maplibre/styles/layers/ortho.json b/app/javascript/components/shared/maplibre/styles/layers/ortho.json new file mode 100644 index 000000000..c8c3f0334 --- /dev/null +++ b/app/javascript/components/shared/maplibre/styles/layers/ortho.json @@ -0,0 +1,2647 @@ +[ + { + "id": "photographies-aeriennes", + "type": "raster", + "source": "photographies-aeriennes", + "paint": { "raster-resampling": "linear" } + }, + { + "id": "communes", + "type": "line", + "source": "decoupage-administratif", + "source-layer": "communes", + "minzoom": 10, + "maxzoom": 24, + "filter": ["all"], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "rgba(0, 0, 0, 1)", + "line-width": 1.5, + "line-opacity": 1, + "line-blur": 0 + } + }, + { + "id": "departements", + "type": "line", + "source": "decoupage-administratif", + "source-layer": "departements", + "minzoom": 0, + "maxzoom": 24, + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "rgba(0, 0, 0, 1)", + "line-width": 1, + "line-opacity": 1 + } + }, + { + "id": "regions", + "type": "line", + "source": "decoupage-administratif", + "source-layer": "regions", + "minzoom": 0, + "maxzoom": 24, + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "rgba(0, 0, 0, 1)", + "line-width": 1, + "line-opacity": 1 + } + }, + { + "id": "waterway_tunnel", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "minzoom": 14, + "filter": [ + "all", + ["in", "class", "river", "stream", "canal"], + ["==", "brunnel", "tunnel"] + ], + "layout": { "line-cap": "round", "visibility": "none" }, + "paint": { + "line-color": "#a0c8f0", + "line-dasharray": [2, 4], + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 6] + ] + } + } + }, + { + "id": "waterway-other", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["!in", "class", "canal", "river", "stream"], + ["==", "intermittent", 0] + ], + "layout": { "line-cap": "round", "visibility": "none" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 2] + ] + } + } + }, + { + "id": "waterway-other-intermittent", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["!in", "class", "canal", "river", "stream"], + ["==", "intermittent", 1] + ], + "layout": { "line-cap": "round", "visibility": "none" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 2] + ] + }, + "line-dasharray": [4, 3] + } + }, + { + "id": "waterway-stream-canal", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["in", "class", "canal", "stream"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 0] + ], + "layout": { "line-cap": "round", "visibility": "none" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 6] + ] + } + } + }, + { + "id": "waterway-stream-canal-intermittent", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["in", "class", "canal", "stream"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 1] + ], + "layout": { "line-cap": "round", "visibility": "none" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 6] + ] + }, + "line-dasharray": [4, 3] + } + }, + { + "id": "waterway-river", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["==", "class", "river"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 0] + ], + "layout": { "line-cap": "round", "visibility": "none" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.2, + "stops": [ + [10, 0.8], + [20, 6] + ] + } + } + }, + { + "id": "waterway-river-intermittent", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["==", "class", "river"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 1] + ], + "layout": { "line-cap": "round", "visibility": "none" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.2, + "stops": [ + [10, 0.8], + [20, 6] + ] + }, + "line-dasharray": [3, 2.5] + } + }, + { + "id": "tunnel-service-track-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#cfcdca", + "line-dasharray": [0.5, 0.25], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1], + [16, 4], + [20, 11] + ] + } + } + }, + { + "id": "tunnel-minor-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "minor"]], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#cfcdca", + "line-opacity": { + "stops": [ + [12, 0], + [12.5, 1] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [12, 0.5], + [13, 1], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "tunnel-secondary-tertiary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [8, 1.5], + [20, 17] + ] + } + } + }, + { + "id": "tunnel-trunk-primary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "tunnel-motorway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "motorway"]], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "#e9ac77", + "line-dasharray": [0.5, 0.25], + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "tunnel-path", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "brunnel", "tunnel"], ["==", "class", "path"]] + ], + "paint": { + "line-color": "#cba", + "line-dasharray": [1.5, 0.75], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 4] + ] + } + } + }, + { + "id": "tunnel-service-track", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [15.5, 0], + [16, 2], + [20, 7.5] + ] + } + } + }, + { + "id": "tunnel-minor", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["==", "class", "minor_road"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [13.5, 0], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "tunnel-secondary-tertiary", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 10] + ] + } + } + }, + { + "id": "tunnel-trunk-primary", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "tunnel-motorway", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "motorway"]], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "#ffdaa6", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "tunnel-railway", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-dasharray": [2, 2], + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [15, 0.75], + [20, 2] + ] + } + } + }, + { + "id": "ferry", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["in", "class", "ferry"]], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "rgba(108, 159, 182, 1)", + "line-dasharray": [2, 2], + "line-width": 1.1 + } + }, + { + "id": "aeroway-taxiway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 12, + "filter": ["all", ["in", "class", "taxiway"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(153, 153, 153, 1)", + "line-opacity": 1, + "line-width": { + "base": 1.5, + "stops": [ + [11, 2], + [17, 12] + ] + } + } + }, + { + "id": "aeroway-runway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 12, + "filter": ["all", ["in", "class", "runway"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(153, 153, 153, 1)", + "line-opacity": 0.2, + "line-width": { + "base": 1.5, + "stops": [ + [11, 5], + [17, 55] + ] + } + } + }, + { + "id": "aeroway-taxiway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 4, + "filter": [ + "all", + ["in", "class", "taxiway"], + ["==", "$type", "LineString"] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-opacity": { + "base": 1, + "stops": [ + [11, 0], + [12, 1] + ] + }, + "line-width": { + "base": 1.5, + "stops": [ + [11, 1], + [17, 10] + ] + } + } + }, + { + "id": "aeroway-runway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 4, + "filter": ["all", ["in", "class", "runway"], ["==", "$type", "LineString"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-opacity": { + "base": 1, + "stops": [ + [11, 0], + [12, 0.2] + ] + }, + "line-width": { + "base": 1.5, + "stops": [ + [11, 4], + [17, 50] + ] + } + } + }, + { + "id": "road_area_pier", + "type": "fill", + "metadata": {}, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "$type", "Polygon"], ["==", "class", "pier"]], + "layout": { "visibility": "visible" }, + "paint": { "fill-antialias": true, "fill-color": "#f8f4f0" } + }, + { + "id": "road_pier", + "type": "line", + "metadata": {}, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "$type", "LineString"], ["in", "class", "pier"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#f8f4f0", + "line-width": { + "base": 1.2, + "stops": [ + [15, 1], + [17, 4] + ] + } + } + }, + { + "id": "highway-area", + "type": "fill", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "$type", "Polygon"], ["!in", "class", "pier"]], + "layout": { "visibility": "visible" }, + "paint": { + "fill-antialias": false, + "fill-color": "hsla(0, 0%, 89%, 0.56)", + "fill-opacity": { + "stops": [ + [15, 0], + [16, 0.9] + ] + }, + "fill-outline-color": "#cfcdca" + } + }, + { + "id": "highway-motorway-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 12, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway_link"] + ], + "layout": { "line-cap": "round", "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "highway-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "highway-minor-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!=", "brunnel", "tunnel"], + ["in", "class", "minor", "service", "track"] + ] + ], + "layout": { "line-cap": "round", "line-join": "round" }, + "paint": { + "line-color": "#cfcdca", + "line-opacity": { + "stops": [ + [14, 0], + [15, 0.5] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [15, 0.5], + [16, 5] + ] + } + } + }, + { + "id": "highway-secondary-tertiary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [15, 0], + [16, 0.3] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [8, 1.5], + [20, 17] + ] + } + } + }, + { + "id": "highway-primary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "primary"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [16, 0], + [17, 0.3] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [7, 0], + [8, 0.6], + [9, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "highway-trunk-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "trunk"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [16, 0], + [17, 0.3] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [5, 0], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "highway-motorway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 4, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [8, 0], + [9, 0.2] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [4, 0], + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "highway-path", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "path"]] + ], + "layout": { "visibility": "none" }, + "paint": { + "line-color": "#cba", + "line-dasharray": [1.5, 0.75], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 4] + ] + } + } + }, + { + "id": "highway-motorway-link", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 12, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway_link"] + ], + "layout": { "line-cap": "round", "line-join": "round" }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "highway-link", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "highway-minor", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!=", "brunnel", "tunnel"], + ["in", "class", "minor", "service", "track"] + ] + ], + "layout": { "line-cap": "round", "line-join": "round" }, + "paint": { + "line-color": "#fff", + "line-opacity": { + "stops": [ + [16, 0], + [17, 0.4] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [16, 0], + [17, 2.5] + ] + } + } + }, + { + "id": "highway-secondary-tertiary", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [8, 0.5], + [20, 13] + ] + }, + "line-opacity": { + "stops": [ + [11, 0], + [13, 0.3] + ] + } + } + }, + { + "id": "highway-primary", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "primary"] + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [8.5, 0], + [9, 0.5], + [20, 18] + ] + }, + "line-opacity": { + "stops": [ + [8, 0], + [9, 0.3] + ] + } + } + }, + { + "id": "highway-trunk", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["!in", "brunnel", "bridge", "tunnel"], ["in", "class", "trunk"]] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + }, + "line-opacity": { + "stops": [ + [16, 0], + [17, 0.3] + ] + } + } + }, + { + "id": "highway-motorway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"] + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + }, + "line-opacity": { + "stops": [ + [8, 0], + [9, 0.2] + ] + } + } + }, + { + "id": "railway-transit", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "transit"], ["!in", "brunnel", "tunnel"]] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.77)", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [20, 1] + ] + } + } + }, + { + "id": "railway-transit-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "transit"], ["!in", "brunnel", "tunnel"]] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.68)", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 2], + [20, 6] + ] + } + } + }, + { + "id": "railway-service", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "rail"], ["has", "service"]] + ], + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.77)", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [20, 1] + ] + } + } + }, + { + "id": "railway-service-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "rail"], ["has", "service"]] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.68)", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 2], + [20, 6] + ] + } + } + }, + { + "id": "railway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!has", "service"], + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "rail"] + ] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [15, 0.75], + [20, 2] + ] + }, + "line-opacity": { + "stops": [ + [11, 0], + [13, 1] + ] + } + } + }, + { + "id": "railway-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!has", "service"], + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "rail"] + ] + ], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 3], + [20, 8] + ] + } + } + }, + { + "id": "bridge-motorway-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["==", "class", "motorway_link"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "bridge-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "bridge-secondary-tertiary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 0.3, + "line-width": { + "base": 1.2, + "stops": [ + [8, 1.5], + [20, 28] + ] + } + } + }, + { + "id": "bridge-trunk-primary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "hsl(28, 76%, 67%)", + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 26] + ] + }, + "line-opacity": 0.3 + } + }, + { + "id": "bridge-motorway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "motorway"]], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + }, + "line-opacity": { + "stops": [ + [16, 0], + [17, 0.3] + ] + } + } + }, + { + "id": "bridge-path-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "brunnel", "bridge"], ["==", "class", "path"]] + ], + "paint": { + "line-color": "#f8f4f0", + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 18] + ] + } + } + }, + { + "id": "bridge-path", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "brunnel", "bridge"], ["==", "class", "path"]] + ], + "paint": { + "line-color": "#cba", + "line-dasharray": [1.5, 0.75], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 4] + ] + } + } + }, + { + "id": "bridge-motorway-link", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["==", "class", "motorway_link"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "bridge-link", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "bridge-secondary-tertiary", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 20] + ] + }, + "line-opacity": { + "stops": [ + [16, 0], + [17, 0.3] + ] + } + } + }, + { + "id": "bridge-trunk-primary", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + }, + "line-opacity": 0.3 + } + }, + { + "id": "bridge-motorway", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "motorway"]], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + }, + "line-opacity": 0.3 + } + }, + { + "id": "bridge-railway", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [15, 0.75], + [20, 2] + ] + } + } + }, + { + "id": "bridge-railway-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 3], + [20, 8] + ] + } + } + }, + { + "id": "cablecar", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": ["==", "class", "cable_car"], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "hsl(0, 0%, 70%)", + "line-width": { + "base": 1, + "stops": [ + [11, 1], + [19, 2.5] + ] + } + } + }, + { + "id": "cablecar-dash", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": ["==", "class", "cable_car"], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "hsl(0, 0%, 70%)", + "line-dasharray": [2, 3], + "line-width": { + "base": 1, + "stops": [ + [11, 3], + [19, 5.5] + ] + } + } + }, + { + "id": "boundary-land-level-4", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [">=", "admin_level", 4], + ["<=", "admin_level", 8], + ["!=", "maritime", 1] + ], + "layout": { "line-join": "round", "visibility": "none" }, + "paint": { + "line-color": "#9e9cab", + "line-dasharray": [3, 1, 1, 1], + "line-width": { + "base": 1.4, + "stops": [ + [4, 0.4], + [5, 1], + [12, 3] + ] + } + } + }, + { + "id": "boundary-land-level-2", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + ["==", "admin_level", 2], + ["!=", "maritime", 1], + ["!=", "disputed", 1] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "none" + }, + "paint": { + "line-color": "hsl(248, 7%, 66%)", + "line-width": { + "base": 1, + "stops": [ + [0, 0.6], + [4, 1.4], + [5, 2], + [12, 8] + ] + } + } + }, + { + "id": "boundary-land-disputed", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": ["all", ["!=", "maritime", 1], ["==", "disputed", 1]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "none" + }, + "paint": { + "line-color": "hsl(248, 7%, 70%)", + "line-dasharray": [1, 3], + "line-width": { + "base": 1, + "stops": [ + [0, 0.6], + [4, 1.4], + [5, 2], + [12, 8] + ] + } + } + }, + { + "id": "boundary-water", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": ["all", ["in", "admin_level", 2, 4], ["==", "maritime", 1]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(154, 189, 214, 1)", + "line-opacity": { + "stops": [ + [6, 0.6], + [10, 1] + ] + }, + "line-width": { + "base": 1, + "stops": [ + [0, 0.6], + [4, 1.4], + [5, 2], + [12, 8] + ] + } + } + }, + { + "id": "water-name-lakeline", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "water_name", + "filter": ["==", "$type", "LineString"], + "layout": { + "symbol-placement": "line", + "symbol-spacing": 350, + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": 14 + }, + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1.5 + } + }, + { + "id": "water-name-ocean", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "water_name", + "filter": ["all", ["==", "$type", "Point"], ["==", "class", "ocean"]], + "layout": { + "symbol-placement": "point", + "symbol-spacing": 350, + "text-field": "{name:latin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": 14 + }, + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1.5 + } + }, + { + "id": "water-name-other", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "water_name", + "filter": ["all", ["==", "$type", "Point"], ["!in", "class", "ocean"]], + "layout": { + "symbol-placement": "point", + "symbol-spacing": 350, + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": { + "stops": [ + [0, 10], + [6, 14] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(0, 51, 178, 1)", + "text-halo-color": "rgba(255, 255, 255, 1)", + "text-halo-width": 1.5 + } + }, + { + "id": "road_oneway", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": [ + "all", + ["==", "oneway", 1], + [ + "in", + "class", + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "minor", + "service" + ] + ], + "layout": { + "icon-image": "oneway", + "icon-padding": 2, + "icon-rotate": 90, + "icon-rotation-alignment": "map", + "icon-size": { + "stops": [ + [15, 0.5], + [19, 1] + ] + }, + "symbol-placement": "line", + "symbol-spacing": 75, + "visibility": "visible" + }, + "paint": { "icon-opacity": 0.5 } + }, + { + "id": "road_oneway_opposite", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": [ + "all", + ["==", "oneway", -1], + [ + "in", + "class", + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "minor", + "service" + ] + ], + "layout": { + "icon-image": "oneway", + "icon-padding": 2, + "icon-rotate": -90, + "icon-rotation-alignment": "map", + "icon-size": { + "stops": [ + [15, 0.5], + [19, 1] + ] + }, + "symbol-placement": "line", + "symbol-spacing": 75, + "visibility": "visible" + }, + "paint": { "icon-opacity": 0.5 } + }, + { + "id": "highway-name-path", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 15.5, + "filter": ["==", "class", "path"], + "layout": { + "symbol-placement": "line", + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [13, 12], + [14, 13] + ] + } + }, + "paint": { + "text-color": "rgba(171, 86, 0, 1)", + "text-halo-color": "#f8f4f0", + "text-halo-width": 2 + } + }, + { + "id": "highway-name-minor", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 15, + "filter": [ + "all", + ["==", "$type", "LineString"], + ["in", "class", "minor", "service", "track"] + ], + "layout": { + "symbol-placement": "line", + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [13, 12], + [14, 13] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(143, 69, 0, 1)", + "text-halo-blur": 0.5, + "text-halo-width": 2, + "text-halo-color": "rgba(255, 255, 255, 1)" + } + }, + { + "id": "highway-name-major", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 12.2, + "filter": ["in", "class", "primary", "secondary", "tertiary", "trunk"], + "layout": { + "symbol-placement": "line", + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [13, 12], + [14, 13] + ] + }, + "visibility": "visible", + "symbol-z-order": "source" + }, + "paint": { + "text-color": "rgba(0, 0, 0, 1)", + "text-halo-blur": 0.5, + "text-halo-width": 1, + "text-halo-color": "rgba(255, 255, 255, 1)" + } + }, + { + "id": "highway-shield-us-interstate", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 7, + "filter": [ + "all", + ["<=", "ref_length", 6], + ["==", "$type", "LineString"], + ["in", "network", "us-interstate"] + ], + "layout": { + "icon-image": "{network}_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-placement": { + "base": 1, + "stops": [ + [7, "point"], + [7, "line"], + [8, "line"] + ] + }, + "symbol-spacing": 200, + "text-field": "{ref}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "paint": { "text-color": "rgba(0, 0, 0, 1)" } + }, + { + "id": "highway-shield-us-other", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 9, + "filter": [ + "all", + ["<=", "ref_length", 6], + ["==", "$type", "LineString"], + ["in", "network", "us-highway", "us-state"] + ], + "layout": { + "icon-image": "{network}_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-placement": { + "base": 1, + "stops": [ + [10, "point"], + [11, "line"] + ] + }, + "symbol-spacing": 200, + "text-field": "{ref}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "paint": { "text-color": "rgba(0, 0, 0, 1)" } + }, + { + "id": "highway-shield", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 8, + "filter": [ + "all", + ["<=", "ref_length", 6], + ["==", "$type", "LineString"], + ["!in", "network", "us-interstate", "us-highway", "us-state"] + ], + "layout": { + "icon-image": "road_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-placement": { + "base": 1, + "stops": [ + [10, "point"], + [11, "line"] + ] + }, + "symbol-spacing": 200, + "text-field": "{ref}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "viewport", + "text-size": 10, + "visibility": "visible" + }, + "paint": { + "icon-opacity": { + "stops": [ + [8, 0], + [9, 1] + ] + }, + "text-opacity": { + "stops": [ + [8, 0], + [9, 1] + ] + } + } + }, + { + "id": "waterway-name", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "waterway", + "minzoom": 13, + "filter": ["all", ["==", "$type", "LineString"], ["has", "name"]], + "layout": { + "symbol-placement": "line", + "symbol-spacing": 350, + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": 14, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(2, 72, 255, 1)", + "text-halo-color": "rgba(255,255,255,1)", + "text-halo-width": 1.5, + "text-halo-blur": 0 + } + }, + { + "id": "airport-label-major", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "aerodrome_label", + "minzoom": 10, + "filter": ["all", ["has", "iata"]], + "layout": { + "icon-image": "airport_11", + "icon-size": 1, + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-optional": true, + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "poi-level-3", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 16, + "filter": [ + "all", + ["==", "$type", "Point"], + [">=", "rank", 25], + ["any", ["!has", "level"], ["==", "level", 0]] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-padding": 20, + "text-size": 12, + "visibility": "visible", + "symbol-spacing": 250, + "symbol-avoid-edges": false, + "text-letter-spacing": 0, + "icon-padding": 2, + "symbol-placement": "point", + "symbol-z-order": "auto", + "text-line-height": 1.2, + "text-allow-overlap": false, + "text-ignore-placement": false, + "icon-allow-overlap": false, + "icon-ignore-placement": false, + "icon-optional": false + }, + "paint": { + "text-color": "rgba(2, 2, 3, 1)", + "text-halo-blur": 0.5, + "text-halo-color": "rgba(232, 227, 227, 1)", + "text-halo-width": 2, + "text-translate-anchor": "map", + "text-opacity": 1 + } + }, + { + "id": "poi-level-2", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 15, + "filter": [ + "all", + ["==", "$type", "Point"], + ["<=", "rank", 24], + [">=", "rank", 15], + ["any", ["!has", "level"], ["==", "level", 0]] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(2, 2, 3, 1)", + "text-halo-blur": 0.5, + "text-halo-color": "rgba(232, 227, 227, 1)", + "text-halo-width": 1 + } + }, + { + "id": "poi-level-1", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + ["==", "$type", "Point"], + ["<=", "rank", 14], + ["has", "name"], + ["any", ["!has", "level"], ["==", "level", 0]] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(2, 2, 3, 1)", + "text-halo-blur": 0.5, + "text-halo-color": "rgba(232, 227, 227, 1)", + "text-halo-width": 2 + } + }, + { + "id": "poi-railway", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 13, + "filter": [ + "all", + ["==", "$type", "Point"], + ["has", "name"], + ["==", "class", "railway"], + ["==", "subclass", "station"] + ], + "layout": { + "icon-allow-overlap": false, + "icon-ignore-placement": false, + "icon-image": "{class}_11", + "icon-optional": false, + "text-allow-overlap": false, + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-ignore-placement": false, + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-optional": true, + "text-padding": 2, + "text-size": 12 + }, + "paint": { + "text-color": "rgba(0, 0, 0, 1)", + "text-halo-blur": 0.5, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1 + } + }, + { + "id": "place-village", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["==", "class", "village"], + "layout": { + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [10, 12], + [15, 22] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(0, 0, 0, 1)", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-town", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["==", "class", "town"], + "layout": { + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [10, 14], + [15, 24] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(0, 0, 0, 1)", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-city", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["!=", "capital", 2], ["==", "class", "city"]], + "layout": { + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [7, 14], + [11, 24] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "rgba(0, 0, 0, 1)", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-city-capital", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["==", "capital", 2], ["==", "class", "city"]], + "layout": { + "icon-image": "star_11", + "icon-size": 0.8, + "text-anchor": "left", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-offset": [0.4, 0], + "text-size": { + "base": 1.2, + "stops": [ + [7, 14], + [11, 24] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-country-other", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + [">=", "rank", 3], + ["!has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Italic"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [3, 11], + [7, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-country-3", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + [">=", "rank", 3], + ["has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [3, 11], + [7, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-country-2", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + ["==", "rank", 2], + ["has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [2, 11], + [5, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-country-1", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + ["==", "rank", 1], + ["has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [1, 11], + [4, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-continent", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 1, + "filter": ["==", "class", "continent"], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": 14, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + } +] diff --git a/app/javascript/components/shared/maplibre/styles/layers/ortho.ts b/app/javascript/components/shared/maplibre/styles/layers/ortho.ts deleted file mode 100644 index 41d70cbcd..000000000 --- a/app/javascript/components/shared/maplibre/styles/layers/ortho.ts +++ /dev/null @@ -1,2644 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { AnyLayer } from 'maplibre-gl'; - -const layers: AnyLayer[] = [ - { - id: 'photographies-aeriennes', - type: 'raster', - source: 'photographies-aeriennes', - paint: { 'raster-resampling': 'linear' } - }, - { - id: 'communes', - type: 'line', - source: 'decoupage-administratif', - 'source-layer': 'communes', - minzoom: 10, - maxzoom: 24, - filter: ['all'], - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'rgba(0, 0, 0, 1)', - 'line-width': 1.5, - 'line-opacity': 1, - 'line-blur': 0 - } - }, - { - id: 'departements', - type: 'line', - source: 'decoupage-administratif', - 'source-layer': 'departements', - minzoom: 0, - maxzoom: 24, - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'rgba(0, 0, 0, 1)', - 'line-width': 1, - 'line-opacity': 1 - } - }, - { - id: 'regions', - type: 'line', - source: 'decoupage-administratif', - 'source-layer': 'regions', - minzoom: 0, - maxzoom: 24, - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'rgba(0, 0, 0, 1)', - 'line-width': 1, - 'line-opacity': 1 - } - }, - { - id: 'waterway_tunnel', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'waterway', - minzoom: 14, - filter: [ - 'all', - ['in', 'class', 'river', 'stream', 'canal'], - ['==', 'brunnel', 'tunnel'] - ], - layout: { 'line-cap': 'round', visibility: 'none' }, - paint: { - 'line-color': '#a0c8f0', - 'line-dasharray': [2, 4], - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 6] - ] - } - } - }, - { - id: 'waterway-other', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['!in', 'class', 'canal', 'river', 'stream'], - ['==', 'intermittent', 0] - ], - layout: { 'line-cap': 'round', visibility: 'none' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 2] - ] - } - } - }, - { - id: 'waterway-other-intermittent', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['!in', 'class', 'canal', 'river', 'stream'], - ['==', 'intermittent', 1] - ], - layout: { 'line-cap': 'round', visibility: 'none' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 2] - ] - }, - 'line-dasharray': [4, 3] - } - }, - { - id: 'waterway-stream-canal', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['in', 'class', 'canal', 'stream'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 0] - ], - layout: { 'line-cap': 'round', visibility: 'none' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 6] - ] - } - } - }, - { - id: 'waterway-stream-canal-intermittent', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['in', 'class', 'canal', 'stream'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 1] - ], - layout: { 'line-cap': 'round', visibility: 'none' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 6] - ] - }, - 'line-dasharray': [4, 3] - } - }, - { - id: 'waterway-river', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['==', 'class', 'river'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 0] - ], - layout: { 'line-cap': 'round', visibility: 'none' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.2, - stops: [ - [10, 0.8], - [20, 6] - ] - } - } - }, - { - id: 'waterway-river-intermittent', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['==', 'class', 'river'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 1] - ], - layout: { 'line-cap': 'round', visibility: 'none' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.2, - stops: [ - [10, 0.8], - [20, 6] - ] - }, - 'line-dasharray': [3, 2.5] - } - }, - { - id: 'tunnel-service-track-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'service', 'track'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#cfcdca', - 'line-dasharray': [0.5, 0.25], - 'line-width': { - base: 1.2, - stops: [ - [15, 1], - [16, 4], - [20, 11] - ] - } - } - }, - { - id: 'tunnel-minor-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'minor']], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#cfcdca', - 'line-opacity': { - stops: [ - [12, 0], - [12.5, 1] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [12, 0.5], - [13, 1], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'tunnel-secondary-tertiary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [8, 1.5], - [20, 17] - ] - } - } - }, - { - id: 'tunnel-trunk-primary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'tunnel-motorway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#e9ac77', - 'line-dasharray': [0.5, 0.25], - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'tunnel-path', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'path']] - ], - paint: { - 'line-color': '#cba', - 'line-dasharray': [1.5, 0.75], - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 4] - ] - } - } - }, - { - id: 'tunnel-service-track', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'service', 'track'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff', - 'line-width': { - base: 1.2, - stops: [ - [15.5, 0], - [16, 2], - [20, 7.5] - ] - } - } - }, - { - id: 'tunnel-minor', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'minor_road']], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [13.5, 0], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'tunnel-secondary-tertiary', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff4c6', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 10] - ] - } - } - }, - { - id: 'tunnel-trunk-primary', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff4c6', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'tunnel-motorway', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#ffdaa6', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'tunnel-railway', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'rail']], - paint: { - 'line-color': '#bbb', - 'line-dasharray': [2, 2], - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } - } - }, - { - id: 'ferry', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['in', 'class', 'ferry']], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': 'rgba(108, 159, 182, 1)', - 'line-dasharray': [2, 2], - 'line-width': 1.1 - } - }, - { - id: 'aeroway-taxiway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 12, - filter: ['all', ['in', 'class', 'taxiway']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(153, 153, 153, 1)', - 'line-opacity': 1, - 'line-width': { - base: 1.5, - stops: [ - [11, 2], - [17, 12] - ] - } - } - }, - { - id: 'aeroway-runway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 12, - filter: ['all', ['in', 'class', 'runway']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(153, 153, 153, 1)', - 'line-opacity': 0.2, - 'line-width': { - base: 1.5, - stops: [ - [11, 5], - [17, 55] - ] - } - } - }, - { - id: 'aeroway-taxiway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 4, - filter: ['all', ['in', 'class', 'taxiway'], ['==', '$type', 'LineString']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(255, 255, 255, 1)', - 'line-opacity': { - base: 1, - stops: [ - [11, 0], - [12, 1] - ] - }, - 'line-width': { - base: 1.5, - stops: [ - [11, 1], - [17, 10] - ] - } - } - }, - { - id: 'aeroway-runway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 4, - filter: ['all', ['in', 'class', 'runway'], ['==', '$type', 'LineString']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(255, 255, 255, 1)', - 'line-opacity': { - base: 1, - stops: [ - [11, 0], - [12, 0.2] - ] - }, - 'line-width': { - base: 1.5, - stops: [ - [11, 4], - [17, 50] - ] - } - } - }, - { - id: 'road_area_pier', - type: 'fill', - metadata: {}, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'pier']], - layout: { visibility: 'visible' }, - paint: { 'fill-antialias': true, 'fill-color': '#f8f4f0' } - }, - { - id: 'road_pier', - type: 'line', - metadata: {}, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'pier']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#f8f4f0', - 'line-width': { - base: 1.2, - stops: [ - [15, 1], - [17, 4] - ] - } - } - }, - { - id: 'highway-area', - type: 'fill', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', '$type', 'Polygon'], ['!in', 'class', 'pier']], - layout: { visibility: 'visible' }, - paint: { - 'fill-antialias': false, - 'fill-color': 'hsla(0, 0%, 89%, 0.56)', - 'fill-opacity': { - stops: [ - [15, 0], - [16, 0.9] - ] - }, - 'fill-outline-color': '#cfcdca' - } - }, - { - id: 'highway-motorway-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 12, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway_link'] - ], - layout: { 'line-cap': 'round', 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'highway-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'highway-minor-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!=', 'brunnel', 'tunnel'], - ['in', 'class', 'minor', 'service', 'track'] - ] - ], - layout: { 'line-cap': 'round', 'line-join': 'round' }, - paint: { - 'line-color': '#cfcdca', - 'line-opacity': { - stops: [ - [14, 0], - [15, 0.5] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [15, 0.5], - [16, 5] - ] - } - } - }, - { - id: 'highway-secondary-tertiary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': { - stops: [ - [15, 0], - [16, 0.3] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [8, 1.5], - [20, 17] - ] - } - } - }, - { - id: 'highway-primary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 5, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'primary'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': { - stops: [ - [16, 0], - [17, 0.3] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [7, 0], - [8, 0.6], - [9, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'highway-trunk-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 5, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'trunk'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': { - stops: [ - [16, 0], - [17, 0.3] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [5, 0], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'highway-motorway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 4, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': { - stops: [ - [8, 0], - [9, 0.2] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [4, 0], - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'highway-path', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['==', 'class', 'path']] - ], - layout: { visibility: 'none' }, - paint: { - 'line-color': '#cba', - 'line-dasharray': [1.5, 0.75], - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 4] - ] - } - } - }, - { - id: 'highway-motorway-link', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 12, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway_link'] - ], - layout: { 'line-cap': 'round', 'line-join': 'round' }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'highway-link', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'highway-minor', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!=', 'brunnel', 'tunnel'], - ['in', 'class', 'minor', 'service', 'track'] - ] - ], - layout: { 'line-cap': 'round', 'line-join': 'round' }, - paint: { - 'line-color': '#fff', - 'line-opacity': { - stops: [ - [16, 0], - [17, 0.4] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [16, 0], - [17, 2.5] - ] - } - } - }, - { - id: 'highway-secondary-tertiary', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [8, 0.5], - [20, 13] - ] - }, - 'line-opacity': { - stops: [ - [11, 0], - [13, 0.3] - ] - } - } - }, - { - id: 'highway-primary', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'primary'] - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [8.5, 0], - [9, 0.5], - [20, 18] - ] - }, - 'line-opacity': { - stops: [ - [8, 0], - [9, 0.3] - ] - } - } - }, - { - id: 'highway-trunk', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['in', 'class', 'trunk']] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - }, - 'line-opacity': { - stops: [ - [16, 0], - [17, 0.3] - ] - } - } - }, - { - id: 'highway-motorway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 5, - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway'] - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - }, - 'line-opacity': { - stops: [ - [8, 0], - [9, 0.2] - ] - } - } - }, - { - id: 'railway-transit', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.77)', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [20, 1] - ] - } - } - }, - { - id: 'railway-transit-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.68)', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 2], - [20, 6] - ] - } - } - }, - { - id: 'railway-service', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'rail'], ['has', 'service']] - ], - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.77)', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [20, 1] - ] - } - } - }, - { - id: 'railway-service-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'rail'], ['has', 'service']] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.68)', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 2], - [20, 6] - ] - } - } - }, - { - id: 'railway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!has', 'service'], - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'rail'] - ] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': '#bbb', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - }, - 'line-opacity': { - stops: [ - [11, 0], - [13, 1] - ] - } - } - }, - { - id: 'railway-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!has', 'service'], - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'rail'] - ] - ], - paint: { - 'line-color': '#bbb', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } - } - }, - { - id: 'bridge-motorway-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['==', 'class', 'motorway_link'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'bridge-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'bridge-secondary-tertiary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 0.3, - 'line-width': { - base: 1.2, - stops: [ - [8, 1.5], - [20, 28] - ] - } - } - }, - { - id: 'bridge-trunk-primary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': 'hsl(28, 76%, 67%)', - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 26] - ] - }, - 'line-opacity': 0.3 - } - }, - { - id: 'bridge-motorway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - }, - 'line-opacity': { - stops: [ - [16, 0], - [17, 0.3] - ] - } - } - }, - { - id: 'bridge-path-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'path']] - ], - paint: { - 'line-color': '#f8f4f0', - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 18] - ] - } - } - }, - { - id: 'bridge-path', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'path']] - ], - paint: { - 'line-color': '#cba', - 'line-dasharray': [1.5, 0.75], - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 4] - ] - } - } - }, - { - id: 'bridge-motorway-link', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['==', 'class', 'motorway_link'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'bridge-link', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'bridge-secondary-tertiary', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 20] - ] - }, - 'line-opacity': { - stops: [ - [16, 0], - [17, 0.3] - ] - } - } - }, - { - id: 'bridge-trunk-primary', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - }, - 'line-opacity': 0.3 - } - }, - { - id: 'bridge-motorway', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - }, - 'line-opacity': 0.3 - } - }, - { - id: 'bridge-railway', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'rail']], - paint: { - 'line-color': '#bbb', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } - } - }, - { - id: 'bridge-railway-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'rail']], - paint: { - 'line-color': '#bbb', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } - } - }, - { - id: 'cablecar', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: ['==', 'class', 'cable_car'], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': 'hsl(0, 0%, 70%)', - 'line-width': { - base: 1, - stops: [ - [11, 1], - [19, 2.5] - ] - } - } - }, - { - id: 'cablecar-dash', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: ['==', 'class', 'cable_car'], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': 'hsl(0, 0%, 70%)', - 'line-dasharray': [2, 3], - 'line-width': { - base: 1, - stops: [ - [11, 3], - [19, 5.5] - ] - } - } - }, - { - id: 'boundary-land-level-4', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: [ - 'all', - ['>=', 'admin_level', 4], - ['<=', 'admin_level', 8], - ['!=', 'maritime', 1] - ], - layout: { 'line-join': 'round', visibility: 'none' }, - paint: { - 'line-color': '#9e9cab', - 'line-dasharray': [3, 1, 1, 1], - 'line-width': { - base: 1.4, - stops: [ - [4, 0.4], - [5, 1], - [12, 3] - ] - } - } - }, - { - id: 'boundary-land-level-2', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: [ - 'all', - ['==', 'admin_level', 2], - ['!=', 'maritime', 1], - ['!=', 'disputed', 1] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'none' - }, - paint: { - 'line-color': 'hsl(248, 7%, 66%)', - 'line-width': { - base: 1, - stops: [ - [0, 0.6], - [4, 1.4], - [5, 2], - [12, 8] - ] - } - } - }, - { - id: 'boundary-land-disputed', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: ['all', ['!=', 'maritime', 1], ['==', 'disputed', 1]], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'none' - }, - paint: { - 'line-color': 'hsl(248, 7%, 70%)', - 'line-dasharray': [1, 3], - 'line-width': { - base: 1, - stops: [ - [0, 0.6], - [4, 1.4], - [5, 2], - [12, 8] - ] - } - } - }, - { - id: 'boundary-water', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: ['all', ['in', 'admin_level', 2, 4], ['==', 'maritime', 1]], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(154, 189, 214, 1)', - 'line-opacity': { - stops: [ - [6, 0.6], - [10, 1] - ] - }, - 'line-width': { - base: 1, - stops: [ - [0, 0.6], - [4, 1.4], - [5, 2], - [12, 8] - ] - } - } - }, - { - id: 'water-name-lakeline', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'water_name', - filter: ['==', '$type', 'LineString'], - layout: { - 'symbol-placement': 'line', - 'symbol-spacing': 350, - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': 14 - }, - paint: { - 'text-color': '#74aee9', - 'text-halo-color': 'rgba(255,255,255,0.7)', - 'text-halo-width': 1.5 - } - }, - { - id: 'water-name-ocean', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'water_name', - filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'ocean']], - layout: { - 'symbol-placement': 'point', - 'symbol-spacing': 350, - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': 14 - }, - paint: { - 'text-color': '#74aee9', - 'text-halo-color': 'rgba(255,255,255,0.7)', - 'text-halo-width': 1.5 - } - }, - { - id: 'water-name-other', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'water_name', - filter: ['all', ['==', '$type', 'Point'], ['!in', 'class', 'ocean']], - layout: { - 'symbol-placement': 'point', - 'symbol-spacing': 350, - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': { - stops: [ - [0, 10], - [6, 14] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(0, 51, 178, 1)', - 'text-halo-color': 'rgba(255, 255, 255, 1)', - 'text-halo-width': 1.5 - } - }, - { - id: 'road_oneway', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 15, - filter: [ - 'all', - ['==', 'oneway', 1], - [ - 'in', - 'class', - 'motorway', - 'trunk', - 'primary', - 'secondary', - 'tertiary', - 'minor', - 'service' - ] - ], - layout: { - 'icon-image': 'oneway', - 'icon-padding': 2, - 'icon-rotate': 90, - 'icon-rotation-alignment': 'map', - 'icon-size': { - stops: [ - [15, 0.5], - [19, 1] - ] - }, - 'symbol-placement': 'line', - 'symbol-spacing': 75, - visibility: 'visible' - }, - paint: { 'icon-opacity': 0.5 } - }, - { - id: 'road_oneway_opposite', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 15, - filter: [ - 'all', - ['==', 'oneway', -1], - [ - 'in', - 'class', - 'motorway', - 'trunk', - 'primary', - 'secondary', - 'tertiary', - 'minor', - 'service' - ] - ], - layout: { - 'icon-image': 'oneway', - 'icon-padding': 2, - 'icon-rotate': -90, - 'icon-rotation-alignment': 'map', - 'icon-size': { - stops: [ - [15, 0.5], - [19, 1] - ] - }, - 'symbol-placement': 'line', - 'symbol-spacing': 75, - visibility: 'visible' - }, - paint: { 'icon-opacity': 0.5 } - }, - { - id: 'highway-name-path', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 15.5, - filter: ['==', 'class', 'path'], - layout: { - 'symbol-placement': 'line', - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'map', - 'text-size': { - base: 1, - stops: [ - [13, 12], - [14, 13] - ] - } - }, - paint: { - 'text-color': 'rgba(171, 86, 0, 1)', - 'text-halo-color': '#f8f4f0', - 'text-halo-width': 2 - } - }, - { - id: 'highway-name-minor', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 15, - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['in', 'class', 'minor', 'service', 'track'] - ], - layout: { - 'symbol-placement': 'line', - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'map', - 'text-size': { - base: 1, - stops: [ - [13, 12], - [14, 13] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(143, 69, 0, 1)', - 'text-halo-blur': 0.5, - 'text-halo-width': 2, - 'text-halo-color': 'rgba(255, 255, 255, 1)' - } - }, - { - id: 'highway-name-major', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 12.2, - filter: ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk'], - layout: { - 'symbol-placement': 'line', - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'map', - 'text-size': { - base: 1, - stops: [ - [13, 12], - [14, 13] - ] - }, - visibility: 'visible', - 'symbol-z-order': 'source' - }, - paint: { - 'text-color': 'rgba(0, 0, 0, 1)', - 'text-halo-blur': 0.5, - 'text-halo-width': 1, - 'text-halo-color': 'rgba(255, 255, 255, 1)' - } - }, - { - id: 'highway-shield-us-interstate', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 7, - filter: [ - 'all', - ['<=', 'ref_length', 6], - ['==', '$type', 'LineString'], - ['in', 'network', 'us-interstate'] - ], - layout: { - 'icon-image': '{network}_{ref_length}', - 'icon-rotation-alignment': 'viewport', - 'icon-size': 1, - 'symbol-placement': { - base: 1, - stops: [ - [7, 'point'], - [7, 'line'], - [8, 'line'] - ] - }, - 'symbol-spacing': 200, - 'text-field': '{ref}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'viewport', - 'text-size': 10 - }, - paint: { 'text-color': 'rgba(0, 0, 0, 1)' } - }, - { - id: 'highway-shield-us-other', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 9, - filter: [ - 'all', - ['<=', 'ref_length', 6], - ['==', '$type', 'LineString'], - ['in', 'network', 'us-highway', 'us-state'] - ], - layout: { - 'icon-image': '{network}_{ref_length}', - 'icon-rotation-alignment': 'viewport', - 'icon-size': 1, - 'symbol-placement': { - base: 1, - stops: [ - [10, 'point'], - [11, 'line'] - ] - } as any, - 'symbol-spacing': 200, - 'text-field': '{ref}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'viewport', - 'text-size': 10 - }, - paint: { 'text-color': 'rgba(0, 0, 0, 1)' } - }, - { - id: 'highway-shield', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 8, - filter: [ - 'all', - ['<=', 'ref_length', 6], - ['==', '$type', 'LineString'], - ['!in', 'network', 'us-interstate', 'us-highway', 'us-state'] - ], - layout: { - 'icon-image': 'road_{ref_length}', - 'icon-rotation-alignment': 'viewport', - 'icon-size': 1, - 'symbol-placement': { - base: 1, - stops: [ - [10, 'point'], - [11, 'line'] - ] - } as any, - 'symbol-spacing': 200, - 'text-field': '{ref}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'viewport', - 'text-size': 10, - visibility: 'visible' - }, - paint: { - 'icon-opacity': { - stops: [ - [8, 0], - [9, 1] - ] - }, - 'text-opacity': { - stops: [ - [8, 0], - [9, 1] - ] - } - } - }, - { - id: 'waterway-name', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'waterway', - minzoom: 13, - filter: ['all', ['==', '$type', 'LineString'], ['has', 'name']], - layout: { - 'symbol-placement': 'line', - 'symbol-spacing': 350, - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': 14, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(2, 72, 255, 1)', - 'text-halo-color': 'rgba(255,255,255,1)', - 'text-halo-width': 1.5, - 'text-halo-blur': 0 - } - }, - { - id: 'airport-label-major', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'aerodrome_label', - minzoom: 10, - filter: ['all', ['has', 'iata']], - layout: { - 'icon-image': 'airport_11', - 'icon-size': 1, - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-optional': true, - 'text-padding': 2, - 'text-size': 12, - visibility: 'visible' - }, - paint: { - 'text-color': '#666', - 'text-halo-blur': 0.5, - 'text-halo-color': '#ffffff', - 'text-halo-width': 1 - } - }, - { - id: 'poi-level-3', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 16, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['>=', 'rank', 25], - ['any', ['!has', 'level'], ['==', 'level', 0]] - ], - layout: { - 'icon-image': '{class}_11', - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-padding': 20, - 'text-size': 12, - visibility: 'visible', - 'symbol-spacing': 250, - 'symbol-avoid-edges': false, - 'text-letter-spacing': 0, - 'icon-padding': 2, - 'symbol-placement': 'point', - 'symbol-z-order': 'auto' as any, - 'text-line-height': 1.2, - 'text-allow-overlap': false, - 'text-ignore-placement': false, - 'icon-allow-overlap': false, - 'icon-ignore-placement': false, - 'icon-optional': false - }, - paint: { - 'text-color': 'rgba(2, 2, 3, 1)', - 'text-halo-blur': 0.5, - 'text-halo-color': 'rgba(232, 227, 227, 1)', - 'text-halo-width': 2, - 'text-translate-anchor': 'map', - 'text-opacity': 1 - } - }, - { - id: 'poi-level-2', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 15, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['<=', 'rank', 24], - ['>=', 'rank', 15], - ['any', ['!has', 'level'], ['==', 'level', 0]] - ], - layout: { - 'icon-image': '{class}_11', - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-padding': 2, - 'text-size': 12, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(2, 2, 3, 1)', - 'text-halo-blur': 0.5, - 'text-halo-color': 'rgba(232, 227, 227, 1)', - 'text-halo-width': 1 - } - }, - { - id: 'poi-level-1', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 14, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['<=', 'rank', 14], - ['has', 'name'], - ['any', ['!has', 'level'], ['==', 'level', 0]] - ], - layout: { - 'icon-image': '{class}_11', - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-padding': 2, - 'text-size': 12, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(2, 2, 3, 1)', - 'text-halo-blur': 0.5, - 'text-halo-color': 'rgba(232, 227, 227, 1)', - 'text-halo-width': 2 - } - }, - { - id: 'poi-railway', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 13, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['has', 'name'], - ['==', 'class', 'railway'], - ['==', 'subclass', 'station'] - ], - layout: { - 'icon-allow-overlap': false, - 'icon-ignore-placement': false, - 'icon-image': '{class}_11', - 'icon-optional': false, - 'text-allow-overlap': false, - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-ignore-placement': false, - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-optional': true, - 'text-padding': 2, - 'text-size': 12 - }, - paint: { - 'text-color': 'rgba(0, 0, 0, 1)', - 'text-halo-blur': 0.5, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1 - } - }, - { - id: 'place-village', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['==', 'class', 'village'], - layout: { - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-size': { - base: 1.2, - stops: [ - [10, 12], - [15, 22] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(0, 0, 0, 1)', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-town', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['==', 'class', 'town'], - layout: { - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-size': { - base: 1.2, - stops: [ - [10, 14], - [15, 24] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(0, 0, 0, 1)', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-city', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['all', ['!=', 'capital', 2], ['==', 'class', 'city']], - layout: { - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-size': { - base: 1.2, - stops: [ - [7, 14], - [11, 24] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': 'rgba(0, 0, 0, 1)', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-city-capital', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['all', ['==', 'capital', 2], ['==', 'class', 'city']], - layout: { - 'icon-image': 'star_11', - 'icon-size': 0.8, - 'text-anchor': 'left', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-offset': [0.4, 0], - 'text-size': { - base: 1.2, - stops: [ - [7, 14], - [11, 24] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': '#333', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-country-other', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['>=', 'rank', 3], - ['!has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Italic'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [3, 11], - [7, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-country-3', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['>=', 'rank', 3], - ['has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [3, 11], - [7, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-country-2', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['==', 'rank', 2], - ['has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [2, 11], - [5, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-country-1', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['==', 'rank', 1], - ['has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [1, 11], - [4, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-continent', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - maxzoom: 1, - filter: ['==', 'class', 'continent'], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': 14, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - } -]; - -export default layers; diff --git a/app/javascript/components/shared/maplibre/styles/layers/vector.json b/app/javascript/components/shared/maplibre/styles/layers/vector.json new file mode 100644 index 000000000..a177876b6 --- /dev/null +++ b/app/javascript/components/shared/maplibre/styles/layers/vector.json @@ -0,0 +1,2866 @@ +[ + { + "id": "background", + "type": "background", + "minzoom": 0, + "maxzoom": 24, + "layout": { "visibility": "visible" }, + "paint": { "background-color": "rgba(255, 246, 241, 1)" } + }, + { + "id": "landcover-glacier", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["==", "subclass", "glacier"], + "layout": { "visibility": "visible" }, + "paint": { + "fill-color": "#fff", + "fill-opacity": { + "base": 1, + "stops": [ + [0, 0.9], + [10, 0.3] + ] + } + } + }, + { + "id": "landuse-residential", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": [ + "all", + ["in", "class", "residential", "suburb", "neighbourhood"] + ], + "layout": { "visibility": "visible" }, + "paint": { + "fill-color": { + "base": 1, + "stops": [ + [12, "hsla(30, 19%, 90%, 0.4)"], + [16, "hsla(30, 19%, 90%, 0.2)"] + ] + } + } + }, + { + "id": "landuse-commercial", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": [ + "all", + ["==", "$type", "Polygon"], + ["==", "class", "commercial"] + ], + "layout": { "visibility": "visible" }, + "paint": { "fill-color": "hsla(0, 60%, 87%, 0.23)" } + }, + { + "id": "landuse-industrial", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": [ + "all", + ["==", "$type", "Polygon"], + ["==", "class", "industrial"] + ], + "paint": { "fill-color": "hsla(49, 100%, 88%, 0.34)" } + }, + { + "id": "landuse-cemetery", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": ["==", "class", "cemetery"], + "paint": { "fill-color": "#e0e4dd" } + }, + { + "id": "landuse-hospital", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": ["==", "class", "hospital"], + "paint": { "fill-color": "#fde" } + }, + { + "id": "landuse-school", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": ["==", "class", "school"], + "paint": { "fill-color": "#f0e8f8" } + }, + { + "id": "landuse-railway", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landuse", + "filter": ["==", "class", "railway"], + "paint": { "fill-color": "hsla(30, 19%, 90%, 0.4)" } + }, + { + "id": "landcover-wood", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["==", "class", "wood"], + "paint": { + "fill-antialias": { + "base": 1, + "stops": [ + [0, false], + [9, true] + ] + }, + "fill-color": "#6a4", + "fill-opacity": 0.1, + "fill-outline-color": "hsla(0, 0%, 0%, 0.03)" + } + }, + { + "id": "landcover-grass", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["==", "class", "grass"], + "paint": { "fill-color": "#d8e8c8", "fill-opacity": 1 } + }, + { + "id": "landcover-grass-park", + "type": "fill", + "metadata": { "mapbox:group": "1444849388993.3071" }, + "source": "openmaptiles", + "source-layer": "park", + "filter": ["==", "class", "public_park"], + "paint": { "fill-color": "#d8e8c8", "fill-opacity": 0.8 } + }, + { + "id": "waterway_tunnel", + "type": "line", + "source": "openmaptiles", + "source-layer": "waterway", + "minzoom": 14, + "filter": [ + "all", + ["in", "class", "river", "stream", "canal"], + ["==", "brunnel", "tunnel"] + ], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "#a0c8f0", + "line-dasharray": [2, 4], + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 6] + ] + } + } + }, + { + "id": "waterway-other", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["!in", "class", "canal", "river", "stream"], + ["==", "intermittent", 0] + ], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 2] + ] + } + } + }, + { + "id": "waterway-other-intermittent", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["!in", "class", "canal", "river", "stream"], + ["==", "intermittent", 1] + ], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 2] + ] + }, + "line-dasharray": [4, 3] + } + }, + { + "id": "waterway-stream-canal", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["in", "class", "canal", "stream"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 0] + ], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 6] + ] + } + } + }, + { + "id": "waterway-stream-canal-intermittent", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["in", "class", "canal", "stream"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 1] + ], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.3, + "stops": [ + [13, 0.5], + [20, 6] + ] + }, + "line-dasharray": [4, 3] + } + }, + { + "id": "waterway-river", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["==", "class", "river"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 0] + ], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.2, + "stops": [ + [10, 0.8], + [20, 6] + ] + } + } + }, + { + "id": "waterway-river-intermittent", + "type": "line", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "waterway", + "filter": [ + "all", + ["==", "class", "river"], + ["!=", "brunnel", "tunnel"], + ["==", "intermittent", 1] + ], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "#a0c8f0", + "line-width": { + "base": 1.2, + "stops": [ + [10, 0.8], + [20, 6] + ] + }, + "line-dasharray": [3, 2.5] + } + }, + { + "id": "water-offset", + "type": "fill", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "water", + "maxzoom": 8, + "filter": ["==", "$type", "Polygon"], + "layout": { "visibility": "visible" }, + "paint": { + "fill-color": "#a0c8f0", + "fill-opacity": 1, + "fill-translate": { + "base": 1, + "stops": [ + [6, [2, 0]], + [8, [0, 0]] + ] + } + } + }, + { + "id": "water", + "type": "fill", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "water", + "filter": ["all", ["!=", "intermittent", 1]], + "layout": { "visibility": "visible" }, + "paint": { "fill-color": "hsl(210, 67%, 85%)" } + }, + { + "id": "water-intermittent", + "type": "fill", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "water", + "filter": ["all", ["==", "intermittent", 1]], + "layout": { "visibility": "visible" }, + "paint": { "fill-color": "hsl(210, 67%, 85%)", "fill-opacity": 0.7 } + }, + { + "id": "water-pattern", + "type": "fill", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "water", + "filter": ["all"], + "layout": { "visibility": "visible" }, + "paint": { "fill-pattern": "wave", "fill-translate": [0, 2.5] } + }, + { + "id": "landcover-ice-shelf", + "type": "fill", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["==", "subclass", "ice_shelf"], + "layout": { "visibility": "visible" }, + "paint": { + "fill-color": "#fff", + "fill-opacity": { + "base": 1, + "stops": [ + [0, 0.9], + [10, 0.3] + ] + } + } + }, + { + "id": "landcover-sand", + "type": "fill", + "metadata": { "mapbox:group": "1444849382550.77" }, + "source": "openmaptiles", + "source-layer": "landcover", + "filter": ["all", ["==", "class", "sand"]], + "layout": { "visibility": "visible" }, + "paint": { "fill-color": "rgba(245, 238, 188, 1)", "fill-opacity": 1 } + }, + { + "id": "building", + "type": "fill", + "metadata": { "mapbox:group": "1444849364238.8171" }, + "source": "openmaptiles", + "source-layer": "building", + "layout": { "visibility": "none" }, + "paint": { + "fill-antialias": true, + "fill-color": { + "base": 1, + "stops": [ + [15.5, "#f2eae2"], + [16, "#dfdbd7"] + ] + } + } + }, + { + "id": "building-top", + "type": "fill", + "metadata": { "mapbox:group": "1444849364238.8171" }, + "source": "openmaptiles", + "source-layer": "building", + "layout": { "visibility": "none" }, + "paint": { + "fill-color": "#f2eae2", + "fill-opacity": { + "base": 1, + "stops": [ + [13, 0], + [16, 1] + ] + }, + "fill-outline-color": "#dfdbd7", + "fill-translate": { + "base": 1, + "stops": [ + [14, [0, 0]], + [16, [-2, -2]] + ] + } + } + }, + { + "id": "tunnel-service-track-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "#cfcdca", + "line-dasharray": [0.5, 0.25], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1], + [16, 4], + [20, 11] + ] + } + } + }, + { + "id": "tunnel-minor-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "minor"]], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "#cfcdca", + "line-opacity": { + "stops": [ + [12, 0], + [12.5, 1] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [12, 0.5], + [13, 1], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "tunnel-secondary-tertiary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [8, 1.5], + [20, 17] + ] + } + } + }, + { + "id": "tunnel-trunk-primary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "tunnel-motorway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "motorway"]], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "#e9ac77", + "line-dasharray": [0.5, 0.25], + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "tunnel-path", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "brunnel", "tunnel"], ["==", "class", "path"]] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "#cba", + "line-dasharray": [1.5, 0.75], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 4] + ] + } + } + }, + { + "id": "tunnel-service-track", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "service", "track"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff", + "line-width": { + "base": 1.2, + "stops": [ + [15.5, 0], + [16, 2], + [20, 7.5] + ] + } + } + }, + { + "id": "tunnel-minor", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["==", "class", "minor_road"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [13.5, 0], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "tunnel-secondary-tertiary", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 10] + ] + } + } + }, + { + "id": "tunnel-trunk-primary", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "tunnel"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fff4c6", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "tunnel-motorway", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "motorway"]], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "#ffdaa6", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "tunnel-railway", + "type": "line", + "metadata": { "mapbox:group": "1444849354174.1904" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "tunnel"], ["==", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-dasharray": [2, 2], + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [15, 0.75], + [20, 2] + ] + } + } + }, + { + "id": "ferry", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["in", "class", "ferry"]], + "layout": { "line-join": "round", "visibility": "none" }, + "paint": { + "line-color": "rgba(108, 159, 182, 1)", + "line-dasharray": [2, 2], + "line-width": 1.1 + } + }, + { + "id": "aeroway-taxiway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 12, + "filter": ["all", ["in", "class", "taxiway"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(153, 153, 153, 1)", + "line-opacity": 1, + "line-width": { + "base": 1.5, + "stops": [ + [11, 2], + [17, 12] + ] + } + } + }, + { + "id": "aeroway-runway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 12, + "filter": ["all", ["in", "class", "runway"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(153, 153, 153, 1)", + "line-opacity": 1, + "line-width": { + "base": 1.5, + "stops": [ + [11, 5], + [17, 55] + ] + } + } + }, + { + "id": "aeroway-area", + "type": "fill", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 4, + "filter": [ + "all", + ["==", "$type", "Polygon"], + ["in", "class", "runway", "taxiway"] + ], + "layout": { "visibility": "visible" }, + "paint": { + "fill-color": "rgba(255, 255, 255, 1)", + "fill-opacity": { + "base": 1, + "stops": [ + [13, 0], + [14, 1] + ] + } + } + }, + { + "id": "aeroway-taxiway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 4, + "filter": [ + "all", + ["in", "class", "taxiway"], + ["==", "$type", "LineString"] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-opacity": { + "base": 1, + "stops": [ + [11, 0], + [12, 1] + ] + }, + "line-width": { + "base": 1.5, + "stops": [ + [11, 1], + [17, 10] + ] + } + } + }, + { + "id": "aeroway-runway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "aeroway", + "minzoom": 4, + "filter": ["all", ["in", "class", "runway"], ["==", "$type", "LineString"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(255, 255, 255, 1)", + "line-opacity": { + "base": 1, + "stops": [ + [11, 0], + [12, 1] + ] + }, + "line-width": { + "base": 1.5, + "stops": [ + [11, 4], + [17, 50] + ] + } + } + }, + { + "id": "road_area_pier", + "type": "fill", + "metadata": {}, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "$type", "Polygon"], ["==", "class", "pier"]], + "layout": { "visibility": "none" }, + "paint": { "fill-antialias": true, "fill-color": "#f8f4f0" } + }, + { + "id": "road_pier", + "type": "line", + "metadata": {}, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 0, + "filter": ["all", ["==", "$type", "LineString"], ["in", "class", "pier"]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "none" + }, + "paint": { + "line-color": "#f8f4f0", + "line-width": { + "base": 1.2, + "stops": [ + [15, 1], + [17, 4] + ] + } + } + }, + { + "id": "highway-area", + "type": "fill", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "$type", "Polygon"], ["!in", "class", "pier"]], + "layout": { "visibility": "visible" }, + "paint": { + "fill-antialias": false, + "fill-color": "hsla(0, 0%, 89%, 0.56)", + "fill-opacity": 0.9, + "fill-outline-color": "#cfcdca" + } + }, + { + "id": "highway-motorway-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 12, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway_link"] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "highway-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "highway-minor-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!=", "brunnel", "tunnel"], + ["in", "class", "minor", "service", "track"] + ] + ], + "layout": { "line-cap": "round", "line-join": "round" }, + "paint": { + "line-color": "#cfcdca", + "line-opacity": { + "stops": [ + [12, 0], + [12.5, 1] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [12, 0.5], + [13, 1], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "highway-secondary-tertiary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [8, 1.5], + [20, 17] + ] + } + } + }, + { + "id": "highway-primary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "primary"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [7, 0], + [8, 1] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [7, 0], + [8, 0.6], + [9, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "highway-trunk-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "trunk"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [5, 0], + [6, 1] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [5, 0], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "highway-motorway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 4, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"] + ], + "layout": { + "line-cap": "butt", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": { + "stops": [ + [4, 0], + [5, 1] + ] + }, + "line-width": { + "base": 1.2, + "stops": [ + [4, 0], + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "highway-path", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["!in", "brunnel", "bridge", "tunnel"], ["==", "class", "path"]] + ], + "paint": { + "line-color": "#cba", + "line-dasharray": [1.5, 0.75], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 4] + ] + } + } + }, + { + "id": "highway-motorway-link", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 12, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway_link"] + ], + "layout": { "line-cap": "round", "line-join": "round" }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "highway-link", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "highway-minor", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!=", "brunnel", "tunnel"], + ["in", "class", "minor", "service", "track"] + ] + ], + "layout": { "line-cap": "round", "line-join": "round" }, + "paint": { + "line-color": "#fff", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [13.5, 0], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "highway-secondary-tertiary", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [8, 0.5], + [20, 13] + ] + } + } + }, + { + "id": "highway-primary", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["in", "class", "primary"] + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [8.5, 0], + [9, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "highway-trunk", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["!in", "brunnel", "bridge", "tunnel"], ["in", "class", "trunk"]] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "highway-motorway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 5, + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "motorway"] + ] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "railway-transit", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "transit"], ["!in", "brunnel", "tunnel"]] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.77)", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [20, 1] + ] + } + } + }, + { + "id": "railway-transit-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "transit"], ["!in", "brunnel", "tunnel"]] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.68)", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 2], + [20, 6] + ] + } + } + }, + { + "id": "railway-service", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "rail"], ["has", "service"]] + ], + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.77)", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [20, 1] + ] + } + } + }, + { + "id": "railway-service-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "class", "rail"], ["has", "service"]] + ], + "layout": { "visibility": "visible" }, + "paint": { + "line-color": "hsla(0, 0%, 73%, 0.68)", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 2], + [20, 6] + ] + } + } + }, + { + "id": "railway", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!has", "service"], + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "rail"] + ] + ], + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [15, 0.75], + [20, 2] + ] + } + } + }, + { + "id": "railway-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849345966.4436" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + [ + "all", + ["!has", "service"], + ["!in", "brunnel", "bridge", "tunnel"], + ["==", "class", "rail"] + ] + ], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 3], + [20, 8] + ] + } + } + }, + { + "id": "bridge-motorway-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["==", "class", "motorway_link"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "bridge-link-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [12, 1], + [13, 3], + [14, 4], + [20, 15] + ] + } + } + }, + { + "id": "bridge-secondary-tertiary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-opacity": 1, + "line-width": { + "base": 1.2, + "stops": [ + [8, 1.5], + [20, 28] + ] + } + } + }, + { + "id": "bridge-trunk-primary-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "hsl(28, 76%, 67%)", + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 26] + ] + } + } + }, + { + "id": "bridge-motorway-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "motorway"]], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#e9ac77", + "line-width": { + "base": 1.2, + "stops": [ + [5, 0.4], + [6, 0.6], + [7, 1.5], + [20, 22] + ] + } + } + }, + { + "id": "bridge-path-casing", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "brunnel", "bridge"], ["==", "class", "path"]] + ], + "paint": { + "line-color": "#f8f4f0", + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 18] + ] + } + } + }, + { + "id": "bridge-path", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "$type", "LineString"], + ["all", ["==", "brunnel", "bridge"], ["==", "class", "path"]] + ], + "paint": { + "line-color": "#cba", + "line-dasharray": [1.5, 0.75], + "line-width": { + "base": 1.2, + "stops": [ + [15, 1.2], + [20, 4] + ] + } + } + }, + { + "id": "bridge-motorway-link", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["==", "class", "motorway_link"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "bridge-link", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + [ + "in", + "class", + "primary_link", + "secondary_link", + "tertiary_link", + "trunk_link" + ] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [12.5, 0], + [13, 1.5], + [14, 2.5], + [20, 11.5] + ] + } + } + }, + { + "id": "bridge-secondary-tertiary", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "secondary", "tertiary"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 20] + ] + } + } + }, + { + "id": "bridge-trunk-primary", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": [ + "all", + ["==", "brunnel", "bridge"], + ["in", "class", "primary", "trunk"] + ], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fea", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "bridge-motorway", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "motorway"]], + "layout": { "line-join": "round" }, + "paint": { + "line-color": "#fc8", + "line-width": { + "base": 1.2, + "stops": [ + [6.5, 0], + [7, 0.5], + [20, 18] + ] + } + } + }, + { + "id": "bridge-railway", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-width": { + "base": 1.4, + "stops": [ + [14, 0.4], + [15, 0.75], + [20, 2] + ] + } + } + }, + { + "id": "bridge-railway-hatching", + "type": "line", + "metadata": { "mapbox:group": "1444849334699.1902" }, + "source": "openmaptiles", + "source-layer": "transportation", + "filter": ["all", ["==", "brunnel", "bridge"], ["==", "class", "rail"]], + "paint": { + "line-color": "#bbb", + "line-dasharray": [0.2, 8], + "line-width": { + "base": 1.4, + "stops": [ + [14.5, 0], + [15, 3], + [20, 8] + ] + } + } + }, + { + "id": "cablecar", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": ["==", "class", "cable_car"], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "hsl(0, 0%, 70%)", + "line-width": { + "base": 1, + "stops": [ + [11, 1], + [19, 2.5] + ] + } + } + }, + { + "id": "cablecar-dash", + "type": "line", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 13, + "filter": ["==", "class", "cable_car"], + "layout": { "line-cap": "round", "visibility": "visible" }, + "paint": { + "line-color": "hsl(0, 0%, 70%)", + "line-dasharray": [2, 3], + "line-width": { + "base": 1, + "stops": [ + [11, 3], + [19, 5.5] + ] + } + } + }, + { + "id": "boundary-land-level-4", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + [">=", "admin_level", 4], + ["<=", "admin_level", 8], + ["!=", "maritime", 1] + ], + "layout": { "line-join": "round", "visibility": "visible" }, + "paint": { + "line-color": "#9e9cab", + "line-dasharray": [3, 1, 1, 1], + "line-width": { + "base": 1.4, + "stops": [ + [4, 0.4], + [5, 1], + [12, 3] + ] + } + } + }, + { + "id": "boundary-land-level-2", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": [ + "all", + ["==", "admin_level", 2], + ["!=", "maritime", 1], + ["!=", "disputed", 1] + ], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "hsl(248, 7%, 66%)", + "line-width": { + "base": 1, + "stops": [ + [0, 0.6], + [4, 1.4], + [5, 2], + [12, 8] + ] + } + } + }, + { + "id": "boundary-land-disputed", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": ["all", ["!=", "maritime", 1], ["==", "disputed", 1]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "hsl(248, 7%, 70%)", + "line-dasharray": [1, 3], + "line-width": { + "base": 1, + "stops": [ + [0, 0.6], + [4, 1.4], + [5, 2], + [12, 8] + ] + } + } + }, + { + "id": "boundary-water", + "type": "line", + "source": "openmaptiles", + "source-layer": "boundary", + "filter": ["all", ["in", "admin_level", 2, 4], ["==", "maritime", 1]], + "layout": { + "line-cap": "round", + "line-join": "round", + "visibility": "visible" + }, + "paint": { + "line-color": "rgba(154, 189, 214, 1)", + "line-opacity": { + "stops": [ + [6, 0.6], + [10, 1] + ] + }, + "line-width": { + "base": 1, + "stops": [ + [0, 0.6], + [4, 1.4], + [5, 2], + [12, 8] + ] + } + } + }, + { + "id": "waterway-name", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "waterway", + "minzoom": 13, + "filter": ["all", ["==", "$type", "LineString"], ["has", "name"]], + "layout": { + "symbol-placement": "line", + "symbol-spacing": 350, + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": 14, + "visibility": "visible" + }, + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1.5 + } + }, + { + "id": "communes", + "type": "line", + "source": "decoupage-administratif", + "source-layer": "communes", + "minzoom": 10, + "maxzoom": 24, + "layout": { "visibility": "visible" } + }, + { + "id": "departements", + "type": "line", + "source": "decoupage-administratif", + "source-layer": "departements", + "layout": { "visibility": "visible" } + }, + { + "id": "regions", + "type": "line", + "source": "decoupage-administratif", + "source-layer": "regions", + "layout": { "visibility": "visible" } + }, + { + "id": "water-name-lakeline", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "water_name", + "filter": ["==", "$type", "LineString"], + "layout": { + "symbol-placement": "line", + "symbol-spacing": 350, + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": 14 + }, + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1.5 + } + }, + { + "id": "water-name-ocean", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "water_name", + "filter": ["all", ["==", "$type", "Point"], ["==", "class", "ocean"]], + "layout": { + "symbol-placement": "point", + "symbol-spacing": 350, + "text-field": "{name:latin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": 14 + }, + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1.5 + } + }, + { + "id": "water-name-other", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "water_name", + "filter": ["all", ["==", "$type", "Point"], ["!in", "class", "ocean"]], + "layout": { + "symbol-placement": "point", + "symbol-spacing": 350, + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Italic"], + "text-letter-spacing": 0.2, + "text-max-width": 5, + "text-rotation-alignment": "map", + "text-size": { + "stops": [ + [0, 10], + [6, 14] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#74aee9", + "text-halo-color": "rgba(255,255,255,0.7)", + "text-halo-width": 1.5 + } + }, + { + "id": "road_oneway", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": [ + "all", + ["==", "oneway", 1], + [ + "in", + "class", + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "minor", + "service" + ] + ], + "layout": { + "icon-image": "oneway", + "icon-padding": 2, + "icon-rotate": 90, + "icon-rotation-alignment": "map", + "icon-size": { + "stops": [ + [15, 0.5], + [19, 1] + ] + }, + "symbol-placement": "line", + "symbol-spacing": 75, + "visibility": "visible" + }, + "paint": { "icon-opacity": 0.5 } + }, + { + "id": "road_oneway_opposite", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation", + "minzoom": 15, + "filter": [ + "all", + ["==", "oneway", -1], + [ + "in", + "class", + "motorway", + "trunk", + "primary", + "secondary", + "tertiary", + "minor", + "service" + ] + ], + "layout": { + "icon-image": "oneway", + "icon-padding": 2, + "icon-rotate": -90, + "icon-rotation-alignment": "map", + "icon-size": { + "stops": [ + [15, 0.5], + [19, 1] + ] + }, + "symbol-placement": "line", + "symbol-spacing": 75, + "visibility": "visible" + }, + "paint": { "icon-opacity": 0.5 } + }, + { + "id": "highway-name-path", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 15.5, + "filter": ["==", "class", "path"], + "layout": { + "symbol-placement": "line", + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [13, 12], + [14, 13] + ] + } + }, + "paint": { + "text-color": "hsl(30, 23%, 62%)", + "text-halo-color": "#f8f4f0", + "text-halo-width": 0.5 + } + }, + { + "id": "highway-name-minor", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 15, + "filter": [ + "all", + ["==", "$type", "LineString"], + ["in", "class", "minor", "service", "track"] + ], + "layout": { + "symbol-placement": "line", + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [13, 12], + [14, 13] + ] + } + }, + "paint": { + "text-color": "#765", + "text-halo-blur": 0.5, + "text-halo-width": 1 + } + }, + { + "id": "highway-name-major", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 12.2, + "filter": ["in", "class", "primary", "secondary", "tertiary", "trunk"], + "layout": { + "symbol-placement": "line", + "text-field": "{name:latin} {name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "map", + "text-size": { + "base": 1, + "stops": [ + [13, 12], + [14, 13] + ] + } + }, + "paint": { + "text-color": "#765", + "text-halo-blur": 0.5, + "text-halo-width": 1 + } + }, + { + "id": "highway-shield", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 8, + "filter": [ + "all", + ["<=", "ref_length", 6], + ["==", "$type", "LineString"], + ["!in", "network", "us-interstate", "us-highway", "us-state"] + ], + "layout": { + "icon-image": "road_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-placement": { + "base": 1, + "stops": [ + [10, "point"], + [11, "line"] + ] + }, + "symbol-spacing": 200, + "text-field": "{ref}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "paint": {} + }, + { + "id": "highway-shield-us-interstate", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 7, + "filter": [ + "all", + ["<=", "ref_length", 6], + ["==", "$type", "LineString"], + ["in", "network", "us-interstate"] + ], + "layout": { + "icon-image": "{network}_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-placement": { + "base": 1, + "stops": [ + [7, "point"], + [7, "line"], + [8, "line"] + ] + }, + "symbol-spacing": 200, + "text-field": "{ref}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "paint": { "text-color": "rgba(0, 0, 0, 1)" } + }, + { + "id": "highway-shield-us-other", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "transportation_name", + "minzoom": 9, + "filter": [ + "all", + ["<=", "ref_length", 6], + ["==", "$type", "LineString"], + ["in", "network", "us-highway", "us-state"] + ], + "layout": { + "icon-image": "{network}_{ref_length}", + "icon-rotation-alignment": "viewport", + "icon-size": 1, + "symbol-placement": { + "base": 1, + "stops": [ + [10, "point"], + [11, "line"] + ] + }, + "symbol-spacing": 200, + "text-field": "{ref}", + "text-font": ["Noto Sans Regular"], + "text-rotation-alignment": "viewport", + "text-size": 10 + }, + "paint": { "text-color": "rgba(0, 0, 0, 1)" } + }, + { + "id": "airport-label-major", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "aerodrome_label", + "minzoom": 10, + "filter": ["all", ["has", "iata"]], + "layout": { + "icon-image": "airport_11", + "icon-size": 1, + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-optional": true, + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "poi-level-3", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 16, + "filter": [ + "all", + ["==", "$type", "Point"], + [">=", "rank", 25], + ["any", ["!has", "level"], ["==", "level", 0]] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "poi-level-2", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 15, + "filter": [ + "all", + ["==", "$type", "Point"], + ["<=", "rank", 24], + [">=", "rank", 15], + ["any", ["!has", "level"], ["==", "level", 0]] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "poi-level-1", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 14, + "filter": [ + "all", + ["==", "$type", "Point"], + ["<=", "rank", 14], + ["has", "name"], + ["any", ["!has", "level"], ["==", "level", 0]] + ], + "layout": { + "icon-image": "{class}_11", + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-padding": 2, + "text-size": 12, + "visibility": "visible" + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "poi-railway", + "type": "symbol", + "source": "openmaptiles", + "source-layer": "poi", + "minzoom": 13, + "filter": [ + "all", + ["==", "$type", "Point"], + ["has", "name"], + ["==", "class", "railway"], + ["==", "subclass", "station"] + ], + "layout": { + "icon-allow-overlap": false, + "icon-ignore-placement": false, + "icon-image": "{class}_11", + "icon-optional": false, + "text-allow-overlap": false, + "text-anchor": "top", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-ignore-placement": false, + "text-max-width": 9, + "text-offset": [0, 0.6], + "text-optional": true, + "text-padding": 2, + "text-size": 12 + }, + "paint": { + "text-color": "#666", + "text-halo-blur": 0.5, + "text-halo-color": "#ffffff", + "text-halo-width": 1 + } + }, + { + "id": "place-other", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "!in", + "class", + "city", + "town", + "village", + "country", + "continent" + ], + "layout": { + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Bold"], + "text-letter-spacing": 0.1, + "text-max-width": 9, + "text-size": { + "base": 1.2, + "stops": [ + [12, 10], + [15, 14] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#633", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-village", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["==", "class", "village"], + "layout": { + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [10, 12], + [15, 22] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-town", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["==", "class", "town"], + "layout": { + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [10, 14], + [15, 24] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-city", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["!=", "capital", 2], ["==", "class", "city"]], + "layout": { + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-size": { + "base": 1.2, + "stops": [ + [7, 14], + [11, 24] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-city-capital", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": ["all", ["==", "capital", 2], ["==", "class", "city"]], + "layout": { + "icon-image": "star_11", + "icon-size": 0.8, + "text-anchor": "left", + "text-field": "{name:latin}\n{name:nonlatin}", + "text-font": ["Noto Sans Regular"], + "text-max-width": 8, + "text-offset": [0.4, 0], + "text-size": { + "base": 1.2, + "stops": [ + [7, 14], + [11, 24] + ] + }, + "visibility": "visible" + }, + "paint": { + "text-color": "#333", + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 1.2 + } + }, + { + "id": "place-country-other", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + [">=", "rank", 3], + ["!has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Italic"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [3, 11], + [7, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-country-3", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + [">=", "rank", 3], + ["has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [3, 11], + [7, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-country-2", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + ["==", "rank", 2], + ["has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [2, 11], + [5, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-country-1", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "filter": [ + "all", + ["==", "class", "country"], + ["==", "rank", 1], + ["has", "iso_a2"] + ], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": { + "stops": [ + [1, 11], + [4, 17] + ] + }, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + }, + { + "id": "place-continent", + "type": "symbol", + "metadata": { "mapbox:group": "1444849242106.713" }, + "source": "openmaptiles", + "source-layer": "place", + "maxzoom": 1, + "filter": ["==", "class", "continent"], + "layout": { + "text-field": "{name:latin}", + "text-font": ["Noto Sans Bold"], + "text-max-width": 6.25, + "text-size": 14, + "text-transform": "uppercase", + "visibility": "visible" + }, + "paint": { + "text-color": "#334", + "text-halo-blur": 1, + "text-halo-color": "rgba(255,255,255,0.8)", + "text-halo-width": 2 + } + } +] diff --git a/app/javascript/components/shared/maplibre/styles/layers/vector.ts b/app/javascript/components/shared/maplibre/styles/layers/vector.ts deleted file mode 100644 index b96800c2c..000000000 --- a/app/javascript/components/shared/maplibre/styles/layers/vector.ts +++ /dev/null @@ -1,2844 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { AnyLayer } from 'maplibre-gl'; - -const layers: AnyLayer[] = [ - { - id: 'background', - type: 'background', - minzoom: 0, - maxzoom: 24, - layout: { visibility: 'visible' }, - paint: { 'background-color': 'rgba(255, 246, 241, 1)' } - }, - { - id: 'landcover-glacier', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landcover', - filter: ['==', 'subclass', 'glacier'], - layout: { visibility: 'visible' }, - paint: { - 'fill-color': '#fff', - 'fill-opacity': { - base: 1, - stops: [ - [0, 0.9], - [10, 0.3] - ] - } - } - }, - { - id: 'landuse-residential', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landuse', - filter: ['all', ['in', 'class', 'residential', 'suburb', 'neighbourhood']], - layout: { visibility: 'visible' }, - paint: { - 'fill-color': { - base: 1, - stops: [ - [12, 'hsla(30, 19%, 90%, 0.4)'], - [16, 'hsla(30, 19%, 90%, 0.2)'] - ] - } - } - }, - { - id: 'landuse-commercial', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landuse', - filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'commercial']], - layout: { visibility: 'visible' }, - paint: { 'fill-color': 'hsla(0, 60%, 87%, 0.23)' } - }, - { - id: 'landuse-industrial', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landuse', - filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'industrial']], - paint: { 'fill-color': 'hsla(49, 100%, 88%, 0.34)' } - }, - { - id: 'landuse-cemetery', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landuse', - filter: ['==', 'class', 'cemetery'], - paint: { 'fill-color': '#e0e4dd' } - }, - { - id: 'landuse-hospital', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landuse', - filter: ['==', 'class', 'hospital'], - paint: { 'fill-color': '#fde' } - }, - { - id: 'landuse-school', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landuse', - filter: ['==', 'class', 'school'], - paint: { 'fill-color': '#f0e8f8' } - }, - { - id: 'landuse-railway', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landuse', - filter: ['==', 'class', 'railway'], - paint: { 'fill-color': 'hsla(30, 19%, 90%, 0.4)' } - }, - { - id: 'landcover-wood', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landcover', - filter: ['==', 'class', 'wood'], - paint: { - 'fill-antialias': { - base: 1, - stops: [ - [0, false], - [9, true] - ] - } as any, - 'fill-color': '#6a4', - 'fill-opacity': 0.1, - 'fill-outline-color': 'hsla(0, 0%, 0%, 0.03)' - } - }, - { - id: 'landcover-grass', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'landcover', - filter: ['==', 'class', 'grass'], - paint: { 'fill-color': '#d8e8c8', 'fill-opacity': 1 } - }, - { - id: 'landcover-grass-park', - type: 'fill', - metadata: { 'mapbox:group': '1444849388993.3071' }, - source: 'openmaptiles', - 'source-layer': 'park', - filter: ['==', 'class', 'public_park'], - paint: { 'fill-color': '#d8e8c8', 'fill-opacity': 0.8 } - }, - { - id: 'waterway_tunnel', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'waterway', - minzoom: 14, - filter: [ - 'all', - ['in', 'class', 'river', 'stream', 'canal'], - ['==', 'brunnel', 'tunnel'] - ], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#a0c8f0', - 'line-dasharray': [2, 4], - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 6] - ] - } - } - }, - { - id: 'waterway-other', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['!in', 'class', 'canal', 'river', 'stream'], - ['==', 'intermittent', 0] - ], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 2] - ] - } - } - }, - { - id: 'waterway-other-intermittent', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['!in', 'class', 'canal', 'river', 'stream'], - ['==', 'intermittent', 1] - ], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 2] - ] - }, - 'line-dasharray': [4, 3] - } - }, - { - id: 'waterway-stream-canal', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['in', 'class', 'canal', 'stream'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 0] - ], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 6] - ] - } - } - }, - { - id: 'waterway-stream-canal-intermittent', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['in', 'class', 'canal', 'stream'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 1] - ], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.3, - stops: [ - [13, 0.5], - [20, 6] - ] - }, - 'line-dasharray': [4, 3] - } - }, - { - id: 'waterway-river', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['==', 'class', 'river'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 0] - ], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.2, - stops: [ - [10, 0.8], - [20, 6] - ] - } - } - }, - { - id: 'waterway-river-intermittent', - type: 'line', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'waterway', - filter: [ - 'all', - ['==', 'class', 'river'], - ['!=', 'brunnel', 'tunnel'], - ['==', 'intermittent', 1] - ], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#a0c8f0', - 'line-width': { - base: 1.2, - stops: [ - [10, 0.8], - [20, 6] - ] - }, - 'line-dasharray': [3, 2.5] - } - }, - { - id: 'water-offset', - type: 'fill', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'water', - maxzoom: 8, - filter: ['==', '$type', 'Polygon'], - layout: { visibility: 'visible' }, - paint: { - 'fill-color': '#a0c8f0', - 'fill-opacity': 1, - 'fill-translate': { - base: 1, - stops: [ - [6, [2, 0]], - [8, [0, 0]] - ] - } as any - } - }, - { - id: 'water', - type: 'fill', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'water', - filter: ['all', ['!=', 'intermittent', 1]], - layout: { visibility: 'visible' }, - paint: { 'fill-color': 'hsl(210, 67%, 85%)' } - }, - { - id: 'water-intermittent', - type: 'fill', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'water', - filter: ['all', ['==', 'intermittent', 1]], - layout: { visibility: 'visible' }, - paint: { 'fill-color': 'hsl(210, 67%, 85%)', 'fill-opacity': 0.7 } - }, - { - id: 'water-pattern', - type: 'fill', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'water', - filter: ['all'], - layout: { visibility: 'visible' }, - paint: { 'fill-pattern': 'wave', 'fill-translate': [0, 2.5] } - }, - { - id: 'landcover-ice-shelf', - type: 'fill', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'landcover', - filter: ['==', 'subclass', 'ice_shelf'], - layout: { visibility: 'visible' }, - paint: { - 'fill-color': '#fff', - 'fill-opacity': { - base: 1, - stops: [ - [0, 0.9], - [10, 0.3] - ] - } - } - }, - { - id: 'landcover-sand', - type: 'fill', - metadata: { 'mapbox:group': '1444849382550.77' }, - source: 'openmaptiles', - 'source-layer': 'landcover', - filter: ['all', ['==', 'class', 'sand']], - layout: { visibility: 'visible' }, - paint: { 'fill-color': 'rgba(245, 238, 188, 1)', 'fill-opacity': 1 } - }, - { - id: 'building', - type: 'fill', - metadata: { 'mapbox:group': '1444849364238.8171' }, - source: 'openmaptiles', - 'source-layer': 'building', - layout: { visibility: 'none' }, - paint: { - 'fill-antialias': true, - 'fill-color': { - base: 1, - stops: [ - [15.5, '#f2eae2'], - [16, '#dfdbd7'] - ] - } - } - }, - { - id: 'building-top', - type: 'fill', - metadata: { 'mapbox:group': '1444849364238.8171' }, - source: 'openmaptiles', - 'source-layer': 'building', - layout: { visibility: 'none' }, - paint: { - 'fill-color': '#f2eae2', - 'fill-opacity': { - base: 1, - stops: [ - [13, 0], - [16, 1] - ] - }, - 'fill-outline-color': '#dfdbd7', - 'fill-translate': { - base: 1, - stops: [ - [14, [0, 0]], - [16, [-2, -2]] - ] - } as any - } - }, - { - id: 'tunnel-service-track-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'service', 'track'] - ], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#cfcdca', - 'line-dasharray': [0.5, 0.25], - 'line-width': { - base: 1.2, - stops: [ - [15, 1], - [16, 4], - [20, 11] - ] - } - } - }, - { - id: 'tunnel-minor-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'minor']], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#cfcdca', - 'line-opacity': { - stops: [ - [12, 0], - [12.5, 1] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [12, 0.5], - [13, 1], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'tunnel-secondary-tertiary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [8, 1.5], - [20, 17] - ] - } - } - }, - { - id: 'tunnel-trunk-primary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'tunnel-motorway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#e9ac77', - 'line-dasharray': [0.5, 0.25], - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'tunnel-path', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'path']] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': '#cba', - 'line-dasharray': [1.5, 0.75], - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 4] - ] - } - } - }, - { - id: 'tunnel-service-track', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'service', 'track'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff', - 'line-width': { - base: 1.2, - stops: [ - [15.5, 0], - [16, 2], - [20, 7.5] - ] - } - } - }, - { - id: 'tunnel-minor', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'minor_road']], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [13.5, 0], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'tunnel-secondary-tertiary', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff4c6', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 10] - ] - } - } - }, - { - id: 'tunnel-trunk-primary', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'tunnel'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fff4c6', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'tunnel-motorway', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#ffdaa6', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'tunnel-railway', - type: 'line', - metadata: { 'mapbox:group': '1444849354174.1904' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'tunnel'], ['==', 'class', 'rail']], - paint: { - 'line-color': '#bbb', - 'line-dasharray': [2, 2], - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } - } - }, - { - id: 'ferry', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['in', 'class', 'ferry']], - layout: { 'line-join': 'round', visibility: 'none' }, - paint: { - 'line-color': 'rgba(108, 159, 182, 1)', - 'line-dasharray': [2, 2], - 'line-width': 1.1 - } - }, - { - id: 'aeroway-taxiway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 12, - filter: ['all', ['in', 'class', 'taxiway']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(153, 153, 153, 1)', - 'line-opacity': 1, - 'line-width': { - base: 1.5, - stops: [ - [11, 2], - [17, 12] - ] - } - } - }, - { - id: 'aeroway-runway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 12, - filter: ['all', ['in', 'class', 'runway']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(153, 153, 153, 1)', - 'line-opacity': 1, - 'line-width': { - base: 1.5, - stops: [ - [11, 5], - [17, 55] - ] - } - } - }, - { - id: 'aeroway-area', - type: 'fill', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 4, - filter: [ - 'all', - ['==', '$type', 'Polygon'], - ['in', 'class', 'runway', 'taxiway'] - ], - layout: { visibility: 'visible' }, - paint: { - 'fill-color': 'rgba(255, 255, 255, 1)', - 'fill-opacity': { - base: 1, - stops: [ - [13, 0], - [14, 1] - ] - } - } - }, - { - id: 'aeroway-taxiway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 4, - filter: ['all', ['in', 'class', 'taxiway'], ['==', '$type', 'LineString']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(255, 255, 255, 1)', - 'line-opacity': { - base: 1, - stops: [ - [11, 0], - [12, 1] - ] - }, - 'line-width': { - base: 1.5, - stops: [ - [11, 1], - [17, 10] - ] - } - } - }, - { - id: 'aeroway-runway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'aeroway', - minzoom: 4, - filter: ['all', ['in', 'class', 'runway'], ['==', '$type', 'LineString']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(255, 255, 255, 1)', - 'line-opacity': { - base: 1, - stops: [ - [11, 0], - [12, 1] - ] - }, - 'line-width': { - base: 1.5, - stops: [ - [11, 4], - [17, 50] - ] - } - } - }, - { - id: 'road_area_pier', - type: 'fill', - metadata: {}, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', '$type', 'Polygon'], ['==', 'class', 'pier']], - layout: { visibility: 'none' }, - paint: { 'fill-antialias': true, 'fill-color': '#f8f4f0' } - }, - { - id: 'road_pier', - type: 'line', - metadata: {}, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 0, - filter: ['all', ['==', '$type', 'LineString'], ['in', 'class', 'pier']], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'none' - }, - paint: { - 'line-color': '#f8f4f0', - 'line-width': { - base: 1.2, - stops: [ - [15, 1], - [17, 4] - ] - } - } - }, - { - id: 'highway-area', - type: 'fill', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', '$type', 'Polygon'], ['!in', 'class', 'pier']], - layout: { visibility: 'visible' }, - paint: { - 'fill-antialias': false, - 'fill-color': 'hsla(0, 0%, 89%, 0.56)', - 'fill-opacity': 0.9, - 'fill-outline-color': '#cfcdca' - } - }, - { - id: 'highway-motorway-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 12, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway_link'] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'highway-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'highway-minor-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!=', 'brunnel', 'tunnel'], - ['in', 'class', 'minor', 'service', 'track'] - ] - ], - layout: { 'line-cap': 'round', 'line-join': 'round' }, - paint: { - 'line-color': '#cfcdca', - 'line-opacity': { - stops: [ - [12, 0], - [12.5, 1] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [12, 0.5], - [13, 1], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'highway-secondary-tertiary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [8, 1.5], - [20, 17] - ] - } - } - }, - { - id: 'highway-primary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 5, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'primary'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': { - stops: [ - [7, 0], - [8, 1] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [7, 0], - [8, 0.6], - [9, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'highway-trunk-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 5, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'trunk'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': { - stops: [ - [5, 0], - [6, 1] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [5, 0], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'highway-motorway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 4, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway'] - ], - layout: { - 'line-cap': 'butt', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': { - stops: [ - [4, 0], - [5, 1] - ] - }, - 'line-width': { - base: 1.2, - stops: [ - [4, 0], - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'highway-path', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['==', 'class', 'path']] - ], - paint: { - 'line-color': '#cba', - 'line-dasharray': [1.5, 0.75], - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 4] - ] - } - } - }, - { - id: 'highway-motorway-link', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 12, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway_link'] - ], - layout: { 'line-cap': 'round', 'line-join': 'round' }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'highway-link', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'highway-minor', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!=', 'brunnel', 'tunnel'], - ['in', 'class', 'minor', 'service', 'track'] - ] - ], - layout: { 'line-cap': 'round', 'line-join': 'round' }, - paint: { - 'line-color': '#fff', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [13.5, 0], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'highway-secondary-tertiary', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [8, 0.5], - [20, 13] - ] - } - } - }, - { - id: 'highway-primary', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['in', 'class', 'primary'] - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [8.5, 0], - [9, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'highway-trunk', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['!in', 'brunnel', 'bridge', 'tunnel'], ['in', 'class', 'trunk']] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'highway-motorway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 5, - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'motorway'] - ] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'railway-transit', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.77)', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [20, 1] - ] - } - } - }, - { - id: 'railway-transit-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'transit'], ['!in', 'brunnel', 'tunnel']] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.68)', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 2], - [20, 6] - ] - } - } - }, - { - id: 'railway-service', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'rail'], ['has', 'service']] - ], - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.77)', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [20, 1] - ] - } - } - }, - { - id: 'railway-service-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'class', 'rail'], ['has', 'service']] - ], - layout: { visibility: 'visible' }, - paint: { - 'line-color': 'hsla(0, 0%, 73%, 0.68)', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 2], - [20, 6] - ] - } - } - }, - { - id: 'railway', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!has', 'service'], - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'rail'] - ] - ], - paint: { - 'line-color': '#bbb', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } - } - }, - { - id: 'railway-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849345966.4436' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - [ - 'all', - ['!has', 'service'], - ['!in', 'brunnel', 'bridge', 'tunnel'], - ['==', 'class', 'rail'] - ] - ], - paint: { - 'line-color': '#bbb', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } - } - }, - { - id: 'bridge-motorway-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['==', 'class', 'motorway_link'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'bridge-link-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [12, 1], - [13, 3], - [14, 4], - [20, 15] - ] - } - } - }, - { - id: 'bridge-secondary-tertiary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-opacity': 1, - 'line-width': { - base: 1.2, - stops: [ - [8, 1.5], - [20, 28] - ] - } - } - }, - { - id: 'bridge-trunk-primary-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': 'hsl(28, 76%, 67%)', - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 26] - ] - } - } - }, - { - id: 'bridge-motorway-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#e9ac77', - 'line-width': { - base: 1.2, - stops: [ - [5, 0.4], - [6, 0.6], - [7, 1.5], - [20, 22] - ] - } - } - }, - { - id: 'bridge-path-casing', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'path']] - ], - paint: { - 'line-color': '#f8f4f0', - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 18] - ] - } - } - }, - { - id: 'bridge-path', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'path']] - ], - paint: { - 'line-color': '#cba', - 'line-dasharray': [1.5, 0.75], - 'line-width': { - base: 1.2, - stops: [ - [15, 1.2], - [20, 4] - ] - } - } - }, - { - id: 'bridge-motorway-link', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['==', 'class', 'motorway_link'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'bridge-link', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - [ - 'in', - 'class', - 'primary_link', - 'secondary_link', - 'tertiary_link', - 'trunk_link' - ] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [12.5, 0], - [13, 1.5], - [14, 2.5], - [20, 11.5] - ] - } - } - }, - { - id: 'bridge-secondary-tertiary', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'secondary', 'tertiary'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 20] - ] - } - } - }, - { - id: 'bridge-trunk-primary', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: [ - 'all', - ['==', 'brunnel', 'bridge'], - ['in', 'class', 'primary', 'trunk'] - ], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fea', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'bridge-motorway', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'motorway']], - layout: { 'line-join': 'round' }, - paint: { - 'line-color': '#fc8', - 'line-width': { - base: 1.2, - stops: [ - [6.5, 0], - [7, 0.5], - [20, 18] - ] - } - } - }, - { - id: 'bridge-railway', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'rail']], - paint: { - 'line-color': '#bbb', - 'line-width': { - base: 1.4, - stops: [ - [14, 0.4], - [15, 0.75], - [20, 2] - ] - } - } - }, - { - id: 'bridge-railway-hatching', - type: 'line', - metadata: { 'mapbox:group': '1444849334699.1902' }, - source: 'openmaptiles', - 'source-layer': 'transportation', - filter: ['all', ['==', 'brunnel', 'bridge'], ['==', 'class', 'rail']], - paint: { - 'line-color': '#bbb', - 'line-dasharray': [0.2, 8], - 'line-width': { - base: 1.4, - stops: [ - [14.5, 0], - [15, 3], - [20, 8] - ] - } - } - }, - { - id: 'cablecar', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: ['==', 'class', 'cable_car'], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': 'hsl(0, 0%, 70%)', - 'line-width': { - base: 1, - stops: [ - [11, 1], - [19, 2.5] - ] - } - } - }, - { - id: 'cablecar-dash', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 13, - filter: ['==', 'class', 'cable_car'], - layout: { 'line-cap': 'round', visibility: 'visible' }, - paint: { - 'line-color': 'hsl(0, 0%, 70%)', - 'line-dasharray': [2, 3], - 'line-width': { - base: 1, - stops: [ - [11, 3], - [19, 5.5] - ] - } - } - }, - { - id: 'boundary-land-level-4', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: [ - 'all', - ['>=', 'admin_level', 4], - ['<=', 'admin_level', 8], - ['!=', 'maritime', 1] - ], - layout: { 'line-join': 'round', visibility: 'visible' }, - paint: { - 'line-color': '#9e9cab', - 'line-dasharray': [3, 1, 1, 1], - 'line-width': { - base: 1.4, - stops: [ - [4, 0.4], - [5, 1], - [12, 3] - ] - } - } - }, - { - id: 'boundary-land-level-2', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: [ - 'all', - ['==', 'admin_level', 2], - ['!=', 'maritime', 1], - ['!=', 'disputed', 1] - ], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'hsl(248, 7%, 66%)', - 'line-width': { - base: 1, - stops: [ - [0, 0.6], - [4, 1.4], - [5, 2], - [12, 8] - ] - } - } - }, - { - id: 'boundary-land-disputed', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: ['all', ['!=', 'maritime', 1], ['==', 'disputed', 1]], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'hsl(248, 7%, 70%)', - 'line-dasharray': [1, 3], - 'line-width': { - base: 1, - stops: [ - [0, 0.6], - [4, 1.4], - [5, 2], - [12, 8] - ] - } - } - }, - { - id: 'boundary-water', - type: 'line', - source: 'openmaptiles', - 'source-layer': 'boundary', - filter: ['all', ['in', 'admin_level', 2, 4], ['==', 'maritime', 1]], - layout: { - 'line-cap': 'round', - 'line-join': 'round', - visibility: 'visible' - }, - paint: { - 'line-color': 'rgba(154, 189, 214, 1)', - 'line-opacity': { - stops: [ - [6, 0.6], - [10, 1] - ] - }, - 'line-width': { - base: 1, - stops: [ - [0, 0.6], - [4, 1.4], - [5, 2], - [12, 8] - ] - } - } - }, - { - id: 'waterway-name', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'waterway', - minzoom: 13, - filter: ['all', ['==', '$type', 'LineString'], ['has', 'name']], - layout: { - 'symbol-placement': 'line', - 'symbol-spacing': 350, - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': 14, - visibility: 'visible' - }, - paint: { - 'text-color': '#74aee9', - 'text-halo-color': 'rgba(255,255,255,0.7)', - 'text-halo-width': 1.5 - } - }, - { - id: 'communes', - type: 'line', - source: 'decoupage-administratif', - 'source-layer': 'communes', - minzoom: 10, - maxzoom: 24, - layout: { visibility: 'visible' } - }, - { - id: 'departements', - type: 'line', - source: 'decoupage-administratif', - 'source-layer': 'departements', - layout: { visibility: 'visible' } - }, - { - id: 'regions', - type: 'line', - source: 'decoupage-administratif', - 'source-layer': 'regions', - layout: { visibility: 'visible' } - }, - { - id: 'water-name-lakeline', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'water_name', - filter: ['==', '$type', 'LineString'], - layout: { - 'symbol-placement': 'line', - 'symbol-spacing': 350, - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': 14 - }, - paint: { - 'text-color': '#74aee9', - 'text-halo-color': 'rgba(255,255,255,0.7)', - 'text-halo-width': 1.5 - } - }, - { - id: 'water-name-ocean', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'water_name', - filter: ['all', ['==', '$type', 'Point'], ['==', 'class', 'ocean']], - layout: { - 'symbol-placement': 'point', - 'symbol-spacing': 350, - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': 14 - }, - paint: { - 'text-color': '#74aee9', - 'text-halo-color': 'rgba(255,255,255,0.7)', - 'text-halo-width': 1.5 - } - }, - { - id: 'water-name-other', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'water_name', - filter: ['all', ['==', '$type', 'Point'], ['!in', 'class', 'ocean']], - layout: { - 'symbol-placement': 'point', - 'symbol-spacing': 350, - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Italic'], - 'text-letter-spacing': 0.2, - 'text-max-width': 5, - 'text-rotation-alignment': 'map', - 'text-size': { - stops: [ - [0, 10], - [6, 14] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': '#74aee9', - 'text-halo-color': 'rgba(255,255,255,0.7)', - 'text-halo-width': 1.5 - } - }, - { - id: 'road_oneway', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 15, - filter: [ - 'all', - ['==', 'oneway', 1], - [ - 'in', - 'class', - 'motorway', - 'trunk', - 'primary', - 'secondary', - 'tertiary', - 'minor', - 'service' - ] - ], - layout: { - 'icon-image': 'oneway', - 'icon-padding': 2, - 'icon-rotate': 90, - 'icon-rotation-alignment': 'map', - 'icon-size': { - stops: [ - [15, 0.5], - [19, 1] - ] - }, - 'symbol-placement': 'line', - 'symbol-spacing': 75, - visibility: 'visible' - }, - paint: { 'icon-opacity': 0.5 } - }, - { - id: 'road_oneway_opposite', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation', - minzoom: 15, - filter: [ - 'all', - ['==', 'oneway', -1], - [ - 'in', - 'class', - 'motorway', - 'trunk', - 'primary', - 'secondary', - 'tertiary', - 'minor', - 'service' - ] - ], - layout: { - 'icon-image': 'oneway', - 'icon-padding': 2, - 'icon-rotate': -90, - 'icon-rotation-alignment': 'map', - 'icon-size': { - stops: [ - [15, 0.5], - [19, 1] - ] - }, - 'symbol-placement': 'line', - 'symbol-spacing': 75, - visibility: 'visible' - }, - paint: { 'icon-opacity': 0.5 } - }, - { - id: 'highway-name-path', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 15.5, - filter: ['==', 'class', 'path'], - layout: { - 'symbol-placement': 'line', - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'map', - 'text-size': { - base: 1, - stops: [ - [13, 12], - [14, 13] - ] - } - }, - paint: { - 'text-color': 'hsl(30, 23%, 62%)', - 'text-halo-color': '#f8f4f0', - 'text-halo-width': 0.5 - } - }, - { - id: 'highway-name-minor', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 15, - filter: [ - 'all', - ['==', '$type', 'LineString'], - ['in', 'class', 'minor', 'service', 'track'] - ], - layout: { - 'symbol-placement': 'line', - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'map', - 'text-size': { - base: 1, - stops: [ - [13, 12], - [14, 13] - ] - } - }, - paint: { - 'text-color': '#765', - 'text-halo-blur': 0.5, - 'text-halo-width': 1 - } - }, - { - id: 'highway-name-major', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 12.2, - filter: ['in', 'class', 'primary', 'secondary', 'tertiary', 'trunk'], - layout: { - 'symbol-placement': 'line', - 'text-field': '{name:latin} {name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'map', - 'text-size': { - base: 1, - stops: [ - [13, 12], - [14, 13] - ] - } - }, - paint: { - 'text-color': '#765', - 'text-halo-blur': 0.5, - 'text-halo-width': 1 - } - }, - { - id: 'highway-shield', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 8, - filter: [ - 'all', - ['<=', 'ref_length', 6], - ['==', '$type', 'LineString'], - ['!in', 'network', 'us-interstate', 'us-highway', 'us-state'] - ], - layout: { - 'icon-image': 'road_{ref_length}', - 'icon-rotation-alignment': 'viewport', - 'icon-size': 1, - 'symbol-placement': { - base: 1, - stops: [ - [10, 'point'], - [11, 'line'] - ] - } as any, - 'symbol-spacing': 200, - 'text-field': '{ref}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'viewport', - 'text-size': 10 - }, - paint: {} - }, - { - id: 'highway-shield-us-interstate', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 7, - filter: [ - 'all', - ['<=', 'ref_length', 6], - ['==', '$type', 'LineString'], - ['in', 'network', 'us-interstate'] - ], - layout: { - 'icon-image': '{network}_{ref_length}', - 'icon-rotation-alignment': 'viewport', - 'icon-size': 1, - 'symbol-placement': { - base: 1, - stops: [ - [7, 'point'], - [7, 'line'], - [8, 'line'] - ] - } as any, - 'symbol-spacing': 200, - 'text-field': '{ref}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'viewport', - 'text-size': 10 - }, - paint: { 'text-color': 'rgba(0, 0, 0, 1)' } - }, - { - id: 'highway-shield-us-other', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'transportation_name', - minzoom: 9, - filter: [ - 'all', - ['<=', 'ref_length', 6], - ['==', '$type', 'LineString'], - ['in', 'network', 'us-highway', 'us-state'] - ], - layout: { - 'icon-image': '{network}_{ref_length}', - 'icon-rotation-alignment': 'viewport', - 'icon-size': 1, - 'symbol-placement': { - base: 1, - stops: [ - [10, 'point'], - [11, 'line'] - ] - } as any, - 'symbol-spacing': 200, - 'text-field': '{ref}', - 'text-font': ['Noto Sans Regular'], - 'text-rotation-alignment': 'viewport', - 'text-size': 10 - }, - paint: { 'text-color': 'rgba(0, 0, 0, 1)' } - }, - { - id: 'airport-label-major', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'aerodrome_label', - minzoom: 10, - filter: ['all', ['has', 'iata']], - layout: { - 'icon-image': 'airport_11', - 'icon-size': 1, - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-optional': true, - 'text-padding': 2, - 'text-size': 12, - visibility: 'visible' - }, - paint: { - 'text-color': '#666', - 'text-halo-blur': 0.5, - 'text-halo-color': '#ffffff', - 'text-halo-width': 1 - } - }, - { - id: 'poi-level-3', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 16, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['>=', 'rank', 25], - ['any', ['!has', 'level'], ['==', 'level', 0]] - ], - layout: { - 'icon-image': '{class}_11', - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-padding': 2, - 'text-size': 12, - visibility: 'visible' - }, - paint: { - 'text-color': '#666', - 'text-halo-blur': 0.5, - 'text-halo-color': '#ffffff', - 'text-halo-width': 1 - } - }, - { - id: 'poi-level-2', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 15, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['<=', 'rank', 24], - ['>=', 'rank', 15], - ['any', ['!has', 'level'], ['==', 'level', 0]] - ], - layout: { - 'icon-image': '{class}_11', - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-padding': 2, - 'text-size': 12, - visibility: 'visible' - }, - paint: { - 'text-color': '#666', - 'text-halo-blur': 0.5, - 'text-halo-color': '#ffffff', - 'text-halo-width': 1 - } - }, - { - id: 'poi-level-1', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 14, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['<=', 'rank', 14], - ['has', 'name'], - ['any', ['!has', 'level'], ['==', 'level', 0]] - ], - layout: { - 'icon-image': '{class}_11', - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-padding': 2, - 'text-size': 12, - visibility: 'visible' - }, - paint: { - 'text-color': '#666', - 'text-halo-blur': 0.5, - 'text-halo-color': '#ffffff', - 'text-halo-width': 1 - } - }, - { - id: 'poi-railway', - type: 'symbol', - source: 'openmaptiles', - 'source-layer': 'poi', - minzoom: 13, - filter: [ - 'all', - ['==', '$type', 'Point'], - ['has', 'name'], - ['==', 'class', 'railway'], - ['==', 'subclass', 'station'] - ], - layout: { - 'icon-allow-overlap': false, - 'icon-ignore-placement': false, - 'icon-image': '{class}_11', - 'icon-optional': false, - 'text-allow-overlap': false, - 'text-anchor': 'top', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-ignore-placement': false, - 'text-max-width': 9, - 'text-offset': [0, 0.6], - 'text-optional': true, - 'text-padding': 2, - 'text-size': 12 - }, - paint: { - 'text-color': '#666', - 'text-halo-blur': 0.5, - 'text-halo-color': '#ffffff', - 'text-halo-width': 1 - } - }, - { - id: 'place-other', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['!in', 'class', 'city', 'town', 'village', 'country', 'continent'], - layout: { - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Bold'], - 'text-letter-spacing': 0.1, - 'text-max-width': 9, - 'text-size': { - base: 1.2, - stops: [ - [12, 10], - [15, 14] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#633', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-village', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['==', 'class', 'village'], - layout: { - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-size': { - base: 1.2, - stops: [ - [10, 12], - [15, 22] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': '#333', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-town', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['==', 'class', 'town'], - layout: { - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-size': { - base: 1.2, - stops: [ - [10, 14], - [15, 24] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': '#333', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-city', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['all', ['!=', 'capital', 2], ['==', 'class', 'city']], - layout: { - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-size': { - base: 1.2, - stops: [ - [7, 14], - [11, 24] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': '#333', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-city-capital', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: ['all', ['==', 'capital', 2], ['==', 'class', 'city']], - layout: { - 'icon-image': 'star_11', - 'icon-size': 0.8, - 'text-anchor': 'left', - 'text-field': '{name:latin}\n{name:nonlatin}', - 'text-font': ['Noto Sans Regular'], - 'text-max-width': 8, - 'text-offset': [0.4, 0], - 'text-size': { - base: 1.2, - stops: [ - [7, 14], - [11, 24] - ] - }, - visibility: 'visible' - }, - paint: { - 'text-color': '#333', - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 1.2 - } - }, - { - id: 'place-country-other', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['>=', 'rank', 3], - ['!has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Italic'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [3, 11], - [7, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-country-3', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['>=', 'rank', 3], - ['has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [3, 11], - [7, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-country-2', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['==', 'rank', 2], - ['has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [2, 11], - [5, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-country-1', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - filter: [ - 'all', - ['==', 'class', 'country'], - ['==', 'rank', 1], - ['has', 'iso_a2'] - ], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': { - stops: [ - [1, 11], - [4, 17] - ] - }, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - }, - { - id: 'place-continent', - type: 'symbol', - metadata: { 'mapbox:group': '1444849242106.713' }, - source: 'openmaptiles', - 'source-layer': 'place', - maxzoom: 1, - filter: ['==', 'class', 'continent'], - layout: { - 'text-field': '{name:latin}', - 'text-font': ['Noto Sans Bold'], - 'text-max-width': 6.25, - 'text-size': 14, - 'text-transform': 'uppercase', - visibility: 'visible' - }, - paint: { - 'text-color': '#334', - 'text-halo-blur': 1, - 'text-halo-color': 'rgba(255,255,255,0.8)', - 'text-halo-width': 2 - } - } -]; - -export default layers; diff --git a/app/javascript/entrypoints/main.css b/app/javascript/entrypoints/main.css index c6e48839d..aa49669eb 100644 --- a/app/javascript/entrypoints/main.css +++ b/app/javascript/entrypoints/main.css @@ -40,3 +40,4 @@ @import '@gouvfr/dsfr/dist/component/accordion/accordion.css'; @import '@gouvfr/dsfr/dist/component/tab/tab.css'; @import '@gouvfr/dsfr/dist/component/tooltip/tooltip.css'; +@import '@gouvfr/dsfr/dist/component/range/range.css'; diff --git a/bun.lockb b/bun.lockb index 6b65bcae7..cca1141df 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index de3cf342f..80e8027e2 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,10 @@ "@gouvfr/dsfr": "^1.11.2", "@graphiql/plugin-explorer": "^3.1.0", "@graphiql/toolkit": "^0.9.1", - "@headlessui/react": "^1.6.6", "@heroicons/react": "^1.0.6", "@hotwired/stimulus": "^3.2.2", "@hotwired/turbo": "^7.3.0", - "@mapbox/mapbox-gl-draw": "^1.3.0", + "@mapbox/mapbox-gl-draw": "^1.4.3", "@popperjs/core": "^2.11.8", "@rails/actiontext": "^7.1.3-4", "@rails/activestorage": "^7.1.3-4", @@ -52,14 +51,14 @@ "graphql": "^16.9.0", "highcharts": "^10.3.3", "lightgallery": "^2.7.2", - "maplibre-gl": "^1.15.2", + "maplibre-gl": "^4.5.0", "match-sorter": "^6.3.4", "patch-package": "^8.0.0", "react": "^18.3.1", "react-aria-components": "^1.3.1", "react-coordinate-input": "^1.0.0", "react-dom": "^18.3.1", - "react-popper": "^2.3.0", + "react-fast-compare": "^3.2.2", "react-use-event-hook": "^0.9.6", "spectaql": "^3.0.1", "stimulus-use": "^0.52.2", @@ -81,7 +80,7 @@ "@types/debounce": "^1.2.4", "@types/geojson": "^7946.0.14", "@types/is-hotkey": "^0.1.10", - "@types/mapbox__mapbox-gl-draw": "^1.2.5", + "@types/mapbox__mapbox-gl-draw": "^1.4.6", "@types/rails__activestorage": "^7.1.1", "@types/rails__ujs": "^6.0.4", "@types/react": "^18.3.3", @@ -137,7 +136,10 @@ "process": true, "gon": true }, - "plugins": ["prettier", "react-hooks"], + "plugins": [ + "prettier", + "react-hooks" + ], "extends": [ "eslint:recommended", "prettier", @@ -156,16 +158,29 @@ "react/no-deprecated": "off" }, "settings": { - "react": { "version": "detect" } + "react": { + "version": "detect" + } }, "overrides": [ { - "files": [".eslintrc.js", "vite.config.ts", "postcss.config.js"], - "env": { "node": true } + "files": [ + ".eslintrc.js", + "vite.config.ts", + "postcss.config.js" + ], + "env": { + "node": true + } }, { - "files": ["**/*.ts", "**/*.tsx"], - "plugins": ["@typescript-eslint"], + "files": [ + "**/*.ts", + "**/*.tsx" + ], + "plugins": [ + "@typescript-eslint" + ], "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended",