Remove unwanted "as any"

This commit is contained in:
HarelM
2024-03-13 22:34:32 +02:00
parent e7a9e8fbd0
commit 8e587b756d
2 changed files with 2 additions and 2 deletions

View File

@@ -176,7 +176,7 @@ export default class MapMaplibreGl extends React.Component<MapMaplibreGlProps, M
showInspectButton: false,
blockHoverPopupOnClick: true,
assignLayerColor: (layerId: string, alpha: number) => {
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[]) => {

View File

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