mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:11:17 +01:00
Remove rasters in inspect style
This commit is contained in:
parent
f0d04bdb07
commit
cb4fdb0f9f
1 changed files with 9 additions and 0 deletions
|
@ -37,8 +37,17 @@ function buildInspectStyle(originalMapStyle, coloredLayers, highlightedLayer) {
|
||||||
coloredLayers.push(layer)
|
coloredLayers.push(layer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sources = {}
|
||||||
|
Object.keys(originalMapStyle.sources).forEach(sourceId => {
|
||||||
|
const source = originalMapStyle.sources[sourceId]
|
||||||
|
if(source.type !== 'raster') {
|
||||||
|
sources[sourceId] = source
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const inspectStyle = {
|
const inspectStyle = {
|
||||||
...originalMapStyle,
|
...originalMapStyle,
|
||||||
|
sources: sources,
|
||||||
layers: [backgroundLayer].concat(coloredLayers)
|
layers: [backgroundLayer].concat(coloredLayers)
|
||||||
}
|
}
|
||||||
return inspectStyle
|
return inspectStyle
|
||||||
|
|
Loading…
Reference in a new issue