Skip to content

Commit b8b25d2

Browse files
[fix]ts-lint
1 parent b00714c commit b8b25d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mapboxgl/_utils/HightlighLayer.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import mapboxgl from 'vue-iclient/static/libs/mapboxgl/mapbox-gl-enhance';
22
import CircleStyle from 'vue-iclient/src/mapboxgl/_types/CircleStyle';
33
import LineStyle from 'vue-iclient/src/mapboxgl/_types/LineStyle';
44
import FillStyle from 'vue-iclient/src/mapboxgl/_types/FillStyle';
5+
import { AnyLayer } from 'mapbox-gl';
56

67
interface HighlightStyle {
78
circle: InstanceType<typeof CircleStyle>;
@@ -185,7 +186,7 @@ export default class HighlightLayer extends mapboxgl.Evented {
185186
layout: Object.assign({}, LAYER_DEFAULT_STYLE[type].layout, layerStyle?.layout),
186187
filter
187188
});
188-
this.map.addLayer(highlightLayer);
189+
this.map.addLayer(highlightLayer as AnyLayer);
189190
this.targetLayerIds.push(id);
190191
this.targetLayerIds = this._uniqueLayerIds(this.targetLayerIds);
191192
}
@@ -198,7 +199,7 @@ export default class HighlightLayer extends mapboxgl.Evented {
198199
layout: Object.assign({}, LAYER_DEFAULT_STYLE['strokeLine'].layout, layerStyle?.layout),
199200
filter
200201
});
201-
this.map.addLayer(highlightLayer);
202+
this.map.addLayer(highlightLayer as AnyLayer);
202203
}
203204
}
204205

0 commit comments

Comments
 (0)