@carto/api-client 0.5.30-alpha.3cf7d80.116 → 0.5.30-alpha.bdcd62f.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,12 @@
84
84
  }
85
85
  });
86
86
 
87
+ // src/types.ts
88
+ function isSpatialIndexFilter(spatialFilter) {
89
+ const filter = spatialFilter;
90
+ return Array.isArray(filter?.indexes) && ["h3", "h3int", "quadbin"].includes(filter?.type);
91
+ }
92
+
87
93
  // src/constants.ts
88
94
  var FilterType = /* @__PURE__ */ ((FilterType2) => {
89
95
  FilterType2["IN"] = "in";
@@ -20745,16 +20751,17 @@
20745
20751
  this._features.length = 0;
20746
20752
  }
20747
20753
  _extractTileFeatures(spatialFilter) {
20754
+ const geometryFilter = spatialFilter && !isSpatialIndexFilter(spatialFilter) ? spatialFilter : void 0;
20748
20755
  const prevInputs = this._tileFeatureExtractPreviousInputs;
20749
- if (this._features.length && spatialFilterEquals(prevInputs.spatialFilter, spatialFilter)) {
20756
+ if (this._features.length && spatialFilterEquals(prevInputs.spatialFilter, geometryFilter)) {
20750
20757
  return;
20751
20758
  }
20752
20759
  this._features = tileFeatures({
20753
20760
  ...assignOptional({}, this.props, this._tileFeatureExtractOptions),
20754
20761
  tiles: this._tiles,
20755
- spatialFilter
20762
+ spatialFilter: geometryFilter
20756
20763
  });
20757
- prevInputs.spatialFilter = spatialFilter;
20764
+ prevInputs.spatialFilter = geometryFilter;
20758
20765
  }
20759
20766
  /**
20760
20767
  * Loads features as GeoJSON (used for testing).