mirror of
https://github.com/maputnik/editor.git
synced 2026-08-24 14:07:33 +00:00
Remove rasters in inspect style
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user