Add MapLibre GL v6.10.0 source map files
Downloads the missing .mjs.map source map files for: - maplibre-gl-shared.mjs (2.4M) - maplibre-gl.mjs (2.5M) - maplibre-gl-worker.mjs (84K) These source maps enable browser DevTools debugging of MapLibre GL code and resolve 404 errors for source map requests. Source: https://cdn.jsdelivr.net/npm/maplibre-gl@6.10.0/dist/
This commit is contained in:
1 parent
46add3f003
commit
7301e9b543
3 files changed
+3
No files matched your search
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"maplibre-gl-worker.mjs","names":[],"sources":["../node_modules/@maplibre/maplibre-gl-style-spec/dist/group_by_layout.mjs","../src/style/style_layer_index.ts","../src/render/glyph_atlas.ts","../src/source/worker_tile.ts","../src/source/worker_tile_state.ts","../src/util/request_performance.ts","../src/source/vector_tile_overzoomed.ts","../src/source/vector_tile_worker_source.ts","../src/source/raster_dem_tile_worker_source.ts","../src/source/geojson_worker_source.ts","../src/source/worker.ts"],"sourcesContent":["import { refProperties } from \"./util/ref_properties.mjs\";\n//#region src/group_by_layout.ts\nfunction stringify(obj) {\n\tconst type = typeof obj;\n\tif (type === \"number\" || type === \"boolean\" || type === \"string\" || obj === void 0 || obj === null) return JSON.stringify(obj);\n\tif (Array.isArray(obj)) {\n\t\tlet str = \"[\";\n\t\tfor (const val of obj) str += `${stringify(val)},`;\n\t\treturn `${str}]`;\n\t}\n\tconst keys = Object.keys(obj).sort();\n\tlet str = \"{\";\n\tfor (let i = 0; i < keys.length; i++) str += `${JSON.stringify(keys[i])}:${stringify(obj[keys[i]])},`;\n\treturn `${str}}`;\n}\nfunction getKey(layer) {\n\tlet key = \"\";\n\tfor (const k of refProperties) key += `/${stringify(layer[k])}`;\n\treturn key;\n}\n/**\n* Groups layers by their layout-affecting properties.\n* These are the properties that were formerly used by explicit `ref` mechanism\n* for layers: 'type', 'source', 'source-layer', 'minzoom', 'maxzoom',\n* 'filter', and 'layout'.\n*\n* The input is not modified. The output layers are references to the\n* input layers.\n*\n* @param layers - an array of {@link LayerSpecification}.\n* @param cachedKeys - an object to keep already calculated keys.\n* @returns an array of arrays of {@link LayerSpecification} objects, where each inner array\n* contains layers that share the same layout-affecting properties.\n*/\nfunction groupByLayout(layers, cachedKeys) {\n\tconst groups = {};\n\tfor (let i = 0; i < layers.length; i++) {\n\t\tconst k = cachedKeys && cachedKeys[layers[i].id] || getKey(layers[i]);\n\t\tif (cachedKeys) cachedKeys[layers[i].id] = k;\n\t\tlet group = groups[k];\n\t\tif (!group) group = groups[k] = [];\n\t\tgroup.push(layers[i]);\n\t}\n\tconst result = [];\n\tfor (const k in groups) result.push(groups[k]);\n\treturn result;\n}\n//#endregion\nexport { groupByLayout };\n\n//# sourceMappingURL=group_by_layout.mjs.map","import {createStyleLayer} from './create_style_layer.ts';\nimport {featureFilter, groupByLayout} from '@maplibre/maplibre-gl-style-spec';\nimport {GEOJSON_TILE_LAYER_NAME} from '../data/feature_index.ts';\n\nimport type {StyleLayer} from './style_layer.ts';\nimport type {LayerSpecification} from '@maplibre/maplibre-gl-style-spec';\n\nexport type LayerConfigs = {[_: string]: LayerSpecification};\n\nexport class StyleLayerIndex {\n familiesBySource: {\n [source: string]: {\n [sourceLayer: string]: StyleLayer[][];\n };\n };\n keyCache: {[source: string]: string};\n\n _layerConfigs: LayerConfigs;\n _layers: {[_: string]: StyleLayer};\n\n constructor(layerConfigs?: LayerSpecification[] | null, globalState?: Record<string, any>) {\n this.keyCache = {};\n if (layerConfigs) {\n this.replace(layerConfigs, globalState);\n }\n }\n\n replace(layerConfigs: LayerSpecification[], globalState?: Record<string, any>): void {\n this._layerConfigs = {};\n this._layers = {};\n this.update(layerConfigs, [], globalState);\n }\n\n update(layerConfigs: LayerSpecification[], removedIds: string[], globalState?: Record<string, any>): void {\n for (const layerConfig of layerConfigs) {\n this._layerConfigs[layerConfig.id] = layerConfig;\n\n const layer = this._layers[layerConfig.id] = createStyleLayer(layerConfig, globalState);\n layer._featureFilter = featureFilter(layer.filter, `layers[${layerConfig.id}].filter`, globalState);\n if (this.keyCache[layerConfig.id])\n delete this.keyCache[layerConfig.id];\n }\n for (const id of removedIds) {\n delete this.keyCache[id];\n delete this._layerConfigs[id];\n delete this._layers[id];\n }\n\n this.familiesBySource = {};\n\n const groups = groupByLayout(Object.values(this._layerConfigs), this.keyCache);\n\n for (const layerConfigs of groups) {\n const layers = layerConfigs.map((layerConfig) => this._layers[layerConfig.id]);\n\n const layer = layers[0];\n if (layer.isHidden()) {\n continue;\n }\n\n const sourceId = layer.source || '';\n let sourceGroup = this.familiesBySource[sourceId];\n sourceGroup ||= this.familiesBySource[sourceId] = {};\n\n const sourceLayerId = layer.sourceLayer || GEOJSON_TILE_LAYER_NAME;\n let sourceLayerFamilies = sourceGroup[sourLine truncated
|
||||
Reference in new issue
Block a user