@element-editor/adapter-maplibre 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +119 -0
- package/LICENSE +21 -0
- package/README.md +82 -2
- package/basemaps/sprite.json +1 -0
- package/basemaps/sprite.png +0 -0
- package/basemaps/sprite@2x.json +1 -0
- package/basemaps/sprite@2x.png +0 -0
- package/basemaps/thumbs/dark.webp +0 -0
- package/basemaps/thumbs/light.webp +0 -0
- package/basemaps/thumbs/osm.webp +0 -0
- package/basemaps/thumbs/streets.webp +0 -0
- package/basemaps/thumbs/terrain.webp +0 -0
- package/dist/adapter-maplibre.css +1 -0
- package/dist/basemapIds-2GdXIJS1.cjs +1 -0
- package/dist/basemapIds-CVTxeXkr.js +11 -0
- package/dist/basemaps.cjs +1 -0
- package/dist/basemaps.d.cts +2 -0
- package/dist/basemaps.d.ts +2 -0
- package/dist/basemaps.es.js +10 -0
- package/dist/catalog-Cnqi23GZ.cjs +1 -0
- package/dist/catalog-gI-xABuu.js +10 -0
- package/dist/dark-C5d5FijX.cjs +1 -0
- package/dist/dark-CcJT_yHE.js +13 -0
- package/dist/index.cjs +26 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +3792 -0
- package/dist/light-Cf5tUOoP.js +13 -0
- package/dist/light-DCtd1z4V.cjs +1 -0
- package/dist/src/BasemapControl.d.cts +47 -0
- package/dist/src/BasemapControl.d.ts +47 -0
- package/dist/src/ElementEditorControls.d.cts +113 -0
- package/dist/src/ElementEditorControls.d.ts +113 -0
- package/dist/src/basemapIds.d.cts +10 -0
- package/dist/src/basemapIds.d.ts +10 -0
- package/dist/src/basemaps/catalog.d.cts +7 -0
- package/dist/src/basemaps/catalog.d.ts +7 -0
- package/dist/src/basemaps/index.d.cts +3 -0
- package/dist/src/basemaps/index.d.ts +3 -0
- package/dist/src/basemaps/style.d.cts +61 -0
- package/dist/src/basemaps/style.d.ts +61 -0
- package/dist/src/components/BoundaryLayer.d.cts +11 -0
- package/dist/src/components/BoundaryLayer.d.ts +11 -0
- package/dist/src/components/BoxSelectHandler.d.cts +13 -0
- package/dist/src/components/BoxSelectHandler.d.ts +13 -0
- package/dist/src/components/DrawingLayer.d.cts +8 -0
- package/dist/src/components/DrawingLayer.d.ts +8 -0
- package/dist/src/components/DrawingPreviewLayer.d.cts +8 -0
- package/dist/src/components/DrawingPreviewLayer.d.ts +8 -0
- package/dist/src/components/FeatureInteractionLayer.d.cts +8 -0
- package/dist/src/components/FeatureInteractionLayer.d.ts +8 -0
- package/dist/src/components/FeatureLayer.d.cts +15 -0
- package/dist/src/components/FeatureLayer.d.ts +15 -0
- package/dist/src/components/GeometryProcessingPreview.d.cts +8 -0
- package/dist/src/components/GeometryProcessingPreview.d.ts +8 -0
- package/dist/src/components/MeasurePreviewLayer.d.cts +9 -0
- package/dist/src/components/MeasurePreviewLayer.d.ts +9 -0
- package/dist/src/components/MeasurementTooltip.d.cts +6 -0
- package/dist/src/components/MeasurementTooltip.d.ts +6 -0
- package/dist/src/components/OsmTraceHandler.d.cts +8 -0
- package/dist/src/components/OsmTraceHandler.d.ts +8 -0
- package/dist/src/components/PreciseCoordsOverlay.d.cts +10 -0
- package/dist/src/components/PreciseCoordsOverlay.d.ts +10 -0
- package/dist/src/components/SnapController.d.cts +9 -0
- package/dist/src/components/SnapController.d.ts +9 -0
- package/dist/src/components/TextEditOverlay.d.cts +9 -0
- package/dist/src/components/TextEditOverlay.d.ts +9 -0
- package/dist/src/components/TransformControls.d.cts +8 -0
- package/dist/src/components/TransformControls.d.ts +8 -0
- package/dist/src/components/VertexEditor.d.cts +15 -0
- package/dist/src/components/VertexEditor.d.ts +15 -0
- package/dist/src/contexts/FeatureStyleContext.d.cts +9 -0
- package/dist/src/contexts/FeatureStyleContext.d.ts +9 -0
- package/dist/src/contexts/MapControllerContext.d.cts +2 -0
- package/dist/src/contexts/MapControllerContext.d.ts +2 -0
- package/dist/src/contexts/StyleEpochContext.d.cts +7 -0
- package/dist/src/contexts/StyleEpochContext.d.ts +7 -0
- package/dist/src/elementLayers.d.cts +17 -0
- package/dist/src/elementLayers.d.ts +17 -0
- package/dist/src/hooks/lastPointer.d.cts +18 -0
- package/dist/src/hooks/lastPointer.d.ts +18 -0
- package/dist/src/hooks/useCursorWhileMode.d.cts +20 -0
- package/dist/src/hooks/useCursorWhileMode.d.ts +20 -0
- package/dist/src/hooks/useModifierDragCursor.d.cts +8 -0
- package/dist/src/hooks/useModifierDragCursor.d.ts +8 -0
- package/dist/src/index.d.cts +30 -0
- package/dist/src/index.d.ts +30 -0
- package/dist/src/store/StoreContext.d.cts +1 -0
- package/dist/src/store/StoreContext.d.ts +1 -0
- package/dist/src/utils/accentPaint.d.cts +13 -0
- package/dist/src/utils/accentPaint.d.ts +13 -0
- package/dist/src/utils/boxSelect.d.cts +4 -0
- package/dist/src/utils/boxSelect.d.ts +4 -0
- package/dist/src/utils/darkStyle.d.cts +8 -0
- package/dist/src/utils/darkStyle.d.ts +8 -0
- package/dist/src/utils/featureTooltip.d.cts +16 -0
- package/dist/src/utils/featureTooltip.d.ts +16 -0
- package/dist/src/utils/findPartAtPoint.d.cts +2 -0
- package/dist/src/utils/findPartAtPoint.d.ts +2 -0
- package/dist/src/utils/freehandCommitFlag.d.cts +2 -0
- package/dist/src/utils/freehandCommitFlag.d.ts +2 -0
- package/dist/src/utils/freshFeature.d.cts +3 -0
- package/dist/src/utils/freshFeature.d.ts +3 -0
- package/dist/src/utils/geojson.d.cts +10 -0
- package/dist/src/utils/geojson.d.ts +10 -0
- package/dist/src/utils/liveFeatureSource.d.cts +6 -0
- package/dist/src/utils/liveFeatureSource.d.ts +6 -0
- package/dist/src/utils/measureClickFlag.d.cts +2 -0
- package/dist/src/utils/measureClickFlag.d.ts +2 -0
- package/dist/src/utils/modifierDragFlag.d.cts +2 -0
- package/dist/src/utils/modifierDragFlag.d.ts +2 -0
- package/dist/src/utils/rafThrottle.d.cts +11 -0
- package/dist/src/utils/rafThrottle.d.ts +11 -0
- package/dist/src/utils/snapping.d.cts +25 -0
- package/dist/src/utils/snapping.d.ts +25 -0
- package/dist/src/utils/toolCursor.d.cts +3 -0
- package/dist/src/utils/toolCursor.d.ts +3 -0
- package/dist/streets-Bakdn2nG.cjs +1 -0
- package/dist/streets-D0l2l7xn.js +13 -0
- package/dist/style-873tzaoH.cjs +1 -0
- package/dist/style-mSgM9UsZ.js +75 -0
- package/dist/terrain-CUJe0pn4.cjs +1 -0
- package/dist/terrain-CZOhjFPd.js +13 -0
- package/package.json +124 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks the latest map cursor lng/lat while a caller-specified mode is active
|
|
4
|
+
* and resets on every `editingMode` transition so exiting-and-re-entering the
|
|
5
|
+
* same tool (e.g. press R → off → R from a new cursor position) doesn't leak
|
|
6
|
+
* the previous session's coordinates on the first frame.
|
|
7
|
+
*
|
|
8
|
+
* React's "set state during render" reset pattern is used intentionally — it
|
|
9
|
+
* produces a synchronous re-render with cleared state before the browser
|
|
10
|
+
* paints, so there's no stale-coord flash.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
*
|
|
14
|
+
* const mouse = useCursorWhileMode(map, editingMode, editingMode === 'draw-rect')
|
|
15
|
+
*
|
|
16
|
+
* Pass a predicate that's true whenever cursor updates should flow into state.
|
|
17
|
+
* On mouseout (cursor leaves the map canvas) the value resets to null, so
|
|
18
|
+
* tooltips / previews that depend on it disappear.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useCursorWhileMode(map: MapLibreMap, editingMode: string, isActive: boolean): [number, number] | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function useModifierDragCursor(readonly: boolean): {
|
|
2
|
+
enter: (el: Element | HTMLElement | null | undefined, originalEvent?: {
|
|
3
|
+
ctrlKey?: boolean;
|
|
4
|
+
metaKey?: boolean;
|
|
5
|
+
altKey?: boolean;
|
|
6
|
+
}, base?: string) => void;
|
|
7
|
+
leave: (next?: string) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function useModifierDragCursor(readonly: boolean): {
|
|
2
|
+
enter: (el: Element | HTMLElement | null | undefined, originalEvent?: {
|
|
3
|
+
ctrlKey?: boolean;
|
|
4
|
+
metaKey?: boolean;
|
|
5
|
+
altKey?: boolean;
|
|
6
|
+
}, base?: string) => void;
|
|
7
|
+
leave: (next?: string) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { GeoStoreProvider, StoreContext } from './store/StoreContext.cjs';
|
|
2
|
+
export { useDataStore, useUIStore, useGeoStore } from './store/StoreContext.cjs';
|
|
3
|
+
export { MapControllerProvider, useMapController, useSetMapController } from './contexts/MapControllerContext.cjs';
|
|
4
|
+
export type { MapController } from './contexts/MapControllerContext.cjs';
|
|
5
|
+
export { ElementEditorControls, useMapLibre } from './ElementEditorControls.cjs';
|
|
6
|
+
export type { ElementEditorControlsProps, ElementEditorControlsRef, DrawingTool } from './ElementEditorControls.cjs';
|
|
7
|
+
export { BasemapControl, useBasemap } from './BasemapControl.cjs';
|
|
8
|
+
export type { BasemapControlProps } from './BasemapControl.cjs';
|
|
9
|
+
export { ElementEditorUIProvider } from '@element-editor/ui';
|
|
10
|
+
export { ElementEditorError } from '@element-editor/core';
|
|
11
|
+
export type { ElementEditorEvent, ElementEditorErrorHandler, ErrorCode, ErrorSource } from '@element-editor/ui';
|
|
12
|
+
export type { ElementEditorUIProviderProps } from '@element-editor/ui';
|
|
13
|
+
export type { ElementEditorConfig, ResolvedConfig, ToolbarPosition } from '@element-editor/ui';
|
|
14
|
+
export { FeatureStyleProvider, useFeatureStyle } from './contexts/FeatureStyleContext.cjs';
|
|
15
|
+
export type { FeatureStyle, FeatureStyleFn } from './contexts/FeatureStyleContext.cjs';
|
|
16
|
+
export { FloatingToolbar, EditingToolbar, ActiveDrawingToolbar, useKeyboardShortcuts } from '@element-editor/ui';
|
|
17
|
+
export { default as FeatureLayer } from './components/FeatureLayer.cjs';
|
|
18
|
+
export { default as DrawingLayer } from './components/DrawingLayer.cjs';
|
|
19
|
+
export { default as DrawingPreviewLayer } from './components/DrawingPreviewLayer.cjs';
|
|
20
|
+
export { default as FeatureInteractionLayer } from './components/FeatureInteractionLayer.cjs';
|
|
21
|
+
export { default as VertexEditor } from './components/VertexEditor.cjs';
|
|
22
|
+
export { default as TransformControls } from './components/TransformControls.cjs';
|
|
23
|
+
export { default as SnapController } from './components/SnapController.cjs';
|
|
24
|
+
export { default as BoundaryLayer, FitBounds } from './components/BoundaryLayer.cjs';
|
|
25
|
+
export { default as GeometryProcessingPreview } from './components/GeometryProcessingPreview.cjs';
|
|
26
|
+
export { default as MeasurePreviewLayer } from './components/MeasurePreviewLayer.cjs';
|
|
27
|
+
export { default as MeasurementTooltip } from './components/MeasurementTooltip.cjs';
|
|
28
|
+
export { default as OsmTraceHandler } from './components/OsmTraceHandler.cjs';
|
|
29
|
+
export { default as BoxSelectHandler } from './components/BoxSelectHandler.cjs';
|
|
30
|
+
export { findSnapPoint, snapToAngle } from './utils/snapping.cjs';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { GeoStoreProvider, StoreContext } from './store/StoreContext.js';
|
|
2
|
+
export { useDataStore, useUIStore, useGeoStore } from './store/StoreContext.js';
|
|
3
|
+
export { MapControllerProvider, useMapController, useSetMapController } from './contexts/MapControllerContext.js';
|
|
4
|
+
export type { MapController } from './contexts/MapControllerContext.js';
|
|
5
|
+
export { ElementEditorControls, useMapLibre } from './ElementEditorControls.js';
|
|
6
|
+
export type { ElementEditorControlsProps, ElementEditorControlsRef, DrawingTool } from './ElementEditorControls.js';
|
|
7
|
+
export { BasemapControl, useBasemap } from './BasemapControl.js';
|
|
8
|
+
export type { BasemapControlProps } from './BasemapControl.js';
|
|
9
|
+
export { ElementEditorUIProvider } from '@element-editor/ui';
|
|
10
|
+
export { ElementEditorError } from '@element-editor/core';
|
|
11
|
+
export type { ElementEditorEvent, ElementEditorErrorHandler, ErrorCode, ErrorSource } from '@element-editor/ui';
|
|
12
|
+
export type { ElementEditorUIProviderProps } from '@element-editor/ui';
|
|
13
|
+
export type { ElementEditorConfig, ResolvedConfig, ToolbarPosition } from '@element-editor/ui';
|
|
14
|
+
export { FeatureStyleProvider, useFeatureStyle } from './contexts/FeatureStyleContext.js';
|
|
15
|
+
export type { FeatureStyle, FeatureStyleFn } from './contexts/FeatureStyleContext.js';
|
|
16
|
+
export { FloatingToolbar, EditingToolbar, ActiveDrawingToolbar, useKeyboardShortcuts } from '@element-editor/ui';
|
|
17
|
+
export { default as FeatureLayer } from './components/FeatureLayer.js';
|
|
18
|
+
export { default as DrawingLayer } from './components/DrawingLayer.js';
|
|
19
|
+
export { default as DrawingPreviewLayer } from './components/DrawingPreviewLayer.js';
|
|
20
|
+
export { default as FeatureInteractionLayer } from './components/FeatureInteractionLayer.js';
|
|
21
|
+
export { default as VertexEditor } from './components/VertexEditor.js';
|
|
22
|
+
export { default as TransformControls } from './components/TransformControls.js';
|
|
23
|
+
export { default as SnapController } from './components/SnapController.js';
|
|
24
|
+
export { default as BoundaryLayer, FitBounds } from './components/BoundaryLayer.js';
|
|
25
|
+
export { default as GeometryProcessingPreview } from './components/GeometryProcessingPreview.js';
|
|
26
|
+
export { default as MeasurePreviewLayer } from './components/MeasurePreviewLayer.js';
|
|
27
|
+
export { default as MeasurementTooltip } from './components/MeasurementTooltip.js';
|
|
28
|
+
export { default as OsmTraceHandler } from './components/OsmTraceHandler.js';
|
|
29
|
+
export { default as BoxSelectHandler } from './components/BoxSelectHandler.js';
|
|
30
|
+
export { findSnapPoint, snapToAngle } from './utils/snapping.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GeoStoreProvider, StoreContext, useDataStore, useUIStore, useGeoStore } from '@element-editor/ui';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GeoStoreProvider, StoreContext, useDataStore, useUIStore, useGeoStore } from '@element-editor/ui';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { AccentPalette } from '@element-editor/core';
|
|
3
|
+
/**
|
|
4
|
+
* Accent-coloured paint properties: `[layer id, paint property, value]`.
|
|
5
|
+
* MapLibre paint needs concrete colours, so these are set from JS — once by
|
|
6
|
+
* the layer's `init*` (via `paintAccent`) and again whenever the editor
|
|
7
|
+
* accent changes (via `useAccentPaint`). Keep accent colours OUT of the
|
|
8
|
+
* `addLayer` paint literals; this table is their single source.
|
|
9
|
+
*/
|
|
10
|
+
export type AccentPaint = ReadonlyArray<readonly [layerId: string, prop: string, value: (p: AccentPalette) => unknown]>;
|
|
11
|
+
export declare function paintAccent(map: MapLibreMap, paints: AccentPaint, palette?: AccentPalette): void;
|
|
12
|
+
/** Re-apply `paints` when the accent changes; returns the live palette. */
|
|
13
|
+
export declare function useAccentPaint(map: MapLibreMap, paints: AccentPaint): AccentPalette;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { AccentPalette } from '@element-editor/core';
|
|
3
|
+
/**
|
|
4
|
+
* Accent-coloured paint properties: `[layer id, paint property, value]`.
|
|
5
|
+
* MapLibre paint needs concrete colours, so these are set from JS — once by
|
|
6
|
+
* the layer's `init*` (via `paintAccent`) and again whenever the editor
|
|
7
|
+
* accent changes (via `useAccentPaint`). Keep accent colours OUT of the
|
|
8
|
+
* `addLayer` paint literals; this table is their single source.
|
|
9
|
+
*/
|
|
10
|
+
export type AccentPaint = ReadonlyArray<readonly [layerId: string, prop: string, value: (p: AccentPalette) => unknown]>;
|
|
11
|
+
export declare function paintAccent(map: MapLibreMap, paints: AccentPaint, palette?: AccentPalette): void;
|
|
12
|
+
/** Re-apply `paints` when the accent changes; returns the live palette. */
|
|
13
|
+
export declare function useAccentPaint(map: MapLibreMap, paints: AccentPaint): AccentPalette;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** True when bbox [w, s, e, n] lies fully inside the lng/lat box (edges inclusive). */
|
|
2
|
+
export declare function bboxInside([w, s, e, n]: readonly number[], lngMin: number, latMin: number, lngMax: number, latMax: number): boolean;
|
|
3
|
+
/** Order-insensitive equality of two id lists (assumes neither has duplicates). */
|
|
4
|
+
export declare function sameIdSet(a: readonly string[], b: readonly string[]): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** True when bbox [w, s, e, n] lies fully inside the lng/lat box (edges inclusive). */
|
|
2
|
+
export declare function bboxInside([w, s, e, n]: readonly number[], lngMin: number, latMin: number, lngMax: number, latMax: number): boolean;
|
|
3
|
+
/** Order-insensitive equality of two id lists (assumes neither has duplicates). */
|
|
4
|
+
export declare function sameIdSet(a: readonly string[], b: readonly string[]): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
/** Relative luminance (0…1) of a `#rgb` / `#rrggbb` / `rgb()` / `rgba()` colour, or null if unparsable. */
|
|
3
|
+
export declare function colorLuminance(color: string): number | null;
|
|
4
|
+
/**
|
|
5
|
+
* Whether the map's style draws a dark base: its background layer's colour
|
|
6
|
+
* (a plain colour; a zoom expression or a raster basemap counts as light).
|
|
7
|
+
*/
|
|
8
|
+
export declare function isDarkMapStyle(map: MapLibreMap): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
/** Relative luminance (0…1) of a `#rgb` / `#rrggbb` / `rgb()` / `rgba()` colour, or null if unparsable. */
|
|
3
|
+
export declare function colorLuminance(color: string): number | null;
|
|
4
|
+
/**
|
|
5
|
+
* Whether the map's style draws a dark base: its background layer's colour
|
|
6
|
+
* (a plain colour; a zoom expression or a raster basemap counts as light).
|
|
7
|
+
*/
|
|
8
|
+
export declare function isDarkMapStyle(map: MapLibreMap): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GeoJSONFeature } from '@element-editor/core';
|
|
2
|
+
type UIStoreLike = {
|
|
3
|
+
getState: () => {
|
|
4
|
+
showFeatureNameOnHover: boolean;
|
|
5
|
+
vertexEditActive: boolean;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare function bindFeatureTooltip(feature: GeoJSONFeature, uiStore: UIStoreLike, originalEvent?: MouseEvent): void;
|
|
9
|
+
/** Remove the element and every listener; the next bind recreates them. */
|
|
10
|
+
export declare function unbindFeatureTooltip(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Call with `true` when a feature drag begins, `false` when it ends. While
|
|
13
|
+
* active, `bindFeatureTooltip` is a no-op and any visible tooltip is hidden.
|
|
14
|
+
*/
|
|
15
|
+
export declare function setFeatureDragActive(active: boolean): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GeoJSONFeature } from '@element-editor/core';
|
|
2
|
+
type UIStoreLike = {
|
|
3
|
+
getState: () => {
|
|
4
|
+
showFeatureNameOnHover: boolean;
|
|
5
|
+
vertexEditActive: boolean;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare function bindFeatureTooltip(feature: GeoJSONFeature, uiStore: UIStoreLike, originalEvent?: MouseEvent): void;
|
|
9
|
+
/** Remove the element and every listener; the next bind recreates them. */
|
|
10
|
+
export declare function unbindFeatureTooltip(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Call with `true` when a feature drag begins, `false` when it ends. While
|
|
13
|
+
* active, `bindFeatureTooltip` is a no-op and any visible tooltip is hidden.
|
|
14
|
+
*/
|
|
15
|
+
export declare function setFeatureDragActive(active: boolean): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Empty GeoJSON FeatureCollection for initializing MapLibre sources. */
|
|
2
|
+
export declare function emptyFC(): GeoJSON.FeatureCollection;
|
|
3
|
+
/**
|
|
4
|
+
* MapLibre uses [lng, lat] natively — same as GeoJSON.
|
|
5
|
+
* No coordinate swapping needed. These helpers are provided for API symmetry.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toMapLibre(coord: [number, number]): [number, number];
|
|
8
|
+
export declare function toGeoJSON(coord: [number, number]): [number, number];
|
|
9
|
+
/** Convert [lng, lat, lng, lat] bbox to MapLibre LngLatBoundsLike */
|
|
10
|
+
export declare function bboxToMapLibre(bbox: [number, number, number, number]): [[number, number], [number, number]];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Empty GeoJSON FeatureCollection for initializing MapLibre sources. */
|
|
2
|
+
export declare function emptyFC(): GeoJSON.FeatureCollection;
|
|
3
|
+
/**
|
|
4
|
+
* MapLibre uses [lng, lat] natively — same as GeoJSON.
|
|
5
|
+
* No coordinate swapping needed. These helpers are provided for API symmetry.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toMapLibre(coord: [number, number]): [number, number];
|
|
8
|
+
export declare function toGeoJSON(coord: [number, number]): [number, number];
|
|
9
|
+
/** Convert [lng, lat, lng, lat] bbox to MapLibre LngLatBoundsLike */
|
|
10
|
+
export declare function bboxToMapLibre(bbox: [number, number, number, number]): [[number, number], [number, number]];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { Geometry } from '@element-editor/core';
|
|
3
|
+
/** Called by FeatureLayer after every `setData` on `elm-features`. */
|
|
4
|
+
export declare function setRenderedFeatures(map: MapLibreMap, features: GeoJSON.Feature[], uniqueIds: boolean): void;
|
|
5
|
+
/** Paint live geometries (feature id → full geometry) into `elm-features`. */
|
|
6
|
+
export declare function paintLiveGeometries(map: MapLibreMap, live: ReadonlyMap<string, Geometry>): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { Geometry } from '@element-editor/core';
|
|
3
|
+
/** Called by FeatureLayer after every `setData` on `elm-features`. */
|
|
4
|
+
export declare function setRenderedFeatures(map: MapLibreMap, features: GeoJSON.Feature[], uniqueIds: boolean): void;
|
|
5
|
+
/** Paint live geometries (feature id → full geometry) into `elm-features`. */
|
|
6
|
+
export declare function paintLiveGeometries(map: MapLibreMap, live: ReadonlyMap<string, Geometry>): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coalesces high-frequency calls (mousemove, marker drag) into one call per
|
|
3
|
+
* animation frame, always with the latest arguments. `flush()` runs a pending
|
|
4
|
+
* call synchronously (call it before committing on mouseup so the commit sees
|
|
5
|
+
* the final cursor position); `cancel()` drops it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function rafThrottle<A extends unknown[]>(fn: (...args: A) => void): {
|
|
8
|
+
schedule(...args: A): void;
|
|
9
|
+
flush(): void;
|
|
10
|
+
cancel(): void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coalesces high-frequency calls (mousemove, marker drag) into one call per
|
|
3
|
+
* animation frame, always with the latest arguments. `flush()` runs a pending
|
|
4
|
+
* call synchronously (call it before committing on mouseup so the commit sees
|
|
5
|
+
* the final cursor position); `cancel()` drops it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function rafThrottle<A extends unknown[]>(fn: (...args: A) => void): {
|
|
8
|
+
schedule(...args: A): void;
|
|
9
|
+
flush(): void;
|
|
10
|
+
cancel(): void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { GeoJSONFeature } from '@element-editor/core';
|
|
3
|
+
export interface SnapResult {
|
|
4
|
+
lnglat: [number, number];
|
|
5
|
+
isVertex: boolean;
|
|
6
|
+
/** Feature whose vertex/edge was snapped to. Absent for edge-only snaps when the feature can't be attributed. */
|
|
7
|
+
featureId?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Finds the closest snap point (vertex or edge) among all provided features.
|
|
11
|
+
* MapLibre version: uses map.project([lng, lat]) for pixel conversion.
|
|
12
|
+
*
|
|
13
|
+
* Hot path (runs per mousemove frame): candidates are pre-rejected in lng/lat
|
|
14
|
+
* against a box derived from the pixel threshold, so only vertices / segments
|
|
15
|
+
* that could possibly be within `threshold` px get projected. Results are
|
|
16
|
+
* identical to projecting everything.
|
|
17
|
+
*/
|
|
18
|
+
export declare function findSnapPoint(lng: number, lat: number, map: MapLibreMap, features: GeoJSONFeature[], threshold?: number, excludeFeatureIds?: Set<string>): SnapResult | null;
|
|
19
|
+
/**
|
|
20
|
+
* Snaps a cursor coordinate to 15-degree increments relative to the last point.
|
|
21
|
+
* MapLibre version: map.project([lng, lat]) / map.unproject([x, y]).
|
|
22
|
+
*/
|
|
23
|
+
export declare function snapToAngle(map: MapLibreMap, lastCoord: [number, number], // [lng, lat]
|
|
24
|
+
cursorCoord: [number, number], // [lng, lat]
|
|
25
|
+
incrementDeg?: number): [number, number];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { GeoJSONFeature } from '@element-editor/core';
|
|
3
|
+
export interface SnapResult {
|
|
4
|
+
lnglat: [number, number];
|
|
5
|
+
isVertex: boolean;
|
|
6
|
+
/** Feature whose vertex/edge was snapped to. Absent for edge-only snaps when the feature can't be attributed. */
|
|
7
|
+
featureId?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Finds the closest snap point (vertex or edge) among all provided features.
|
|
11
|
+
* MapLibre version: uses map.project([lng, lat]) for pixel conversion.
|
|
12
|
+
*
|
|
13
|
+
* Hot path (runs per mousemove frame): candidates are pre-rejected in lng/lat
|
|
14
|
+
* against a box derived from the pixel threshold, so only vertices / segments
|
|
15
|
+
* that could possibly be within `threshold` px get projected. Results are
|
|
16
|
+
* identical to projecting everything.
|
|
17
|
+
*/
|
|
18
|
+
export declare function findSnapPoint(lng: number, lat: number, map: MapLibreMap, features: GeoJSONFeature[], threshold?: number, excludeFeatureIds?: Set<string>): SnapResult | null;
|
|
19
|
+
/**
|
|
20
|
+
* Snaps a cursor coordinate to 15-degree increments relative to the last point.
|
|
21
|
+
* MapLibre version: map.project([lng, lat]) / map.unproject([x, y]).
|
|
22
|
+
*/
|
|
23
|
+
export declare function snapToAngle(map: MapLibreMap, lastCoord: [number, number], // [lng, lat]
|
|
24
|
+
cursorCoord: [number, number], // [lng, lat]
|
|
25
|
+
incrementDeg?: number): [number, number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=8,t="Lab Streets",l={openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"},"terrain-dem":{type:"raster-dem",tiles:["https://tiles.mapterhorn.com/{z}/{x}/{y}.webp"],tileSize:512,maxzoom:12,encoding:"terrarium",attribution:'<a href="https://mapterhorn.com/attribution" target="_blank">© Mapterhorn</a>'}},i=JSON.parse('[{"id":"background","type":"background","paint":{"background-color":"#F2EDE7"}},{"id":"landcover-wood","type":"fill","source":"openmaptiles","source-layer":"landcover","filter":["==",["get","class"],"wood"],"paint":{"fill-antialias":false,"fill-color":"#CBEAA6","fill-opacity":["interpolate",["linear"],["zoom"],7,0.5,12,0.4,16,0.5]}},{"id":"landcover-grass","type":"fill","source":"openmaptiles","source-layer":"landcover","minzoom":9,"filter":["all",["==",["get","class"],"grass"],["!",["match",["get","subclass"],["park","garden","village_green","recreation_ground","golf_course","allotments"],true,false]]],"paint":{"fill-antialias":false,"fill-color":["match",["get","subclass"],"scrub","#E2E7BD","#E8EBC6"],"fill-opacity":["interpolate",["linear"],["zoom"],9,0,12,0.3]}},{"id":"landcover-sand","type":"fill","source":"openmaptiles","source-layer":"landcover","filter":["==",["get","class"],"sand"],"paint":{"fill-color":"#F5EACE"}},{"id":"landuse","type":"fill","source":"openmaptiles","source-layer":"landuse","minzoom":10,"filter":["match",["get","class"],["cemetery","hospital","school","university","college","kindergarten","industrial","railway"],true,false],"paint":{"fill-color":["match",["get","class"],"cemetery","#E1E8CC","hospital","#FFD6D6",["school","university","college","kindergarten"],"#D6EAFF","#EBEBEB"],"fill-opacity":["interpolate",["linear"],["zoom"],10,0,11,1]}},{"id":"park-national","type":"fill","source":"openmaptiles","source-layer":"park","filter":["==",["get","class"],"national_park"],"paint":{"fill-color":"#D3E193","fill-opacity":["interpolate",["linear"],["zoom"],8,1,12,0.6]}},{"id":"landuse-park","type":"fill","source":"openmaptiles","source-layer":"landcover","filter":["all",["==",["get","class"],"grass"],["match",["get","subclass"],["park","garden","village_green","recreation_ground","golf_course","allotments"],true,false]],"paint":{"fill-color":"#CBEAA6"}},{"id":"landuse-pitch","type":"fill","source":"openmaptiles","source-layer":"landuse","filter":["match",["get","class"],["pitch","stadium"],true,false],"paint":{"fill-color":"#C7EB9B"}},{"id":"landuse-pitch-outline","type":"line","source":"openmaptiles","source-layer":"landuse","minzoom":13,"filter":["==",["get","class"],"pitch"],"paint":{"line-color":"#FFFFDD","line-opacity":["interpolate",["linear"],["zoom"],13,0.5,14,1],"line-width":["interpolate",["linear"],["zoom"],13,0.2,15,1]}},{"id":"hillshade","type":"hillshade","minzoom":5,"maxzoom":16,"paint":{"hillshade-shadow-color":"rgba(90,83,32,0.42)","hillshade-highlight-color":"rgba(255,255,255,0.45)","hillshade-accent-color":"rgba(0,0,0,0)","hillshade-illumination-anchor":"viewport","hillshade-exaggeration":["interpolate",["linear"],["zoom"],5,0.3,8,0.45,11,0.35,13,0.2,15,0.1,16,0]},"source":"terrain-dem"},{"id":"waterway-stream","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":12,"filter":["all",["!",["match",["get","class"],["river","canal"],true,false]],["!=",["get","brunnel"],"tunnel"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#80D8FF","line-width":["interpolate",["exponential",1.3],["zoom"],12,0.3,14,0.6,20,3]}},{"id":"waterway-river","type":"line","source":"openmaptiles","source-layer":"waterway","filter":["all",["match",["get","class"],["river","canal"],true,false],["!=",["get","brunnel"],"tunnel"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#80D8FF","line-width":["interpolate",["exponential",1.3],["zoom"],8,0.5,12,1.2,20,8]}},{"id":"water-shadow","type":"fill","source":"openmaptiles","source-layer":"water","filter":["!=",["get","brunnel"],"tunnel"],"paint":{"fill-color":"#57CCFF","fill-translate-anchor":"viewport","fill-translate":["interpolate",["exponential",1.5],["zoom"],7,["literal",[0,0]],9,["literal",[-0.2,-0.2]],16,["literal",[-1.5,-1.5]]]}},{"id":"water","type":"fill","source":"openmaptiles","source-layer":"water","filter":["!=",["get","brunnel"],"tunnel"],"paint":{"fill-color":"#80D8FF"}},{"id":"structure","type":"fill","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["match",["get","class"],["bridge","pier"],true,false]],"paint":{"fill-color":"#F2EDE7","fill-opacity":["interpolate",["linear"],["zoom"],14,0,15,1]}},{"id":"aeroway-area","type":"fill","source":"openmaptiles","source-layer":"aeroway","minzoom":11,"filter":["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],"paint":{"fill-color":"#E3E3E3","fill-opacity":["interpolate",["linear"],["zoom"],11,0,12,1]}},{"id":"aeroway-line","type":"line","source":"openmaptiles","source-layer":"aeroway","minzoom":9,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["match",["get","class"],["runway","taxiway"],true,false]],"paint":{"line-color":"#CCD2DE","line-width":["interpolate",["exponential",1.5],["zoom"],9,["match",["get","class"],"runway",1,0.5],18,["match",["get","class"],"runway",80,20]]}},{"id":"tunnel-pedestrian-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["any",["==",["get","class"],"pedestrian"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#D6D2CE","line-opacity":["interpolate",["linear"],["zoom"],14,0,17,0.7],"line-width":["interpolate",["exponential",1.5],["zoom"],14,2,18,14]}},{"id":"tunnel-path","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["path","track"],true,false],["!=",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#808080","line-dasharray":["step",["zoom"],["literal",[2,1]],15,["literal",[2.33,1.2]],16,["literal",[2.66,1.4]],17,["literal",[3,1.6]],18,["literal",[3.33,1.8]]],"line-opacity":["interpolate",["linear"],["zoom"],14,0,15,0.4],"line-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,22,4]}},{"id":"tunnel-pedestrian","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["any",["==",["get","class"],"pedestrian"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],14,1,18,12],"line-opacity":0.7,"line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.5,0.4]],16,["literal",[1,0.2]]]}},{"id":"tunnel-service-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["==",["get","class"],"service"]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],13,0.3,14,0.5,18,12],"line-width":["interpolate",["exponential",1.2],["zoom"],14,0,20,2],"line-dasharray":[3,3]}},{"id":"tunnel-street-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["match",["get","class"],["minor","busway"],true,false]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18],"line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,2],"line-opacity":["interpolate",["linear"],["zoom"],12,0,14,1],"line-dasharray":[3,3]}},{"id":"tunnel-secondary-tertiary-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":9,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["match",["get","class"],["secondary","tertiary"],true,false]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26],"line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,2],"line-opacity":["interpolate",["linear"],["zoom"],9,0,11,1],"line-dasharray":[3,3]}},{"id":"tunnel-primary-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":7,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["==",["get","class"],"primary"]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],7,0.25,11,1],"line-dasharray":[3,3]}},{"id":"tunnel-trunk-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["==",["get","class"],"trunk"]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#E5BA00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],10,0,11,1],"line-dasharray":[3,3]}},{"id":"tunnel-motorway-link-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"motorway"],["==",["get","ramp"],1]]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#FF4E00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],10,0.3,12,0.5,14,2,18,18],"line-width":["interpolate",["exponential",1.5],["zoom"],11,0,12,0.75,20,2],"line-dasharray":[3,3]}},{"id":"tunnel-motorway-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"motorway"],["!=",["get","ramp"],1]]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#FF4E00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],10,0,11,1],"line-dasharray":[3,3]}},{"id":"tunnel-service","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["==",["get","class"],"service"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],13,0.3,14,0.5,18,12],"line-opacity":0.7}},{"id":"tunnel-street","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["match",["get","class"],["minor","busway"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18],"line-opacity":0.7}},{"id":"tunnel-secondary-tertiary","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":9,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["match",["get","class"],["secondary","tertiary"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26],"line-opacity":0.7}},{"id":"tunnel-primary","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":7,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["==",["get","class"],"primary"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32],"line-opacity":0.7}},{"id":"tunnel-trunk","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["==",["get","class"],"trunk"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":["interpolate",["linear"],["zoom"],5,"#FFC973",12,"#FFE780"],"line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"line-opacity":0.7}},{"id":"tunnel-motorway-link","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"motorway"],["==",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFC1A6","line-width":["interpolate",["exponential",1.5],["zoom"],10,0.3,12,0.5,14,2,18,18]}},{"id":"tunnel-motorway","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"motorway"],["!=",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFC1A6","line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32]}},{"id":"tunnel-rail","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"rail"]],"layout":{"line-join":"round"},"paint":{"line-color":"#C0BCB5","line-width":["interpolate",["linear"],["zoom"],12,0.4,14,0.75,16,1],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],17,0,20,3],"line-opacity":0.2}},{"id":"tunnel-rail-tracks","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":16,"filter":["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"rail"]],"layout":{"line-join":"round"},"paint":{"line-color":"#C0BCB5","line-dasharray":[0.1,2],"line-width":["interpolate",["exponential",1.5],["zoom"],16,0,20,8],"line-opacity":0.2}},{"id":"road-pedestrian-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["any",["==",["get","class"],"pedestrian"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#D6D2CE","line-opacity":["interpolate",["linear"],["zoom"],14,0,17,1],"line-width":["interpolate",["exponential",1.5],["zoom"],14,2,18,14]}},{"id":"road-path","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["all",["match",["get","class"],["path","track"],true,false],["!=",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#808080","line-dasharray":["step",["zoom"],["literal",[2,1]],15,["literal",[2.33,1.2]],16,["literal",[2.66,1.4]],17,["literal",[3,1.6]],18,["literal",[3.33,1.8]]],"line-opacity":["interpolate",["linear"],["zoom"],14,0,15,0.4],"line-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,22,4]}},{"id":"road-pedestrian","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["any",["==",["get","class"],"pedestrian"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],14,1,18,12],"line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.5,0.4]],16,["literal",[1,0.2]]]}},{"id":"road-service-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"service"]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],13,0.3,14,0.5,18,12],"line-width":["interpolate",["exponential",1.2],["zoom"],14,0,20,2]}},{"id":"road-street-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["match",["get","class"],["minor","busway"],true,false]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18],"line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,2],"line-opacity":["interpolate",["linear"],["zoom"],12,0,14,1]}},{"id":"road-secondary-tertiary-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":9,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["match",["get","class"],["secondary","tertiary"],true,false]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26],"line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,2],"line-opacity":["interpolate",["linear"],["zoom"],9,0,11,1]}},{"id":"road-primary-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":7,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"primary"]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],7,0.25,11,1]}},{"id":"road-trunk-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"trunk"]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#E5BA00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],10,0,11,1]}},{"id":"road-motorway-link-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["all",["==",["get","class"],"motorway"],["==",["get","ramp"],1]]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#FF4E00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],10,0.3,12,0.5,14,2,18,18],"line-width":["interpolate",["exponential",1.5],["zoom"],11,0,12,0.75,20,2]}},{"id":"road-motorway-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["all",["==",["get","class"],"motorway"],["!=",["get","ramp"],1]]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#FF4E00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],10,0,11,1]}},{"id":"road-service","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"service"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],13,0.3,14,0.5,18,12]}},{"id":"road-street","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["match",["get","class"],["minor","busway"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18]}},{"id":"road-secondary-tertiary","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":9,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["match",["get","class"],["secondary","tertiary"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26]}},{"id":"road-primary","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":7,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"primary"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32]}},{"id":"road-trunk","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"trunk"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":["interpolate",["linear"],["zoom"],5,"#FFC973",12,"#FFE780"],"line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32]}},{"id":"road-motorway-link","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["all",["==",["get","class"],"motorway"],["==",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFA780","line-width":["interpolate",["exponential",1.5],["zoom"],10,0.3,12,0.5,14,2,18,18]}},{"id":"road-motorway","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["all",["==",["get","class"],"motorway"],["!=",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":["interpolate",["linear"],["zoom"],5,"#FFA780",12,"#FFA780"],"line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32]}},{"id":"road-rail","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"rail"]],"layout":{"line-join":"round"},"paint":{"line-color":"#C0BCB5","line-width":["interpolate",["linear"],["zoom"],12,0.4,14,0.75,16,1],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],17,0,20,3]}},{"id":"road-rail-tracks","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":16,"filter":["all",["!",["match",["get","brunnel"],["bridge","tunnel"],true,false]],["==",["get","class"],"rail"]],"layout":{"line-join":"round"},"paint":{"line-color":"#C0BCB5","line-dasharray":[0.1,2],"line-width":["interpolate",["exponential",1.5],["zoom"],16,0,20,8]}},{"id":"road-pedestrian-area","type":"fill","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["any",["==",["get","class"],"pedestrian"],["match",["get","subclass"],["pedestrian","footway"],true,false]]],"paint":{"fill-color":"#FFFFFF","fill-opacity":0.8}},{"id":"road-pedestrian-area-outline","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":16,"filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["any",["==",["get","class"],"pedestrian"],["match",["get","subclass"],["pedestrian","footway"],true,false]]],"paint":{"line-color":"#D6D2CE","line-opacity":["interpolate",["linear"],["zoom"],16,0.2,17,1],"line-width":["interpolate",["linear"],["zoom"],16,0.2,20,1]}},{"id":"bridge-pedestrian-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["any",["==",["get","class"],"pedestrian"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#D6D2CE","line-opacity":["interpolate",["linear"],["zoom"],14,0,17,1],"line-width":["interpolate",["exponential",1.5],["zoom"],14,2,18,14]}},{"id":"bridge-path","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["all",["match",["get","class"],["path","track"],true,false],["!=",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#808080","line-dasharray":["step",["zoom"],["literal",[2,1]],15,["literal",[2.33,1.2]],16,["literal",[2.66,1.4]],17,["literal",[3,1.6]],18,["literal",[3.33,1.8]]],"line-opacity":["interpolate",["linear"],["zoom"],14,0,15,0.4],"line-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,22,4]}},{"id":"bridge-pedestrian","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["any",["==",["get","class"],"pedestrian"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],14,1,18,12],"line-dasharray":["step",["zoom"],["literal",[1,0]],15,["literal",[1.5,0.4]],16,["literal",[1,0.2]]]}},{"id":"bridge-service-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["==",["get","class"],"service"]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],13,0.3,14,0.5,18,12],"line-width":["interpolate",["exponential",1.2],["zoom"],14,0,20,2]}},{"id":"bridge-street-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["match",["get","class"],["minor","busway"],true,false]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18],"line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,2],"line-opacity":["interpolate",["linear"],["zoom"],12,0,14,1]}},{"id":"bridge-secondary-tertiary-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":9,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["match",["get","class"],["secondary","tertiary"],true,false]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26],"line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,2],"line-opacity":["interpolate",["linear"],["zoom"],9,0,11,1]}},{"id":"bridge-primary-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":7,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["==",["get","class"],"primary"]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#D6D2CE","line-gap-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],7,0.25,11,1]}},{"id":"bridge-trunk-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["==",["get","class"],"trunk"]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#E5BA00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],10,0,11,1]}},{"id":"bridge-motorway-link-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["all",["==",["get","class"],"motorway"],["==",["get","ramp"],1]]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#FF4E00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],10,0.3,12,0.5,14,2,18,18],"line-width":["interpolate",["exponential",1.5],["zoom"],11,0,12,0.75,20,2]}},{"id":"bridge-motorway-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["all",["==",["get","class"],"motorway"],["!=",["get","ramp"],1]]],"layout":{"line-cap":"butt","line-join":"miter"},"paint":{"line-color":"#FF4E00","line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-opacity":["interpolate",["linear"],["zoom"],10,0,11,1]}},{"id":"bridge-service","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["==",["get","class"],"service"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],13,0.3,14,0.5,18,12]}},{"id":"bridge-street","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["match",["get","class"],["minor","busway"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18]}},{"id":"bridge-secondary-tertiary","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":9,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["match",["get","class"],["secondary","tertiary"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26]}},{"id":"bridge-primary","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":7,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["==",["get","class"],"primary"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFFFFF","line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32]}},{"id":"bridge-trunk","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["==",["get","class"],"trunk"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":["interpolate",["linear"],["zoom"],5,"#FFC973",12,"#FFE780"],"line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32]}},{"id":"bridge-motorway-link","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["all",["==",["get","class"],"motorway"],["==",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#FFA780","line-width":["interpolate",["exponential",1.5],["zoom"],10,0.3,12,0.5,14,2,18,18]}},{"id":"bridge-motorway","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"bridge"],["all",["==",["get","class"],"motorway"],["!=",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":["interpolate",["linear"],["zoom"],5,"#FFA780",12,"#FFA780"],"line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32]}},{"id":"bridge-rail","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"rail"]],"layout":{"line-join":"round"},"paint":{"line-color":"#C0BCB5","line-width":["interpolate",["linear"],["zoom"],12,0.4,14,0.75,16,1],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],17,0,20,3]}},{"id":"bridge-rail-tracks","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":16,"filter":["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"rail"]],"layout":{"line-join":"round"},"paint":{"line-color":"#C0BCB5","line-dasharray":[0.1,2],"line-width":["interpolate",["exponential",1.5],["zoom"],16,0,20,8]}},{"id":"boundary-state","type":"line","source":"openmaptiles","source-layer":"boundary","minzoom":3,"filter":["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],4],["!=",["get","maritime"],1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#A3A3A3","line-dasharray":["step",["zoom"],["literal",[12,0]],9,["literal",[12,3]]],"line-opacity":0.75,"line-width":["interpolate",["linear"],["zoom"],7,0.75,12,1.5]}},{"id":"boundary-country","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#A3A3A3","line-width":["interpolate",["linear"],["zoom"],0,0.5,12,2]}},{"id":"boundary-country-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["==",["get","disputed"],1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#A3A3A3","line-dasharray":["step",["zoom"],["literal",[6,3]],9,["literal",[12,3]]],"line-width":["interpolate",["linear"],["zoom"],0,0.5,12,2]}},{"id":"building","type":"fill","source":"openmaptiles","source-layer":"building","minzoom":15,"paint":{"fill-color":"#E6DCD0","fill-opacity":["interpolate",["linear"],["zoom"],15,0,16,1]}},{"id":"building-outline","type":"line","source":"openmaptiles","source-layer":"building","minzoom":15,"paint":{"line-color":"#D2C0AA","line-opacity":["interpolate",["linear"],["zoom"],15,0,16,1],"line-width":["interpolate",["linear"],["zoom"],15,0.2,20,1]}},{"id":"road-oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":16,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["match",["get","oneway"],[1,-1],true,false],["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","service"],true,false]],"layout":{"symbol-placement":"line","symbol-spacing":200,"icon-image":"oneway","icon-size":0.6,"icon-padding":5,"icon-rotate":["match",["get","oneway"],-1,180,0],"icon-rotation-alignment":"map"},"paint":{"icon-color":"#D6D2CE"}},{"id":"label-housenumber","type":"symbol","source":"openmaptiles","source-layer":"housenumber","minzoom":17,"layout":{"text-field":["get","housenumber"],"text-font":["Inter Italic"],"text-size":10},"paint":{"text-color":"#2C0000","text-opacity":0.3}},{"id":"label-waterway","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":12,"filter":["match",["get","class"],["river","canal","stream"],true,false],"layout":{"symbol-placement":"line","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Italic"],"text-letter-spacing":0.2,"text-size":["interpolate",["linear"],["zoom"],13,10,18,14]},"paint":{"text-color":"#0063FF"}},{"id":"label-water-point","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["!",["match",["get","class"],["ocean","sea"],true,false]],["!",["match",["geometry-type"],["LineString","MultiLineString"],true,false]]],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Italic"],"text-letter-spacing":0.2,"text-max-width":7,"symbol-placement":"point","text-size":["interpolate",["linear"],["zoom"],13,10,18,14]},"paint":{"text-color":"#0063FF"}},{"id":"label-water-line","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["!",["match",["get","class"],["ocean","sea"],true,false]],["match",["geometry-type"],["LineString","MultiLineString"],true,false]],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Italic"],"text-letter-spacing":0.2,"text-max-width":7,"symbol-placement":"line","text-size":["interpolate",["linear"],["zoom"],13,10,18,14]},"paint":{"text-color":"#0063FF"}},{"id":"label-poi","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["has","name"],["!",["match",["get","class"],["waste_basket","bollard","gate","lift_gate","bicycle_parking","parking","atm","toilets","information","post","drinking_water","recycling","shelter","bench","vending","telephone","office","playground","bicycle_rental","fountain","railway","bus","entrance","charging_station","fuel"],true,false]],["<=",["get","rank"],["*",["step",["zoom"],4,15,12,16,20,17,80,18,999],["match",["get","class"],["place_of_worship","castle","museum","monument","attraction","college","school","park","garden","hospital","theatre","town_hall","zoo","stadium","library"],25,1]]]],"layout":{"symbol-sort-key":["/",["get","rank"],["match",["get","class"],["place_of_worship","castle","museum","monument","attraction","college","school","park","garden","hospital","theatre","town_hall","zoo","stadium","library"],25,1]],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":11,"text-max-width":8,"text-padding":6},"paint":{"text-color":["match",["get","class"],["park","garden","campsite","zoo"],"#3F6C00",["school","college","kindergarten"],"#004CCC",["restaurant","fast_food","cafe","bar","beer","ice_cream","bakery"],"#CC4C00",["hospital","pharmacy","doctors","dentist","veterinary"],"#CC0000",["bus","railway","rail","aerialway","ferry_terminal","airport","entrance"],"#0000CC",["swimming","water_park","stadium","sports_centre","pitch"],"#3198C4","#2C0000"],"text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-transit","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["any",["match",["get","class"],["bus","entrance"],true,false],["all",["==",["get","class"],"railway"],["match",["get","subclass"],["station","subway","halt","tram_stop"],true,false]]],["any",[">=",["zoom"],15],["match",["get","subclass"],["station","subway"],true,false]]],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":10,"text-max-width":8,"text-padding":1},"paint":{"text-color":"#0000CC","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-airport","type":"symbol","source":"openmaptiles","source-layer":"aerodrome_label","minzoom":9,"filter":["has","iata"],"layout":{"text-field":["step",["zoom"],"",11,["coalesce",["get","name:en"],["get","name:latin"],["get","name"]]],"text-font":["Inter Regular"],"text-size":11,"text-max-width":8},"paint":{"text-color":"#0000CC","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-peak","type":"symbol","source":"openmaptiles","source-layer":"mountain_peak","minzoom":11,"filter":["all",["has","name"],["<=",["get","rank"],["step",["zoom"],1,13,5,15,30]]],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":10,"text-max-width":8,"text-padding":15},"paint":{"text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-road-small","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["!",["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","rail","transit"],true,false]],"layout":{"symbol-placement":"line","symbol-spacing":250,"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-letter-spacing":0.01,"text-max-angle":30,"text-padding":1,"text-size":["interpolate",["linear"],["zoom"],15,10,20,13]},"paint":{"text-color":"#7C5C36","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-road-medium","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":14,"filter":["==",["get","class"],"minor"],"layout":{"symbol-placement":"line","symbol-spacing":250,"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-letter-spacing":0.01,"text-max-angle":30,"text-padding":1,"text-size":["interpolate",["linear"],["zoom"],11,10,20,14]},"paint":{"text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-road-large","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["match",["get","class"],["motorway","trunk","primary","secondary","tertiary"],true,false],"layout":{"symbol-placement":"line","symbol-spacing":250,"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-letter-spacing":0.01,"text-max-angle":30,"text-padding":1,"text-size":["interpolate",["linear"],["zoom"],9,10,20,16]},"paint":{"text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-ocean-point","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["match",["get","class"],["ocean","sea"],true,false],["!",["match",["geometry-type"],["LineString","MultiLineString"],true,false]]],"layout":{"symbol-placement":"point","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-max-width":6,"text-size":["interpolate",["linear"],["zoom"],1,14,6,["match",["get","class"],"ocean",26,18]]},"paint":{"text-color":"#CDF0FF"}},{"id":"label-ocean-line","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["match",["get","class"],["ocean","sea"],true,false],["match",["geometry-type"],["LineString","MultiLineString"],true,false]],"layout":{"symbol-placement":"line-center","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-max-width":6,"text-size":["interpolate",["linear"],["zoom"],1,14,6,["match",["get","class"],"ocean",26,18]]},"paint":{"text-color":"#CDF0FF"}},{"id":"label-suburb","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":11,"maxzoom":16,"filter":["match",["get","class"],["suburb","quarter","neighbourhood"],true,false],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-transform":"uppercase","text-letter-spacing":0.04,"text-padding":3,"text-max-width":8,"text-size":["interpolate",["linear"],["zoom"],11,9,15,16]},"paint":{"text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-village","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":10,"maxzoom":15,"filter":["match",["get","class"],["village","hamlet"],true,false],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-max-width":7,"text-padding":1,"text-size":["interpolate",["linear"],["zoom"],10,11,16,18]},"paint":{"text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-town","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":7,"maxzoom":15,"filter":["==",["get","class"],"town"],"layout":{"icon-image":["step",["zoom"],"dot",8,""],"icon-size":0.4,"text-anchor":["step",["zoom"],"bottom",8,"center"],"text-offset":["step",["zoom"],["literal",[0,-0.2]],8,["literal",[0,0]]],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-max-width":7,"text-padding":1,"text-size":["interpolate",["linear"],["zoom"],7,11,15,20]},"paint":{"icon-color":"#2C0000","text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-city-small","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":5,"maxzoom":14,"filter":["all",["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],[">",["get","rank"],5]],"layout":{"icon-image":["step",["zoom"],"dot",8,""],"icon-size":0.4,"text-anchor":["step",["zoom"],"bottom",8,"center"],"text-offset":["step",["zoom"],["literal",[0,-0.2]],8,["literal",[0,0]]],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-max-width":8,"text-size":["interpolate",["linear"],["zoom"],6,12,14,22]},"paint":{"icon-color":"#2C0000","text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-city-large","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":3,"maxzoom":14,"filter":["all",["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],["<=",["get","rank"],5]],"layout":{"icon-image":["step",["zoom"],"dot",8,""],"icon-size":0.5,"text-anchor":["step",["zoom"],"bottom",8,"center"],"text-offset":["step",["zoom"],["literal",[0,-0.2]],8,["literal",[0,0]]],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-max-width":8,"text-size":["interpolate",["linear"],["zoom"],4,12,10,22]},"paint":{"icon-color":"#2C0000","text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-state","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":4,"maxzoom":10,"filter":["all",["==",["get","class"],"state"],["<=",["get","rank"],2]],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-transform":"uppercase","text-max-width":6,"text-padding":5,"text-size":["interpolate",["linear"],["zoom"],3,8,8,18]},"paint":{"text-color":"#7C5C36","text-halo-color":"#FFFFFF","text-halo-width":1}},{"id":"label-capital-dot","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":3,"maxzoom":8,"filter":["all",["==",["get","class"],"city"],["==",["get","capital"],2]],"layout":{"icon-image":"dot","icon-size":0.6,"text-variable-anchor":["top","bottom","right","left"],"text-radial-offset":0.4,"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Bold"],"text-max-width":8,"text-size":["interpolate",["linear"],["zoom"],4,12,10,22]},"paint":{"icon-color":"#2C0000","text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-capital","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":8,"maxzoom":14,"filter":["all",["==",["get","class"],"city"],["==",["get","capital"],2]],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Bold"],"text-max-width":8,"text-size":["interpolate",["linear"],["zoom"],4,12,10,22]},"paint":{"text-color":"#2C0000","text-halo-color":"#FFFFFF","text-halo-width":1,"text-halo-blur":1}},{"id":"label-country","type":"symbol","source":"openmaptiles","source-layer":"place","maxzoom":7,"filter":["==",["get","class"],"country"],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Bold"],"text-max-width":6,"text-size":["interpolate",["linear"],["zoom"],1,["step",["get","rank"],10,2,9,5,8],3,["step",["get","rank"],15,2,10,5,9],6,["step",["get","rank"],24,2,18,5,14],8,["step",["get","rank"],24,2,24,5,18]]},"paint":{"text-color":"#7C5C36","text-halo-color":"#FFFFFF","text-halo-width":1}}]'),n={version:e,name:t,sources:l,layers:i};exports.default=n;exports.layers=i;exports.name=t;exports.sources=l;exports.version=e;
|