Skip to content

Commit aa1c619

Browse files
committed
【feature】webmap3.0 可感知图层过滤轨迹图层line
1 parent 075e8fb commit aa1c619

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mapboxgl/mapping/webmap/v3/WebMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class WebMap extends mapboxgl.Evented {
135135
this._mapResourceInfo = {};
136136
this._sprite = '';
137137
this._spriteDatas = {};
138-
this.excludeSourceNames = ['tdt-search-', 'tdt-route-', 'smmeasure', 'mapbox-gl-draw'];
138+
this.excludeSourceNames = ['tdt-search-', 'tdt-route-', 'smmeasure', 'mapbox-gl-draw', /tracklayer-\d+-line/];
139139
this._appendLayers = false;
140140
this._baseProjection = '';
141141
}
@@ -470,7 +470,7 @@ export class WebMap extends mapboxgl.Evented {
470470

471471
excludeSource(key) {
472472
for (let i = 0; i < this.excludeSourceNames.length; i++) {
473-
if (key && key.indexOf(this.excludeSourceNames[i]) >= 0) {
473+
if (key && key.match(this.excludeSourceNames[i])) {
474474
return false;
475475
}
476476
}

0 commit comments

Comments
 (0)