mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:05:25 +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)
|
||||
}
|
||||
|
||||
const sources = {}
|
||||
Object.keys(originalMapStyle.sources).forEach(sourceId => {
|
||||
const source = originalMapStyle.sources[sourceId]
|
||||
if(source.type !== 'raster') {
|
||||
sources[sourceId] = source
|
||||
}
|
||||
})
|
||||
|
||||
const inspectStyle = {
|
||||
...originalMapStyle,
|
||||
sources: sources,
|
||||
layers: [backgroundLayer].concat(coloredLayers)
|
||||
}
|
||||
return inspectStyle
|
||||
|
|
Loading…
Reference in a new issue