@carto/api-client 0.5.29 → 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.
- package/CHANGELOG.md +4 -0
- package/build/api-client.cjs +9 -3
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +30 -8
- package/build/api-client.d.ts +30 -8
- package/build/api-client.js +8 -3
- package/build/api-client.js.map +1 -1
- package/build/worker-compat.js +9 -3
- package/build/worker-compat.js.map +1 -1
- package/build/worker.js +9 -3
- package/build/worker.js.map +1 -1
- package/package.json +1 -1
- package/src/filters/geosjonFeatures.ts +2 -2
- package/src/filters/tileFeatures.ts +2 -2
- package/src/filters/tileFeaturesGeometries.ts +3 -3
- package/src/filters/tileFeaturesRaster.ts +2 -2
- package/src/filters/tileFeaturesSpatialIndex.ts +2 -2
- package/src/filters/tileIntersection.ts +7 -7
- package/src/types.ts +30 -1
- package/src/widget-sources/widget-tileset-source-impl.ts +25 -8
- package/src/widget-sources/widget-tileset-source.ts +2 -2
package/build/worker.js
CHANGED
|
@@ -76,6 +76,11 @@ var require_thenBy_module = __commonJS({
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
+
// src/types.ts
|
|
80
|
+
function isSpatialIndexFilter(spatialFilter) {
|
|
81
|
+
return Array.isArray(spatialFilter.indexes);
|
|
82
|
+
}
|
|
83
|
+
|
|
79
84
|
// src/constants.ts
|
|
80
85
|
var FilterType = /* @__PURE__ */ ((FilterType2) => {
|
|
81
86
|
FilterType2["IN"] = "in";
|
|
@@ -6270,16 +6275,17 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
|
|
|
6270
6275
|
this._features.length = 0;
|
|
6271
6276
|
}
|
|
6272
6277
|
_extractTileFeatures(spatialFilter) {
|
|
6278
|
+
const geometryFilter = spatialFilter && !isSpatialIndexFilter(spatialFilter) ? spatialFilter : void 0;
|
|
6273
6279
|
const prevInputs = this._tileFeatureExtractPreviousInputs;
|
|
6274
|
-
if (this._features.length && spatialFilterEquals(prevInputs.spatialFilter,
|
|
6280
|
+
if (this._features.length && spatialFilterEquals(prevInputs.spatialFilter, geometryFilter)) {
|
|
6275
6281
|
return;
|
|
6276
6282
|
}
|
|
6277
6283
|
this._features = tileFeatures({
|
|
6278
6284
|
...assignOptional({}, this.props, this._tileFeatureExtractOptions),
|
|
6279
6285
|
tiles: this._tiles,
|
|
6280
|
-
spatialFilter
|
|
6286
|
+
spatialFilter: geometryFilter
|
|
6281
6287
|
});
|
|
6282
|
-
prevInputs.spatialFilter =
|
|
6288
|
+
prevInputs.spatialFilter = geometryFilter;
|
|
6283
6289
|
}
|
|
6284
6290
|
/**
|
|
6285
6291
|
* Loads features as GeoJSON (used for testing).
|