addFeatureInternal(feature) {
    const featureKey = getUid(feature);

    if (!this.addToIndex_(featureKey, feature)) {
      if (this.featuresCollection_) {
        this.featuresCollection_.remove(feature);
      }
      return;
    }

    this.setupChangeEvents_(featureKey, feature);

    const geometry = feature.getGeometry();
    if (geometry) {
      const extent = geometry.getExtent();
      if (this.featuresRtree_) {
        this.featuresRtree_.insert(extent, feature);
      }
    } else {
      this.nullGeometryFeatures_[featureKey] = feature;
    }

    this.dispatchEvent(
      new VectorSourceEvent(VectorEventType.ADDFEATURE, feature)
    );
  }
/**
   * Add a feature without firing a `change` event.
   * @param {import("../Feature.js").default<Geometry>} feature Feature.
   * @protected
   */
Add a feature without firing a `change` event.
Add a feature without firing a ` change ` event .
addFeatureInternal(feature) {
    const featureKey = getUid(feature);
    if (!this.addToIndex_(featureKey, feature)) {
      if (this.featuresCollection_) {
        this.featuresCollection_.remove(feature);
      }
      return;
    }
    this.setupChangeEvents_(featureKey, feature);
    const geometry = feature.getGeometry();
    if (geometry) {
      const extent = geometry.getExtent();
      if (this.featuresRtree_) {
        this.featuresRtree_.insert(extent, feature);
      }
    } else {
      this.nullGeometryFeatures_[featureKey] = feature;
    }
    this.dispatchEvent(
      new VectorSourceEvent(VectorEventType.ADDFEATURE, feature)
    );
  }
addFeatureInternal ( feature ) { const featureKey = getUid ( feature ) ; if ( ! this . addToIndex_ ( featureKey , feature ) ) { if ( this . featuresCollection_ ) { this . featuresCollection_ . remove ( feature ) ; } return ; } this . setupChangeEvents_ ( featureKey , feature ) ; const geometry = feature . getGeometry ( ) ; if ( geometry ) { const extent = geometry . getExtent ( ) ; if ( this . featuresRtree_ ) { this . featuresRtree_ . insert ( extent , feature ) ; } } else { this . nullGeometryFeatures_ [ featureKey ] = feature ; } this . dispatchEvent ( new VectorSourceEvent ( VectorEventType . ADDFEATURE , feature ) ) ; }
Add a feature without firing a `change` event.
Add a feature without firing a ` change ` event .