mirror of
https://github.com/maputnik/editor.git
synced 2025-12-28 09:00:02 +00:00
Remove rasters in inspect style
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user