You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I add a layer, then remove it and add again I have the following error:
17:12:04.667 ERROR Error: There is already a source with this ID addSource mapbox-gl.js:35 addLayer mapbox-gl.js:35 addLayer mapbox-gl.js:35 addLayer ngx-mapbox-gl.js:215 Angular 3 addLayer ngx-mapbox-gl.js:208 init ngx-mapbox-gl.js:1526 sub ngx-mapbox-gl.js:1452 RxJS 33 ngOnInit ngx-mapbox-gl.js:1452 Angular 33 RxJS 5 Angular 22 GeojsonFeaturePickerComponent_ng_container_0_div_4_ng_container_7_button_4_Template geojson-feature-picker.component.html:35 Angular 23 [core.js:6210:12](webpack:///node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js) Angular 3 RxJS 5 Angular 20 RxJS 34 ngOnInit ngx-mapbox-gl.js:1452
By looking into the sorce code I can see that the layer is unregistered from mapbox but the connected source not. The connected source should be removed as well. Maybe there should be a flag to allow source unregistering in case other users use reusable sources.
The text was updated successfully, but these errors were encountered:
Hello.
I have a layer with dedicated/dynamic source. The layer is added using *ngIf.
<mgl-layer *ngIf="selectedFeature" id="selectedLayer" type="fill" [source]="{
type: 'geojson',
data: selectedFeature
}" [paint]="selectedPaint">
If I add a layer, then remove it and add again I have the following error:
17:12:04.667 ERROR Error: There is already a source with this ID addSource mapbox-gl.js:35 addLayer mapbox-gl.js:35 addLayer mapbox-gl.js:35 addLayer ngx-mapbox-gl.js:215 Angular 3 addLayer ngx-mapbox-gl.js:208 init ngx-mapbox-gl.js:1526 sub ngx-mapbox-gl.js:1452 RxJS 33 ngOnInit ngx-mapbox-gl.js:1452 Angular 33 RxJS 5 Angular 22 GeojsonFeaturePickerComponent_ng_container_0_div_4_ng_container_7_button_4_Template geojson-feature-picker.component.html:35 Angular 23 [core.js:6210:12](webpack:///node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js) Angular 3 RxJS 5 Angular 20 RxJS 34 ngOnInit ngx-mapbox-gl.js:1452
By looking into the sorce code I can see that the layer is unregistered from mapbox but the connected source not. The connected source should be removed as well. Maybe there should be a flag to allow source unregistering in case other users use reusable sources.
The text was updated successfully, but these errors were encountered: