diff --git a/src/components/MapMaplibreGl.tsx b/src/components/MapMaplibreGl.tsx index cf55ca0a..2b4d6085 100644 --- a/src/components/MapMaplibreGl.tsx +++ b/src/components/MapMaplibreGl.tsx @@ -176,7 +176,7 @@ export default class MapMaplibreGl extends React.Component { - return Color(colors.brightColor(layerId, alpha as any)).desaturate(0.5).string() + return Color(colors.brightColor(layerId, alpha)).desaturate(0.5).string() }, buildInspectStyle: (originalMapStyle: StyleSpecification, coloredLayers: HighlightedLayer[]) => buildInspectStyle(originalMapStyle, coloredLayers, this.props.highlightedLayer), renderPopup: (features: InspectFeature[]) => { diff --git a/src/libs/highlight.ts b/src/libs/highlight.ts index 1f6c6a34..511e35e6 100644 --- a/src/libs/highlight.ts +++ b/src/libs/highlight.ts @@ -24,7 +24,7 @@ export function colorHighlightedLayer(layer?: LayerSpecification): HighlightedLa if(!layer || layer.type === 'background' || layer.type === 'raster') return null const sourceLayerId = layer['source-layer'] || '' - const color = colors.brightColor(sourceLayerId, 1 as any); + const color = colors.brightColor(sourceLayerId, 1); if(layer.type === "fill" || layer.type === 'fill-extrusion') { return changeLayer(stylegen.polygonLayer(color, color, layer.source, layer['source-layer']), layer)