Remove rasters in inspect style

This commit is contained in:
Lukas Martinelli 2017-01-10 19:14:14 +01:00
parent f0d04bdb07
commit cb4fdb0f9f

View file

@ -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