From b8b25d2a21ae9f12e7e9834e82fa9fb91f104174 Mon Sep 17 00:00:00 2001 From: luoxiao Date: Mon, 14 Oct 2024 16:33:18 +0800 Subject: [PATCH] [fix]ts-lint --- src/mapboxgl/_utils/HightlighLayer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mapboxgl/_utils/HightlighLayer.ts b/src/mapboxgl/_utils/HightlighLayer.ts index cf7a6fd3..1b9d2670 100644 --- a/src/mapboxgl/_utils/HightlighLayer.ts +++ b/src/mapboxgl/_utils/HightlighLayer.ts @@ -2,6 +2,7 @@ import mapboxgl from 'vue-iclient/static/libs/mapboxgl/mapbox-gl-enhance'; import CircleStyle from 'vue-iclient/src/mapboxgl/_types/CircleStyle'; import LineStyle from 'vue-iclient/src/mapboxgl/_types/LineStyle'; import FillStyle from 'vue-iclient/src/mapboxgl/_types/FillStyle'; +import { AnyLayer } from 'mapbox-gl'; interface HighlightStyle { circle: InstanceType; @@ -185,7 +186,7 @@ export default class HighlightLayer extends mapboxgl.Evented { layout: Object.assign({}, LAYER_DEFAULT_STYLE[type].layout, layerStyle?.layout), filter }); - this.map.addLayer(highlightLayer); + this.map.addLayer(highlightLayer as AnyLayer); this.targetLayerIds.push(id); this.targetLayerIds = this._uniqueLayerIds(this.targetLayerIds); } @@ -198,7 +199,7 @@ export default class HighlightLayer extends mapboxgl.Evented { layout: Object.assign({}, LAYER_DEFAULT_STYLE['strokeLine'].layout, layerStyle?.layout), filter }); - this.map.addLayer(highlightLayer); + this.map.addLayer(highlightLayer as AnyLayer); } }