@carto/api-client 0.5.28 → 0.5.30-alpha.143d135.117

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,11 @@
84
84
  }
85
85
  });
86
86
 
87
+ // src/types.ts
88
+ function isSpatialIndexFilter(spatialFilter) {
89
+ return Array.isArray(spatialFilter.indexes);
90
+ }
91
+
87
92
  // src/constants.ts
88
93
  var FilterType = /* @__PURE__ */ ((FilterType2) => {
89
94
  FilterType2["IN"] = "in";
@@ -20745,16 +20750,17 @@
20745
20750
  this._features.length = 0;
20746
20751
  }
20747
20752
  _extractTileFeatures(spatialFilter) {
20753
+ const geometryFilter = spatialFilter && !isSpatialIndexFilter(spatialFilter) ? spatialFilter : void 0;
20748
20754
  const prevInputs = this._tileFeatureExtractPreviousInputs;
20749
- if (this._features.length && spatialFilterEquals(prevInputs.spatialFilter, spatialFilter)) {
20755
+ if (this._features.length && spatialFilterEquals(prevInputs.spatialFilter, geometryFilter)) {
20750
20756
  return;
20751
20757
  }
20752
20758
  this._features = tileFeatures({
20753
20759
  ...assignOptional({}, this.props, this._tileFeatureExtractOptions),
20754
20760
  tiles: this._tiles,
20755
- spatialFilter
20761
+ spatialFilter: geometryFilter
20756
20762
  });
20757
- prevInputs.spatialFilter = spatialFilter;
20763
+ prevInputs.spatialFilter = geometryFilter;
20758
20764
  }
20759
20765
  /**
20760
20766
  * Loads features as GeoJSON (used for testing).