@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,13 @@
|
|
|
1
|
+
const l = 8, e = "Lab Light", t = { openmaptiles: { type: "vector", url: "https://tiles.openfreemap.org/planet" } }, a = /* @__PURE__ */ JSON.parse('[{"id":"background","type":"background","paint":{"background-color":"#f6f6f4"}},{"id":"park-national","type":"fill","source":"openmaptiles","source-layer":"park","filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["match",["get","class"],["national_park","nature_reserve","wildlife_refuge"],true,false]],"paint":{"fill-color":"#ebebea","fill-antialias":false}},{"id":"landcover","type":"fill","source":"openmaptiles","source-layer":"landcover","filter":["match",["get","class"],["wood","grass","sand"],true,false],"paint":{"fill-color":"#ebebea","fill-antialias":false,"fill-opacity":["interpolate",["linear"],["zoom"],5,["match",["get","subclass"],["park","garden","beach"],1,["match",["get","class"],"wood",0.3,0]],16,["match",["get","subclass"],["park","garden","beach"],1,["match",["get","class"],"wood",0.5,0.3]]]}},{"id":"landuse","type":"fill","source":"openmaptiles","source-layer":"landuse","filter":["match",["get","class"],["cemetery","hospital","school","university","college","kindergarten","industrial","railway","pitch","stadium"],true,false],"paint":{"fill-color":"#e9e9e7"}},{"id":"landuse-pitch-outline","type":"line","source":"openmaptiles","source-layer":"landuse","minzoom":13,"filter":["==",["get","class"],"pitch"],"paint":{"line-color":"#ffffff","line-opacity":["interpolate",["linear"],["zoom"],13,0.5,14,1],"line-width":["interpolate",["linear"],["zoom"],13,0.2,15,1]}},{"id":"aeroway-area","type":"fill","source":"openmaptiles","source-layer":"aeroway","minzoom":9,"filter":["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],"paint":{"fill-color":"#e9e9e7"}},{"id":"aeroway","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":"#e9e9e7","line-width":["interpolate",["exponential",1.5],["zoom"],9,["match",["get","class"],"runway",1,0.5],18,["match",["get","class"],"runway",80,20]]}},{"id":"waterway","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":9,"filter":["all",["!=",["get","brunnel"],"tunnel"],["!=",["get","intermittent"],1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cad2d3","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["river","canal"],0.1,0],14,["match",["get","class"],["river","canal"],1.4,0.1],20,["match",["get","class"],["river","canal"],8,3]]}},{"id":"water-shadow","type":"fill","source":"openmaptiles","source-layer":"water","filter":["!=",["get","brunnel"],"tunnel"],"paint":{"fill-color":"#bfc6c7","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":"#cad2d3"}},{"id":"structure","type":"fill","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["match",["get","class"],["bridge","pier"],true,false]],"paint":{"fill-color":"#f6f6f4","fill-opacity":["interpolate",["linear"],["zoom"],15,0.2,16,1]}},{"id":"road-pedestrian-area","type":"fill","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["==",["get","class"],"path"]],"paint":{"fill-color":"#ffffff","fill-opacity":0.8}},{"id":"tunnel-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["any",["match",["get","class"],["service","track"],true,false],["match",["get","class"],["minor","busway","raceway"],true,false],["match",["get","class"],["secondary","tertiary"],true,false],["==",["get","class"],"primary"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]]],"paint":{"line-color":"#dddddb","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.5,["secondary","tertiary"],0.6,"primary",0.97,["motorway","trunk"],0.75,0],14,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.68,["secondary","tertiary"],0.76,"primary",1.29,["motorway","trunk"],1.13,0],16,["match",["get","class"],["service","track"],0.44,["minor","busway","raceway"],1.09,["secondary","tertiary"],1.14,"primary",2,["motorway","trunk"],2,0],18,["match",["get","class"],["service","track"],1.08,["minor","busway","raceway"],2,["secondary","tertiary"],2,"primary",2,["motorway","trunk"],2,0]],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.5,["secondary","tertiary"],2.12,"primary",3.16,["motorway","trunk"],3.35,0],14,["match",["get","class"],["service","track"],0.5,["minor","busway","raceway"],2.61,["secondary","tertiary"],4.99,"primary",6.63,["motorway","trunk"],6.79,0],16,["match",["get","class"],["service","track"],4.04,["minor","busway","raceway"],7.34,["secondary","tertiary"],11.45,"primary",14.44,["motorway","trunk"],14.55,0],18,["match",["get","class"],["service","track"],12,["minor","busway","raceway"],18,["secondary","tertiary"],26,"primary",32,["motorway","trunk"],32,0]]}},{"id":"tunnel","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["any",["match",["get","class"],["service","track"],true,false],["match",["get","class"],["minor","busway","raceway"],true,false],["match",["get","class"],["secondary","tertiary"],true,false],["==",["get","class"],"primary"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]]],"layout":{"line-join":"round"},"paint":{"line-color":["match",["get","class"],["motorway","trunk"],"#dee2e3","#ffffff"],"line-opacity":0.7,"line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.5,["secondary","tertiary"],2.12,"primary",3.16,["motorway","trunk"],3.35,0],14,["match",["get","class"],["service","track"],0.5,["minor","busway","raceway"],2.61,["secondary","tertiary"],4.99,"primary",6.63,["motorway","trunk"],6.79,0],16,["match",["get","class"],["service","track"],4.04,["minor","busway","raceway"],7.34,["secondary","tertiary"],11.45,"primary",14.44,["motorway","trunk"],14.55,0],18,["match",["get","class"],["service","track"],12,["minor","busway","raceway"],18,["secondary","tertiary"],26,"primary",32,["motorway","trunk"],32,0]]}},{"id":"road-pedestrian-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"path"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#dddddb","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],["!=",["get","brunnel"],"tunnel"],["==",["get","class"],"path"],["!=",["get","subclass"],"pedestrian"]],"layout":{"line-join":"round"},"paint":{"line-color":"#808080","line-opacity":["interpolate",["linear"],["zoom"],14,0,15,0.4],"line-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,22,4],"line-dasharray":["step",["zoom"],["literal",[2,1]],16,["literal",[2.66,1.4]],18,["literal",[3.33,1.8]]]}},{"id":"road-pedestrian","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"path"],["==",["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],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["service","track"],true,false]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.2],["zoom"],14,0,20,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,18,12]}},{"id":"road-minor-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","raceway"],true,false]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18],"line-opacity":["interpolate",["linear"],["zoom"],12,0,14,1]}},{"id":"road-secondary-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":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26],"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],["!=",["get","brunnel"],"tunnel"],["==",["get","class"],"primary"]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,16,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32],"line-opacity":["interpolate",["linear"],["zoom"],7,0.25,11,1]}},{"id":"road-link-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],11,0,12,0.75,20,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,14,2,18,18]}},{"id":"road-motorway-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"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],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["service","track"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,18,12]}},{"id":"road-minor","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","raceway"],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","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]}},{"id":"road-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]}},{"id":"road-link","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.5],["zoom"],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],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32]}},{"id":"rail","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["rail","transit"],true,false]],"layout":{"line-join":"round"},"paint":{"line-color":"#e2e6e4","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":"rail-ties","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":16,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["rail","transit"],true,false]],"paint":{"line-color":"#e2e6e4","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":2,"filter":["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],4],["!=",["get","maritime"],1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#bbbbbb","line-opacity":0.75,"line-width":["interpolate",["linear"],["zoom"],4,0.5,7,0.75,12,1.5],"line-dasharray":["step",["zoom"],["literal",[12,0]],9,["literal",[12,3]]]}},{"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":"#a1a1a1","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]],"paint":{"line-color":"#a1a1a1","line-width":["interpolate",["linear"],["zoom"],0,0.5,12,2],"line-dasharray":[4,2]}},{"id":"building","type":"fill","source":"openmaptiles","source-layer":"building","minzoom":14,"paint":{"fill-color":"#e9e9e7","fill-opacity":["interpolate",["linear"],["zoom"],14,0,15,1]}},{"id":"building-outline","type":"line","source":"openmaptiles","source-layer":"building","minzoom":15,"paint":{"line-color":"#ffffff","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],["==",["get","oneway"],1],["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","service"],true,false]],"layout":{"symbol-placement":"line","symbol-spacing":200,"icon-image":["coalesce",["image","oneway"],["image","dot"]],"icon-size":0.5,"icon-padding":5,"icon-rotation-alignment":"map"},"paint":{"icon-color":"#c4c4c2"}},{"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":"#6b6b6b","text-opacity":0.3}},{"id":"label-waterway","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":12,"filter":["match",["get","class"],["river","canal"],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":"#6b6b6b"}},{"id":"label-water","type":"symbol","source":"openmaptiles","source-layer":"water_name","minzoom":11,"filter":["!",["match",["get","class"],["ocean","sea"],true,false]],"layout":{"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],"text-max-width":6},"paint":{"text-color":"#6b6b6b"}},{"id":"label-road-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["match",["get","class"],["service","track","path"],true,false],"layout":{"symbol-placement":"line","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":["interpolate",["linear"],["zoom"],15,10,20,13],"text-max-angle":30,"text-padding":1},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-road-street","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["match",["get","class"],["minor","busway"],true,false],"layout":{"symbol-placement":"line","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":["interpolate",["linear"],["zoom"],11,10,20,14],"text-max-angle":30,"text-padding":1},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-road-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":11,"filter":["any",["match",["get","class"],["motorway","trunk","primary"],true,false],["all",[">=",["zoom"],14],["match",["get","class"],["secondary","tertiary"],true,false]]],"layout":{"symbol-placement":"line","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":["interpolate",["linear"],["zoom"],9,10,20,16],"text-max-angle":30,"text-padding":1},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"poi-transit","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["any",["match",["get","class"],["railway","bus"],true,false],["all",[">=",["zoom"],16],["==",["get","subclass"],"subway_entrance"]]],["<=",["get","rank"],["step",["zoom"],3,14,8,15,30,16,99]]],"layout":{"symbol-sort-key":["get","rank"],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":10,"text-max-width":8},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"poi","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["any",["match",["get","class"],["place_of_worship","castle","stadium"],true,false],["match",["get","subclass"],["townhall","hospital","zoo"],true,false],["all",[">=",["zoom"],17],["match",["get","class"],["museum","monument","theatre","college","park","library","attraction"],true,false]]],"layout":{"symbol-sort-key":["get","rank"],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":11,"text-max-width":8,"text-padding":2},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-airport","type":"symbol","source":"openmaptiles","source-layer":"aerodrome_label","minzoom":10,"filter":["has","iata"],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":11,"text-max-width":8},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-peak","type":"symbol","source":"openmaptiles","source-layer":"mountain_peak","minzoom":14,"filter":["==",["get","class"],"peak"],"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":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["match",["get","class"],["ocean","sea"],true,false],"layout":{"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,["match",["get","class"],"ocean",14,11],6,["match",["get","class"],"ocean",24,16]]},"paint":{"text-color":"#f1f3f3"}},{"id":"label-suburb","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":11,"maxzoom":16,"filter":["any",["match",["get","class"],["suburb","quarter"],true,false],["all",[">=",["zoom"],15],["==",["get","class"],"neighbourhood"]]],"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":"#6b6b6b","text-halo-color":"#e9e9e7","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],"symbol-sort-key":["get","rank"]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","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":{"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],"symbol-sort-key":["get","rank"],"icon-image":["step",["zoom"],["coalesce",["image","dot"],["image","dot"]],8,""],"icon-size":0.8,"text-variable-anchor-offset":["step",["zoom"],["literal",["bottom",[0,-0.3],"top",[0,0.3],"left",[0.6,0],"right",[-0.6,0]]],8,["literal",["center",[0,0]]]]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"icon-color":"#2a2a2a"}},{"id":"label-city","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":4,"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 Regular"],"text-max-width":8,"text-size":["interpolate",["linear"],["zoom"],4,["step",["get","rank"],12,8,11],6,["step",["get","rank"],14,8,12],10,["step",["get","rank"],22,8,17],14,22],"symbol-sort-key":["get","rank"],"icon-image":["step",["zoom"],["coalesce",["image","dot"],["image","dot"]],8,""],"icon-size":0.95,"text-variable-anchor-offset":["step",["zoom"],["literal",["bottom",[0,-0.3],"top",[0,0.3],"left",[0.6,0],"right",[-0.6,0]]],8,["literal",["center",[0,0]]]]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"icon-color":"#2a2a2a"}},{"id":"label-state","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":3,"maxzoom":8,"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-letter-spacing":0.05,"text-max-width":6,"text-padding":5,"text-size":["interpolate",["linear"],["zoom"],3,8,8,16]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"text-opacity":0.8}},{"id":"label-capital","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":3,"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],"icon-image":["step",["zoom"],["coalesce",["image","dot"],["image","dot"]],8,""],"icon-size":1.1,"text-variable-anchor-offset":["step",["zoom"],["literal",["top",[0,0.3],"bottom",[0,-0.3],"left",[0.6,0],"right",[-0.6,0]]],8,["literal",["center",[0,0]]]]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"icon-color":"#2a2a2a"}},{"id":"label-country","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":1,"maxzoom":8,"filter":["==",["get","class"],"country"],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Bold"],"text-max-width":6,"symbol-sort-key":["get","rank"],"text-size":["interpolate",["linear"],["zoom"],1,["step",["get","rank"],10,3,9,5,8],3,["step",["get","rank"],15,3,10,5,9],6,["step",["get","rank"],24,3,20,5,15],8,["step",["get","rank"],24,3,24,5,18]]},"paint":{"text-color":"#5c5c5c","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}}]'), o = {
|
|
2
|
+
version: 8,
|
|
3
|
+
name: e,
|
|
4
|
+
sources: t,
|
|
5
|
+
layers: a
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
o as default,
|
|
9
|
+
a as layers,
|
|
10
|
+
e as name,
|
|
11
|
+
t as sources,
|
|
12
|
+
l as version
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=8,t="Lab Light",a={openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},l=JSON.parse('[{"id":"background","type":"background","paint":{"background-color":"#f6f6f4"}},{"id":"park-national","type":"fill","source":"openmaptiles","source-layer":"park","filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["match",["get","class"],["national_park","nature_reserve","wildlife_refuge"],true,false]],"paint":{"fill-color":"#ebebea","fill-antialias":false}},{"id":"landcover","type":"fill","source":"openmaptiles","source-layer":"landcover","filter":["match",["get","class"],["wood","grass","sand"],true,false],"paint":{"fill-color":"#ebebea","fill-antialias":false,"fill-opacity":["interpolate",["linear"],["zoom"],5,["match",["get","subclass"],["park","garden","beach"],1,["match",["get","class"],"wood",0.3,0]],16,["match",["get","subclass"],["park","garden","beach"],1,["match",["get","class"],"wood",0.5,0.3]]]}},{"id":"landuse","type":"fill","source":"openmaptiles","source-layer":"landuse","filter":["match",["get","class"],["cemetery","hospital","school","university","college","kindergarten","industrial","railway","pitch","stadium"],true,false],"paint":{"fill-color":"#e9e9e7"}},{"id":"landuse-pitch-outline","type":"line","source":"openmaptiles","source-layer":"landuse","minzoom":13,"filter":["==",["get","class"],"pitch"],"paint":{"line-color":"#ffffff","line-opacity":["interpolate",["linear"],["zoom"],13,0.5,14,1],"line-width":["interpolate",["linear"],["zoom"],13,0.2,15,1]}},{"id":"aeroway-area","type":"fill","source":"openmaptiles","source-layer":"aeroway","minzoom":9,"filter":["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],"paint":{"fill-color":"#e9e9e7"}},{"id":"aeroway","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":"#e9e9e7","line-width":["interpolate",["exponential",1.5],["zoom"],9,["match",["get","class"],"runway",1,0.5],18,["match",["get","class"],"runway",80,20]]}},{"id":"waterway","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":9,"filter":["all",["!=",["get","brunnel"],"tunnel"],["!=",["get","intermittent"],1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cad2d3","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["river","canal"],0.1,0],14,["match",["get","class"],["river","canal"],1.4,0.1],20,["match",["get","class"],["river","canal"],8,3]]}},{"id":"water-shadow","type":"fill","source":"openmaptiles","source-layer":"water","filter":["!=",["get","brunnel"],"tunnel"],"paint":{"fill-color":"#bfc6c7","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":"#cad2d3"}},{"id":"structure","type":"fill","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["match",["get","class"],["bridge","pier"],true,false]],"paint":{"fill-color":"#f6f6f4","fill-opacity":["interpolate",["linear"],["zoom"],15,0.2,16,1]}},{"id":"road-pedestrian-area","type":"fill","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["Polygon","MultiPolygon"],true,false],["==",["get","class"],"path"]],"paint":{"fill-color":"#ffffff","fill-opacity":0.8}},{"id":"tunnel-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["any",["match",["get","class"],["service","track"],true,false],["match",["get","class"],["minor","busway","raceway"],true,false],["match",["get","class"],["secondary","tertiary"],true,false],["==",["get","class"],"primary"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]]],"paint":{"line-color":"#dddddb","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.5,["secondary","tertiary"],0.6,"primary",0.97,["motorway","trunk"],0.75,0],14,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.68,["secondary","tertiary"],0.76,"primary",1.29,["motorway","trunk"],1.13,0],16,["match",["get","class"],["service","track"],0.44,["minor","busway","raceway"],1.09,["secondary","tertiary"],1.14,"primary",2,["motorway","trunk"],2,0],18,["match",["get","class"],["service","track"],1.08,["minor","busway","raceway"],2,["secondary","tertiary"],2,"primary",2,["motorway","trunk"],2,0]],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.5,["secondary","tertiary"],2.12,"primary",3.16,["motorway","trunk"],3.35,0],14,["match",["get","class"],["service","track"],0.5,["minor","busway","raceway"],2.61,["secondary","tertiary"],4.99,"primary",6.63,["motorway","trunk"],6.79,0],16,["match",["get","class"],["service","track"],4.04,["minor","busway","raceway"],7.34,["secondary","tertiary"],11.45,"primary",14.44,["motorway","trunk"],14.55,0],18,["match",["get","class"],["service","track"],12,["minor","busway","raceway"],18,["secondary","tertiary"],26,"primary",32,["motorway","trunk"],32,0]]}},{"id":"tunnel","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["==",["get","brunnel"],"tunnel"],["any",["match",["get","class"],["service","track"],true,false],["match",["get","class"],["minor","busway","raceway"],true,false],["match",["get","class"],["secondary","tertiary"],true,false],["==",["get","class"],"primary"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]]],"layout":{"line-join":"round"},"paint":{"line-color":["match",["get","class"],["motorway","trunk"],"#dee2e3","#ffffff"],"line-opacity":0.7,"line-width":["interpolate",["exponential",1.5],["zoom"],12,["match",["get","class"],["service","track"],0,["minor","busway","raceway"],0.5,["secondary","tertiary"],2.12,"primary",3.16,["motorway","trunk"],3.35,0],14,["match",["get","class"],["service","track"],0.5,["minor","busway","raceway"],2.61,["secondary","tertiary"],4.99,"primary",6.63,["motorway","trunk"],6.79,0],16,["match",["get","class"],["service","track"],4.04,["minor","busway","raceway"],7.34,["secondary","tertiary"],11.45,"primary",14.44,["motorway","trunk"],14.55,0],18,["match",["get","class"],["service","track"],12,["minor","busway","raceway"],18,["secondary","tertiary"],26,"primary",32,["motorway","trunk"],32,0]]}},{"id":"road-pedestrian-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"path"],["==",["get","subclass"],"pedestrian"]]],"layout":{"line-join":"round"},"paint":{"line-color":"#dddddb","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],["!=",["get","brunnel"],"tunnel"],["==",["get","class"],"path"],["!=",["get","subclass"],"pedestrian"]],"layout":{"line-join":"round"},"paint":{"line-color":"#808080","line-opacity":["interpolate",["linear"],["zoom"],14,0,15,0.4],"line-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,22,4],"line-dasharray":["step",["zoom"],["literal",[2,1]],16,["literal",[2.66,1.4]],18,["literal",[3.33,1.8]]]}},{"id":"road-pedestrian","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":14,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["==",["get","class"],"path"],["==",["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],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["service","track"],true,false]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.2],["zoom"],14,0,20,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,18,12]}},{"id":"road-minor-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","raceway"],true,false]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,18,18],"line-opacity":["interpolate",["linear"],["zoom"],12,0,14,1]}},{"id":"road-secondary-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":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],9,0.5,18,26],"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],["!=",["get","brunnel"],"tunnel"],["==",["get","class"],"primary"]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,16,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],7,0.75,18,32],"line-opacity":["interpolate",["linear"],["zoom"],7,0.25,11,1]}},{"id":"road-link-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],11,0,12,0.75,20,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],12,0.5,14,2,18,18]}},{"id":"road-motorway-casing","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]],"layout":{"line-cap":["step",["zoom"],"butt",14,"round"],"line-join":["step",["zoom"],"miter",14,"round"]},"paint":{"line-color":"#dddddb","line-width":["interpolate",["exponential",1.5],["zoom"],10,0,12,0.75,16,2],"line-gap-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32],"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],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["service","track"],true,false]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.5],["zoom"],14,0.5,18,12]}},{"id":"road-minor","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","raceway"],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","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]}},{"id":"road-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]}},{"id":"road-link","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":10,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["==",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.5],["zoom"],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],["!=",["get","brunnel"],"tunnel"],["all",["match",["get","class"],["motorway","trunk"],true,false],["!=",["get","ramp"],1]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#ffffff","line-width":["interpolate",["exponential",1.5],["zoom"],5,0.75,18,32]}},{"id":"rail","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["rail","transit"],true,false]],"layout":{"line-join":"round"},"paint":{"line-color":"#e2e6e4","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":"rail-ties","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":16,"filter":["all",["match",["geometry-type"],["LineString","MultiLineString"],true,false],["!=",["get","brunnel"],"tunnel"],["match",["get","class"],["rail","transit"],true,false]],"paint":{"line-color":"#e2e6e4","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":2,"filter":["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],4],["!=",["get","maritime"],1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#bbbbbb","line-opacity":0.75,"line-width":["interpolate",["linear"],["zoom"],4,0.5,7,0.75,12,1.5],"line-dasharray":["step",["zoom"],["literal",[12,0]],9,["literal",[12,3]]]}},{"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":"#a1a1a1","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]],"paint":{"line-color":"#a1a1a1","line-width":["interpolate",["linear"],["zoom"],0,0.5,12,2],"line-dasharray":[4,2]}},{"id":"building","type":"fill","source":"openmaptiles","source-layer":"building","minzoom":14,"paint":{"fill-color":"#e9e9e7","fill-opacity":["interpolate",["linear"],["zoom"],14,0,15,1]}},{"id":"building-outline","type":"line","source":"openmaptiles","source-layer":"building","minzoom":15,"paint":{"line-color":"#ffffff","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],["==",["get","oneway"],1],["match",["get","class"],["motorway","trunk","primary","secondary","tertiary","minor","service"],true,false]],"layout":{"symbol-placement":"line","symbol-spacing":200,"icon-image":["coalesce",["image","oneway"],["image","dot"]],"icon-size":0.5,"icon-padding":5,"icon-rotation-alignment":"map"},"paint":{"icon-color":"#c4c4c2"}},{"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":"#6b6b6b","text-opacity":0.3}},{"id":"label-waterway","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":12,"filter":["match",["get","class"],["river","canal"],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":"#6b6b6b"}},{"id":"label-water","type":"symbol","source":"openmaptiles","source-layer":"water_name","minzoom":11,"filter":["!",["match",["get","class"],["ocean","sea"],true,false]],"layout":{"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],"text-max-width":6},"paint":{"text-color":"#6b6b6b"}},{"id":"label-road-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["match",["get","class"],["service","track","path"],true,false],"layout":{"symbol-placement":"line","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":["interpolate",["linear"],["zoom"],15,10,20,13],"text-max-angle":30,"text-padding":1},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-road-street","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["match",["get","class"],["minor","busway"],true,false],"layout":{"symbol-placement":"line","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":["interpolate",["linear"],["zoom"],11,10,20,14],"text-max-angle":30,"text-padding":1},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-road-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":11,"filter":["any",["match",["get","class"],["motorway","trunk","primary"],true,false],["all",[">=",["zoom"],14],["match",["get","class"],["secondary","tertiary"],true,false]]],"layout":{"symbol-placement":"line","text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":["interpolate",["linear"],["zoom"],9,10,20,16],"text-max-angle":30,"text-padding":1},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"poi-transit","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["any",["match",["get","class"],["railway","bus"],true,false],["all",[">=",["zoom"],16],["==",["get","subclass"],"subway_entrance"]]],["<=",["get","rank"],["step",["zoom"],3,14,8,15,30,16,99]]],"layout":{"symbol-sort-key":["get","rank"],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":10,"text-max-width":8},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"poi","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["any",["match",["get","class"],["place_of_worship","castle","stadium"],true,false],["match",["get","subclass"],["townhall","hospital","zoo"],true,false],["all",[">=",["zoom"],17],["match",["get","class"],["museum","monument","theatre","college","park","library","attraction"],true,false]]],"layout":{"symbol-sort-key":["get","rank"],"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":11,"text-max-width":8,"text-padding":2},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-airport","type":"symbol","source":"openmaptiles","source-layer":"aerodrome_label","minzoom":10,"filter":["has","iata"],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Regular"],"text-size":11,"text-max-width":8},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-peak","type":"symbol","source":"openmaptiles","source-layer":"mountain_peak","minzoom":14,"filter":["==",["get","class"],"peak"],"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":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}},{"id":"label-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["match",["get","class"],["ocean","sea"],true,false],"layout":{"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,["match",["get","class"],"ocean",14,11],6,["match",["get","class"],"ocean",24,16]]},"paint":{"text-color":"#f1f3f3"}},{"id":"label-suburb","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":11,"maxzoom":16,"filter":["any",["match",["get","class"],["suburb","quarter"],true,false],["all",[">=",["zoom"],15],["==",["get","class"],"neighbourhood"]]],"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":"#6b6b6b","text-halo-color":"#e9e9e7","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],"symbol-sort-key":["get","rank"]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","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":{"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],"symbol-sort-key":["get","rank"],"icon-image":["step",["zoom"],["coalesce",["image","dot"],["image","dot"]],8,""],"icon-size":0.8,"text-variable-anchor-offset":["step",["zoom"],["literal",["bottom",[0,-0.3],"top",[0,0.3],"left",[0.6,0],"right",[-0.6,0]]],8,["literal",["center",[0,0]]]]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"icon-color":"#2a2a2a"}},{"id":"label-city","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":4,"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 Regular"],"text-max-width":8,"text-size":["interpolate",["linear"],["zoom"],4,["step",["get","rank"],12,8,11],6,["step",["get","rank"],14,8,12],10,["step",["get","rank"],22,8,17],14,22],"symbol-sort-key":["get","rank"],"icon-image":["step",["zoom"],["coalesce",["image","dot"],["image","dot"]],8,""],"icon-size":0.95,"text-variable-anchor-offset":["step",["zoom"],["literal",["bottom",[0,-0.3],"top",[0,0.3],"left",[0.6,0],"right",[-0.6,0]]],8,["literal",["center",[0,0]]]]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"icon-color":"#2a2a2a"}},{"id":"label-state","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":3,"maxzoom":8,"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-letter-spacing":0.05,"text-max-width":6,"text-padding":5,"text-size":["interpolate",["linear"],["zoom"],3,8,8,16]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"text-opacity":0.8}},{"id":"label-capital","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":3,"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],"icon-image":["step",["zoom"],["coalesce",["image","dot"],["image","dot"]],8,""],"icon-size":1.1,"text-variable-anchor-offset":["step",["zoom"],["literal",["top",[0,0.3],"bottom",[0,-0.3],"left",[0.6,0],"right",[-0.6,0]]],8,["literal",["center",[0,0]]]]},"paint":{"text-color":"#6b6b6b","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1,"icon-color":"#2a2a2a"}},{"id":"label-country","type":"symbol","source":"openmaptiles","source-layer":"place","minzoom":1,"maxzoom":8,"filter":["==",["get","class"],"country"],"layout":{"text-field":["coalesce",["get","name:en"],["get","name:latin"],["get","name"]],"text-font":["Inter Bold"],"text-max-width":6,"symbol-sort-key":["get","rank"],"text-size":["interpolate",["linear"],["zoom"],1,["step",["get","rank"],10,3,9,5,8],3,["step",["get","rank"],15,3,10,5,9],6,["step",["get","rank"],24,3,20,5,15],8,["step",["get","rank"],24,3,24,5,18]]},"paint":{"text-color":"#5c5c5c","text-halo-color":"#e9e9e7","text-halo-width":1,"text-halo-blur":1}}]'),o={version:e,name:t,sources:a,layers:l};exports.default=o;exports.layers=l;exports.name=t;exports.sources=a;exports.version=e;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { IconButtonSize, TooltipSide } from '@element-editor/ui';
|
|
3
|
+
import { BasemapInput } from './basemaps/index.cjs';
|
|
4
|
+
export interface BasemapControlProps {
|
|
5
|
+
/** Defaults to the map of the surrounding `ElementEditorControls`. */
|
|
6
|
+
map?: MapLibreMap;
|
|
7
|
+
/** Choices, in order. Default: `'auto'` + all built-ins. */
|
|
8
|
+
basemaps?: BasemapInput[];
|
|
9
|
+
value?: BasemapInput;
|
|
10
|
+
/**
|
|
11
|
+
* Initial choice when uncontrolled. Default `'auto'`, shown as selected but not applied: with
|
|
12
|
+
* no `value`, `defaultValue` or remembered pick, your map keeps its own style until the user picks.
|
|
13
|
+
*/
|
|
14
|
+
defaultValue?: BasemapInput;
|
|
15
|
+
onChange?: (basemap: BasemapInput) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Persist the chosen built-in id / `'auto'` / custom `id` in localStorage under this key (namespaced
|
|
18
|
+
* by `config.persistKey`, skipped when `config.persist` is false) and restore it on mount.
|
|
19
|
+
*/
|
|
20
|
+
storageKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Set when the map was created with the initial choice already in its style (the drop-in does):
|
|
23
|
+
* the first apply is skipped. A choice restored from `storageKey` that differs is still applied.
|
|
24
|
+
*/
|
|
25
|
+
initialApplied?: boolean;
|
|
26
|
+
/** Button size and tooltip side; the editor's layout passes these so the picker fits its slot (compact in the status bar). */
|
|
27
|
+
size?: IconButtonSize;
|
|
28
|
+
tooltipSide?: TooltipSide;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Keeps `map` showing `basemap` with `setBasemap` (keeps Element's layers): applies it whenever the
|
|
32
|
+
* choice or, for `'auto'`, the theme changes. `BasemapControl` uses it; mount it yourself to keep
|
|
33
|
+
* `'auto'` following the theme while no picker is mounted. `initialApplied`: the map was created with
|
|
34
|
+
* the first `basemap` (and theme) this hook was called with already in its style, so that one is
|
|
35
|
+
* not re-applied; a different value by the time the map arrives is. The built-ins load from the
|
|
36
|
+
* servers in the editor's `config.network` (read when a basemap is applied).
|
|
37
|
+
*/
|
|
38
|
+
export declare function useBasemap(map: MapLibreMap | null | undefined, basemap: BasemapInput, opts: {
|
|
39
|
+
theme: 'light' | 'dark';
|
|
40
|
+
initialApplied?: boolean;
|
|
41
|
+
}): void;
|
|
42
|
+
/**
|
|
43
|
+
* Basemap picker that applies the choice to the map with `setBasemap` (keeps Element's layers).
|
|
44
|
+
* `'auto'` follows the editor theme. The basemap catalog is loaded lazily from `./basemaps`.
|
|
45
|
+
* With no `map` (and outside `ElementEditorControls`) it is a plain `value`/`onChange` picker.
|
|
46
|
+
*/
|
|
47
|
+
export declare function BasemapControl(props: BasemapControlProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
2
|
+
import { IconButtonSize, TooltipSide } from '@element-editor/ui';
|
|
3
|
+
import { BasemapInput } from './basemaps/index.js';
|
|
4
|
+
export interface BasemapControlProps {
|
|
5
|
+
/** Defaults to the map of the surrounding `ElementEditorControls`. */
|
|
6
|
+
map?: MapLibreMap;
|
|
7
|
+
/** Choices, in order. Default: `'auto'` + all built-ins. */
|
|
8
|
+
basemaps?: BasemapInput[];
|
|
9
|
+
value?: BasemapInput;
|
|
10
|
+
/**
|
|
11
|
+
* Initial choice when uncontrolled. Default `'auto'`, shown as selected but not applied: with
|
|
12
|
+
* no `value`, `defaultValue` or remembered pick, your map keeps its own style until the user picks.
|
|
13
|
+
*/
|
|
14
|
+
defaultValue?: BasemapInput;
|
|
15
|
+
onChange?: (basemap: BasemapInput) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Persist the chosen built-in id / `'auto'` / custom `id` in localStorage under this key (namespaced
|
|
18
|
+
* by `config.persistKey`, skipped when `config.persist` is false) and restore it on mount.
|
|
19
|
+
*/
|
|
20
|
+
storageKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Set when the map was created with the initial choice already in its style (the drop-in does):
|
|
23
|
+
* the first apply is skipped. A choice restored from `storageKey` that differs is still applied.
|
|
24
|
+
*/
|
|
25
|
+
initialApplied?: boolean;
|
|
26
|
+
/** Button size and tooltip side; the editor's layout passes these so the picker fits its slot (compact in the status bar). */
|
|
27
|
+
size?: IconButtonSize;
|
|
28
|
+
tooltipSide?: TooltipSide;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Keeps `map` showing `basemap` with `setBasemap` (keeps Element's layers): applies it whenever the
|
|
32
|
+
* choice or, for `'auto'`, the theme changes. `BasemapControl` uses it; mount it yourself to keep
|
|
33
|
+
* `'auto'` following the theme while no picker is mounted. `initialApplied`: the map was created with
|
|
34
|
+
* the first `basemap` (and theme) this hook was called with already in its style, so that one is
|
|
35
|
+
* not re-applied; a different value by the time the map arrives is. The built-ins load from the
|
|
36
|
+
* servers in the editor's `config.network` (read when a basemap is applied).
|
|
37
|
+
*/
|
|
38
|
+
export declare function useBasemap(map: MapLibreMap | null | undefined, basemap: BasemapInput, opts: {
|
|
39
|
+
theme: 'light' | 'dark';
|
|
40
|
+
initialApplied?: boolean;
|
|
41
|
+
}): void;
|
|
42
|
+
/**
|
|
43
|
+
* Basemap picker that applies the choice to the map with `setBasemap` (keeps Element's layers).
|
|
44
|
+
* `'auto'` follows the editor theme. The basemap catalog is loaded lazily from `./basemaps`.
|
|
45
|
+
* With no `map` (and outside `ElementEditorControls`) it is a plain `value`/`onChange` picker.
|
|
46
|
+
*/
|
|
47
|
+
export declare function BasemapControl(props: BasemapControlProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
3
|
+
import { FeatureCollection, FeatureCollectionInput, GeoJSONFeature, GeoJSONFeatureInput, Schema } from '@element-editor/core';
|
|
4
|
+
import { ElementEditorImperativeAPI, ImportResult, ElementEditorEvent, ElementEditorErrorHandler } from '@element-editor/ui';
|
|
5
|
+
import { FeatureStyleFn } from './contexts/FeatureStyleContext.cjs';
|
|
6
|
+
export declare function useMapLibre(): MapLibreMap;
|
|
7
|
+
/** Like `useMapLibre` but returns null outside ElementEditorControls. */
|
|
8
|
+
export declare const useOptionalMapLibre: () => MapLibreMap | null;
|
|
9
|
+
export type DrawingTool = 'polygon' | 'rectangle' | 'circle' | 'line' | 'point' | 'freehand' | 'route' | 'picker' | 'measure' | 'search';
|
|
10
|
+
export type { ImportResult };
|
|
11
|
+
/** Imperative handle exposed via `ref`. Same surface across adapters and `@element-editor/react`; `getMap()` returns the `maplibregl.Map`. */
|
|
12
|
+
export type ElementEditorControlsRef = ElementEditorImperativeAPI<MapLibreMap>;
|
|
13
|
+
export interface ElementEditorControlsProps {
|
|
14
|
+
/**
|
|
15
|
+
* The MapLibre GL map instance. Pass it as soon as it exists: Element waits until the style can
|
|
16
|
+
* take sources before it adds its layers (and puts them back after every `map.setStyle()`).
|
|
17
|
+
*/
|
|
18
|
+
map: MapLibreMap;
|
|
19
|
+
/** Pre-populate the editor with an existing FeatureCollection. Applied once on mount. */
|
|
20
|
+
initialData?: FeatureCollectionInput | GeoJSONFeatureInput | null;
|
|
21
|
+
/**
|
|
22
|
+
* Optional single Schema pushed into the store on mount. Safe to pass a
|
|
23
|
+
* stable object — re-renders that keep the same `schema.id` are no-ops.
|
|
24
|
+
*/
|
|
25
|
+
schema?: Schema;
|
|
26
|
+
/** Called after every committed change with the full current FeatureCollection. */
|
|
27
|
+
onChange?: (data: FeatureCollection) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Called by `ref.submit()` when all features pass validation. Receives a
|
|
30
|
+
* clean FeatureCollection (stripped of `_validation`).
|
|
31
|
+
*/
|
|
32
|
+
onSubmit?: (data: FeatureCollection) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Called by `ref.submit()` when one or more features have validation
|
|
35
|
+
* errors. Blocks `onSubmit` from firing.
|
|
36
|
+
*/
|
|
37
|
+
onValidationError?: (errors: Record<string, string[]>) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Receives every message the editor would show the user: `feature:deleted` / `features:deleted`
|
|
40
|
+
* (with `undo`), `feature:duplicated` / `features:duplicated`, `feature:broken`,
|
|
41
|
+
* `selection:copied`, `selection:pasted`, `undo`, `redo`, `error`, `warning` and `success`.
|
|
42
|
+
* When provided, the built-in toasts are suppressed: display them yourself. Tool changes and data
|
|
43
|
+
* commits are not events (use `onToolChange` and `onChange`). Wraps an EventProvider locally so
|
|
44
|
+
* you don't need a separate `<ElementEditorUIProvider onEvent={...}>`.
|
|
45
|
+
*/
|
|
46
|
+
onEvent?: (event: ElementEditorEvent) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Called first for every runtime failure with an `ElementEditorError` (`code`, `source`, honest
|
|
49
|
+
* English `message`): basemap, picker, routing, search, import, geometry, clipboard, `maxFeatures`.
|
|
50
|
+
* Return `false` to stop the built-in toast / `onEvent` error event, or a string to show that text
|
|
51
|
+
* instead. Wraps a local EventProvider (with `onEvent`) or hands on to the enclosing one.
|
|
52
|
+
*/
|
|
53
|
+
onError?: ElementEditorErrorHandler;
|
|
54
|
+
/**
|
|
55
|
+
* Structural layout hint read by `@element-editor/ui` panels.
|
|
56
|
+
* `'panel'` / `'split'` / `'minimal'`. Defaults to `'panel'`.
|
|
57
|
+
*/
|
|
58
|
+
layout?: 'panel' | 'minimal' | 'split';
|
|
59
|
+
/**
|
|
60
|
+
* MapLibre `maxBounds` — restricts panning. A GeoJSON bbox `[west, south, east, north]`
|
|
61
|
+
* or MapLibre's `[[west, south], [east, north]]` (both `[lng, lat]`). `null` clears.
|
|
62
|
+
*/
|
|
63
|
+
maxBounds?: [number, number, number, number] | [[number, number], [number, number]] | null;
|
|
64
|
+
/** Restrict which drawing tools are available. Omit to allow all. */
|
|
65
|
+
tools?: DrawingTool[];
|
|
66
|
+
/** Maximum number of features allowed. */
|
|
67
|
+
maxFeatures?: number;
|
|
68
|
+
/** When true, all editing interactions are disabled. */
|
|
69
|
+
readonly?: boolean;
|
|
70
|
+
/** Called when a feature is added. */
|
|
71
|
+
onFeatureAdd?: (feature: GeoJSONFeature) => void;
|
|
72
|
+
/** Called when a feature's geometry or properties are updated. */
|
|
73
|
+
onFeatureUpdate?: (id: string, feature: GeoJSONFeature) => void;
|
|
74
|
+
/** Called when a feature is deleted. */
|
|
75
|
+
onFeatureDelete?: (id: string) => void;
|
|
76
|
+
/** Called when the selection changes. Fires with the array of selected feature ids. */
|
|
77
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Called with the single selected feature (or `null` when deselected or
|
|
80
|
+
* multi-selected). Convenience variant of `onSelectionChange`.
|
|
81
|
+
*/
|
|
82
|
+
onFeatureSelect?: (feature: GeoJSONFeature | null) => void;
|
|
83
|
+
/** Called when the map's zoom level changes. */
|
|
84
|
+
onZoomChange?: (zoom: number) => void;
|
|
85
|
+
/** Called with the tool that turned on (as `ref.getTool()` reports it), or `null` when it turned off. */
|
|
86
|
+
onToolChange?: (tool: DrawingTool | null) => void;
|
|
87
|
+
/**
|
|
88
|
+
* Optional per-feature style callback. Return a `FeatureStyle` ({ color,
|
|
89
|
+
* fillColor, opacity, fillOpacity, weight }) to override the default paint
|
|
90
|
+
* for that feature. Wins over `config.featureColor` per key; the selected
|
|
91
|
+
* look still takes precedence and hover keeps the colour. Re-run whenever features change, and on a new
|
|
92
|
+
* function identity (keep it stable: module-level or `useCallback`).
|
|
93
|
+
*/
|
|
94
|
+
getFeatureStyle?: FeatureStyleFn;
|
|
95
|
+
/** @deprecated Use `config.network.routing.apiKey` (it wins over this). OpenRouteService key for the Route tool. */
|
|
96
|
+
routingApiKey?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Called once per map, as soon as Element's sources and layers (`elm-*`) are on it: the place to
|
|
99
|
+
* add your own layers (pass an `elm-*` id as `beforeId` to put yours under Element's). Basemap
|
|
100
|
+
* switches through `setBasemap` / `BasemapControl` keep them. Your own `map.setStyle` drops them;
|
|
101
|
+
* Element puts its own layers back on top by itself, and a `style.load` listener you add here runs
|
|
102
|
+
* after that, so it can re-add yours (with an `elm-*` `beforeId` if you like). Element never moves
|
|
103
|
+
* the map on mount; fit your data with `ref.fitBounds` if you want that.
|
|
104
|
+
*/
|
|
105
|
+
onReady?: (map: MapLibreMap) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Optional UI components rendered inside MapControllerProvider alongside the map layers.
|
|
108
|
+
* Use this to place @element-editor/ui panels (LayersPanel, DataTablePanel, FloatingToolbar, etc.)
|
|
109
|
+
* so they have access to useMapController for fit-bounds and fly-to operations.
|
|
110
|
+
*/
|
|
111
|
+
children?: React.ReactNode;
|
|
112
|
+
}
|
|
113
|
+
export declare const ElementEditorControls: React.ForwardRefExoticComponent<ElementEditorControlsProps & React.RefAttributes<ElementEditorControlsRef>>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Map as MapLibreMap } from 'maplibre-gl';
|
|
3
|
+
import { FeatureCollection, FeatureCollectionInput, GeoJSONFeature, GeoJSONFeatureInput, Schema } from '@element-editor/core';
|
|
4
|
+
import { ElementEditorImperativeAPI, ImportResult, ElementEditorEvent, ElementEditorErrorHandler } from '@element-editor/ui';
|
|
5
|
+
import { FeatureStyleFn } from './contexts/FeatureStyleContext.js';
|
|
6
|
+
export declare function useMapLibre(): MapLibreMap;
|
|
7
|
+
/** Like `useMapLibre` but returns null outside ElementEditorControls. */
|
|
8
|
+
export declare const useOptionalMapLibre: () => MapLibreMap | null;
|
|
9
|
+
export type DrawingTool = 'polygon' | 'rectangle' | 'circle' | 'line' | 'point' | 'freehand' | 'route' | 'picker' | 'measure' | 'search';
|
|
10
|
+
export type { ImportResult };
|
|
11
|
+
/** Imperative handle exposed via `ref`. Same surface across adapters and `@element-editor/react`; `getMap()` returns the `maplibregl.Map`. */
|
|
12
|
+
export type ElementEditorControlsRef = ElementEditorImperativeAPI<MapLibreMap>;
|
|
13
|
+
export interface ElementEditorControlsProps {
|
|
14
|
+
/**
|
|
15
|
+
* The MapLibre GL map instance. Pass it as soon as it exists: Element waits until the style can
|
|
16
|
+
* take sources before it adds its layers (and puts them back after every `map.setStyle()`).
|
|
17
|
+
*/
|
|
18
|
+
map: MapLibreMap;
|
|
19
|
+
/** Pre-populate the editor with an existing FeatureCollection. Applied once on mount. */
|
|
20
|
+
initialData?: FeatureCollectionInput | GeoJSONFeatureInput | null;
|
|
21
|
+
/**
|
|
22
|
+
* Optional single Schema pushed into the store on mount. Safe to pass a
|
|
23
|
+
* stable object — re-renders that keep the same `schema.id` are no-ops.
|
|
24
|
+
*/
|
|
25
|
+
schema?: Schema;
|
|
26
|
+
/** Called after every committed change with the full current FeatureCollection. */
|
|
27
|
+
onChange?: (data: FeatureCollection) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Called by `ref.submit()` when all features pass validation. Receives a
|
|
30
|
+
* clean FeatureCollection (stripped of `_validation`).
|
|
31
|
+
*/
|
|
32
|
+
onSubmit?: (data: FeatureCollection) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Called by `ref.submit()` when one or more features have validation
|
|
35
|
+
* errors. Blocks `onSubmit` from firing.
|
|
36
|
+
*/
|
|
37
|
+
onValidationError?: (errors: Record<string, string[]>) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Receives every message the editor would show the user: `feature:deleted` / `features:deleted`
|
|
40
|
+
* (with `undo`), `feature:duplicated` / `features:duplicated`, `feature:broken`,
|
|
41
|
+
* `selection:copied`, `selection:pasted`, `undo`, `redo`, `error`, `warning` and `success`.
|
|
42
|
+
* When provided, the built-in toasts are suppressed: display them yourself. Tool changes and data
|
|
43
|
+
* commits are not events (use `onToolChange` and `onChange`). Wraps an EventProvider locally so
|
|
44
|
+
* you don't need a separate `<ElementEditorUIProvider onEvent={...}>`.
|
|
45
|
+
*/
|
|
46
|
+
onEvent?: (event: ElementEditorEvent) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Called first for every runtime failure with an `ElementEditorError` (`code`, `source`, honest
|
|
49
|
+
* English `message`): basemap, picker, routing, search, import, geometry, clipboard, `maxFeatures`.
|
|
50
|
+
* Return `false` to stop the built-in toast / `onEvent` error event, or a string to show that text
|
|
51
|
+
* instead. Wraps a local EventProvider (with `onEvent`) or hands on to the enclosing one.
|
|
52
|
+
*/
|
|
53
|
+
onError?: ElementEditorErrorHandler;
|
|
54
|
+
/**
|
|
55
|
+
* Structural layout hint read by `@element-editor/ui` panels.
|
|
56
|
+
* `'panel'` / `'split'` / `'minimal'`. Defaults to `'panel'`.
|
|
57
|
+
*/
|
|
58
|
+
layout?: 'panel' | 'minimal' | 'split';
|
|
59
|
+
/**
|
|
60
|
+
* MapLibre `maxBounds` — restricts panning. A GeoJSON bbox `[west, south, east, north]`
|
|
61
|
+
* or MapLibre's `[[west, south], [east, north]]` (both `[lng, lat]`). `null` clears.
|
|
62
|
+
*/
|
|
63
|
+
maxBounds?: [number, number, number, number] | [[number, number], [number, number]] | null;
|
|
64
|
+
/** Restrict which drawing tools are available. Omit to allow all. */
|
|
65
|
+
tools?: DrawingTool[];
|
|
66
|
+
/** Maximum number of features allowed. */
|
|
67
|
+
maxFeatures?: number;
|
|
68
|
+
/** When true, all editing interactions are disabled. */
|
|
69
|
+
readonly?: boolean;
|
|
70
|
+
/** Called when a feature is added. */
|
|
71
|
+
onFeatureAdd?: (feature: GeoJSONFeature) => void;
|
|
72
|
+
/** Called when a feature's geometry or properties are updated. */
|
|
73
|
+
onFeatureUpdate?: (id: string, feature: GeoJSONFeature) => void;
|
|
74
|
+
/** Called when a feature is deleted. */
|
|
75
|
+
onFeatureDelete?: (id: string) => void;
|
|
76
|
+
/** Called when the selection changes. Fires with the array of selected feature ids. */
|
|
77
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Called with the single selected feature (or `null` when deselected or
|
|
80
|
+
* multi-selected). Convenience variant of `onSelectionChange`.
|
|
81
|
+
*/
|
|
82
|
+
onFeatureSelect?: (feature: GeoJSONFeature | null) => void;
|
|
83
|
+
/** Called when the map's zoom level changes. */
|
|
84
|
+
onZoomChange?: (zoom: number) => void;
|
|
85
|
+
/** Called with the tool that turned on (as `ref.getTool()` reports it), or `null` when it turned off. */
|
|
86
|
+
onToolChange?: (tool: DrawingTool | null) => void;
|
|
87
|
+
/**
|
|
88
|
+
* Optional per-feature style callback. Return a `FeatureStyle` ({ color,
|
|
89
|
+
* fillColor, opacity, fillOpacity, weight }) to override the default paint
|
|
90
|
+
* for that feature. Wins over `config.featureColor` per key; the selected
|
|
91
|
+
* look still takes precedence and hover keeps the colour. Re-run whenever features change, and on a new
|
|
92
|
+
* function identity (keep it stable: module-level or `useCallback`).
|
|
93
|
+
*/
|
|
94
|
+
getFeatureStyle?: FeatureStyleFn;
|
|
95
|
+
/** @deprecated Use `config.network.routing.apiKey` (it wins over this). OpenRouteService key for the Route tool. */
|
|
96
|
+
routingApiKey?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Called once per map, as soon as Element's sources and layers (`elm-*`) are on it: the place to
|
|
99
|
+
* add your own layers (pass an `elm-*` id as `beforeId` to put yours under Element's). Basemap
|
|
100
|
+
* switches through `setBasemap` / `BasemapControl` keep them. Your own `map.setStyle` drops them;
|
|
101
|
+
* Element puts its own layers back on top by itself, and a `style.load` listener you add here runs
|
|
102
|
+
* after that, so it can re-add yours (with an `elm-*` `beforeId` if you like). Element never moves
|
|
103
|
+
* the map on mount; fit your data with `ref.fitBounds` if you want that.
|
|
104
|
+
*/
|
|
105
|
+
onReady?: (map: MapLibreMap) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Optional UI components rendered inside MapControllerProvider alongside the map layers.
|
|
108
|
+
* Use this to place @element-editor/ui panels (LayersPanel, DataTablePanel, FloatingToolbar, etc.)
|
|
109
|
+
* so they have access to useMapController for fit-bounds and fly-to operations.
|
|
110
|
+
*/
|
|
111
|
+
children?: React.ReactNode;
|
|
112
|
+
}
|
|
113
|
+
export declare const ElementEditorControls: React.ForwardRefExoticComponent<ElementEditorControlsProps & React.RefAttributes<ElementEditorControlsRef>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Map as MapLibreMap, StyleSpecification } from 'maplibre-gl';
|
|
2
|
+
/** Layer and source ids that belong to the map's current basemap (not Element's, not the host's). */
|
|
3
|
+
export interface BasemapIds {
|
|
4
|
+
layers: Set<string>;
|
|
5
|
+
sources: Set<string>;
|
|
6
|
+
}
|
|
7
|
+
/** The recorded basemap ids of `map`, or undefined when none were recorded. */
|
|
8
|
+
export declare const getBasemapIds: (map: MapLibreMap) => BasemapIds | undefined;
|
|
9
|
+
/** Records the non-`elm-*` layers and sources of `style` as the basemap of `map`. */
|
|
10
|
+
export declare function rememberBasemap(map: MapLibreMap, style: Pick<StyleSpecification, 'layers' | 'sources'> | undefined): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Map as MapLibreMap, StyleSpecification } from 'maplibre-gl';
|
|
2
|
+
/** Layer and source ids that belong to the map's current basemap (not Element's, not the host's). */
|
|
3
|
+
export interface BasemapIds {
|
|
4
|
+
layers: Set<string>;
|
|
5
|
+
sources: Set<string>;
|
|
6
|
+
}
|
|
7
|
+
/** The recorded basemap ids of `map`, or undefined when none were recorded. */
|
|
8
|
+
export declare const getBasemapIds: (map: MapLibreMap) => BasemapIds | undefined;
|
|
9
|
+
/** Records the non-`elm-*` layers and sources of `style` as the basemap of `map`. */
|
|
10
|
+
export declare function rememberBasemap(map: MapLibreMap, style: Pick<StyleSpecification, 'layers' | 'sources'> | undefined): void;
|