@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.
- package/CHANGELOG.md +2 -0
- package/build/api-client.cjs +121 -22
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +99 -14
- package/build/api-client.d.ts +99 -14
- package/build/api-client.js +115 -22
- package/build/api-client.js.map +1 -1
- package/build/worker-compat.js +10 -3
- package/build/worker-compat.js.map +1 -1
- package/build/worker.js +10 -3
- package/build/worker.js.map +1 -1
- package/package.json +1 -1
- package/src/api/auth.ts +92 -0
- package/src/api/index.ts +7 -0
- package/src/api/query.ts +3 -1
- package/src/api/request-with-parameters.ts +32 -5
- package/src/fetch-map/parse-map.ts +7 -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/index.ts +6 -0
- package/src/models/common.ts +12 -2
- package/src/models/model.ts +8 -4
- package/src/sources/base-source.ts +26 -3
- package/src/sources/types.ts +9 -5
- package/src/spatial-index.ts +41 -0
- package/src/types.ts +29 -1
- package/src/widget-sources/widget-remote-source.ts +4 -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,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,
|
|
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 =
|
|
20764
|
+
prevInputs.spatialFilter = geometryFilter;
|
|
20758
20765
|
}
|
|
20759
20766
|
/**
|
|
20760
20767
|
* Loads features as GeoJSON (used for testing).
|