onLoad() {
    const { mbMap } = this.mapboxLayer;
    const source = mbMap.getSource(sourceId);
    if (!source) {
      mbMap.addSource(sourceId, {
        type: 'vector',
        url: this.dataUrl,
      });
    }

    // if the selected lines as extra sources we add it now.
    Object.entries(lines).forEach(([key, { property, extraSources }]) => {
      if (property !== this.property || !extraSources) {
        return;
      }

      Object.entries(extraSources).forEach(([sourceKey, sourceToAdd]) => {
        if (!mbMap.getSource(sourceKey)) {
          // First we add a property to the features so the lines will be automatically highlighted.
          sourceToAdd.data.features.forEach((feat) => {
            // eslint-disable-next-line no-param-reassign
            feat.properties[this.property] = key;
          });
          mbMap.addSource(sourceKey, sourceToAdd);
        }
      });
    });
    super.onLoad();
  }
/**
   * On Mapbox map load callback function. Add the zweitausbildung data source then style layers.
   * @ignore
   */
On Mapbox map load callback function. Add the zweitausbildung data source then style layers.
@ignore
On Mapbox map load callback function . Add the zweitausbildung data source then style layers . @ignore
onLoad() {
    const { mbMap } = this.mapboxLayer;
    const source = mbMap.getSource(sourceId);
    if (!source) {
      mbMap.addSource(sourceId, {
        type: 'vector',
        url: this.dataUrl,
      });
    }
    Object.entries(lines).forEach(([key, { property, extraSources }]) => {
      if (property !== this.property || !extraSources) {
        return;
      }
      Object.entries(extraSources).forEach(([sourceKey, sourceToAdd]) => {
        if (!mbMap.getSource(sourceKey)) {
          sourceToAdd.data.features.forEach((feat) => {
            feat.properties[this.property] = key;
          });
          mbMap.addSource(sourceKey, sourceToAdd);
        }
      });
    });
    super.onLoad();
  }
onLoad ( ) { const { mbMap } = this . mapboxLayer ; const source = mbMap . getSource ( sourceId ) ; if ( ! source ) { mbMap . addSource ( sourceId , { type : 'vector' , url : this . dataUrl , } ) ; } Object . entries ( lines ) . forEach ( ( [ key , { property , extraSources } ] ) => { if ( property !== this . property || ! extraSources ) { return ; } Object . entries ( extraSources ) . forEach ( ( [ sourceKey , sourceToAdd ] ) => { if ( ! mbMap . getSource ( sourceKey ) ) { sourceToAdd . data . features . forEach ( ( feat ) => { feat . properties [ this . property ] = key ; } ) ; mbMap . addSource ( sourceKey , sourceToAdd ) ; } } ) ; } ) ; super . onLoad ( ) ; }
On Mapbox map load callback function.
On Mapbox map load callback function .
// if the selected lines as extra sources we add it now. // First we add a property to the features so the lines will be automatically highlighted. // eslint-disable-next-line no-param-reassign