@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.
- package/CHANGELOG.md +8 -0
- package/build/api-client.cjs +37 -6
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +49 -10
- package/build/api-client.d.ts +49 -10
- package/build/api-client.js +36 -6
- 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/fetch-map/fetch-map.ts +22 -0
- package/src/fetch-map/source.ts +2 -0
- package/src/fetch-map/types.ts +1 -0
- 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/sources/vector-query-source.ts +14 -1
- package/src/sources/vector-table-source.ts +14 -1
- 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-compat.js
CHANGED
|
@@ -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,
|
|
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 =
|
|
20763
|
+
prevInputs.spatialFilter = geometryFilter;
|
|
20758
20764
|
}
|
|
20759
20765
|
/**
|
|
20760
20766
|
* Loads features as GeoJSON (used for testing).
|