updateSource() {
    const { mbMap } = this.mapboxLayer;
    const source = mbMap.getSource(this.source.id);

    if (!this.osmPointsLayers || !source) {
      return;
    }

    const osmPointsRendered = mbMap
      .queryRenderedFeatures({
        layers: this.osmPointsLayers,
      })
      .map((feat) => {
        const good = {
          id: feat.id * 1000,
          type: feat.type,
          properties: feat.properties,
          geometry: feat.geometry,
        };
        return good;
      });

    source.setData({
      type: 'FeatureCollection',
      features: osmPointsRendered,
    });
  }
// Query the rendered stations then add them to the source.
Query the rendered stations then add them to the source.
Query the rendered stations then add them to the source .
updateSource() {
    const { mbMap } = this.mapboxLayer;
    const source = mbMap.getSource(this.source.id);
    if (!this.osmPointsLayers || !source) {
      return;
    }
    const osmPointsRendered = mbMap
      .queryRenderedFeatures({
        layers: this.osmPointsLayers,
      })
      .map((feat) => {
        const good = {
          id: feat.id * 1000,
          type: feat.type,
          properties: feat.properties,
          geometry: feat.geometry,
        };
        return good;
      });
    source.setData({
      type: 'FeatureCollection',
      features: osmPointsRendered,
    });
  }
updateSource ( ) { const { mbMap } = this . mapboxLayer ; const source = mbMap . getSource ( this . source . id ) ; if ( ! this . osmPointsLayers || ! source ) { return ; } const osmPointsRendered = mbMap . queryRenderedFeatures ( { layers : this . osmPointsLayers , } ) . map ( ( feat ) => { const good = { id : feat . id * 1000 , type : feat . type , properties : feat . properties , geometry : feat . geometry , } ; return good ; } ) ; source . setData ( { type : 'FeatureCollection' , features : osmPointsRendered , } ) ; }
Query the rendered stations then add them to the source.
Query the rendered stations then add them to the source .