diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index cc7d97d..f931fe1 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -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