removeSources() {
    if (!this.mapboxLayer.mbMap) {
      return;
    }
    const { mbMap } = this.mapboxLayer;
    this.sources.forEach((source) => {
      const { id } = source;
      if (mbMap.getSource(id)) {
        mbMap.removeSource(id);
      }
    });
  }
// Remove sources added by addSources().
Remove sources added by addSources().
Remove sources added by addSources () .
removeSources() {
    if (!this.mapboxLayer.mbMap) {
      return;
    }
    const { mbMap } = this.mapboxLayer;
    this.sources.forEach((source) => {
      const { id } = source;
      if (mbMap.getSource(id)) {
        mbMap.removeSource(id);
      }
    });
  }
removeSources ( ) { if ( ! this . mapboxLayer . mbMap ) { return ; } const { mbMap } = this . mapboxLayer ; this . sources . forEach ( ( source ) => { const { id } = source ; if ( mbMap . getSource ( id ) ) { mbMap . removeSource ( id ) ; } } ) ; }
Remove sources added by addSources().
Remove sources added by addSources () .