@carto/api-client 0.5.1-alpha.0 → 0.5.1-alpha.1
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/build/api-client.cjs +12 -11
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.js +12 -11
- package/build/api-client.js.map +1 -1
- package/build/worker.js +12 -11
- package/build/worker.js.map +1 -1
- package/package.json +1 -1
- package/src/filters/tileFeaturesGeometries.ts +22 -17
package/build/worker.js
CHANGED
|
@@ -4911,7 +4911,6 @@ function tileFeaturesGeometries({
|
|
|
4911
4911
|
continue;
|
|
4912
4912
|
}
|
|
4913
4913
|
const transformedGeometryToIntersect = tileFormat === "mvt" /* MVT */ ? transformToTileCoords(clippedGeometryToIntersect.geometry, bbox2) : clippedGeometryToIntersect.geometry;
|
|
4914
|
-
createIndicesForPoints(tile.data.points);
|
|
4915
4914
|
calculateFeatures({
|
|
4916
4915
|
map,
|
|
4917
4916
|
tileIsFullyVisible,
|
|
@@ -4998,7 +4997,7 @@ function addIntersectedFeaturesInTile({
|
|
|
4998
4997
|
uniqueIdProperty,
|
|
4999
4998
|
options
|
|
5000
4999
|
}) {
|
|
5001
|
-
const indices = getIndices(data);
|
|
5000
|
+
const indices = getIndices(data, type);
|
|
5002
5001
|
const storeGeometry = options?.storeGeometry || false;
|
|
5003
5002
|
for (let i = 0; i < indices.length - 1; i++) {
|
|
5004
5003
|
const startIndex = indices[i];
|
|
@@ -5017,20 +5016,22 @@ function addIntersectedFeaturesInTile({
|
|
|
5017
5016
|
});
|
|
5018
5017
|
}
|
|
5019
5018
|
}
|
|
5020
|
-
function getIndices(data) {
|
|
5019
|
+
function getIndices(data, type) {
|
|
5021
5020
|
let indices;
|
|
5022
|
-
switch (
|
|
5023
|
-
case "
|
|
5024
|
-
indices = data.
|
|
5021
|
+
switch (type) {
|
|
5022
|
+
case "Polygon":
|
|
5023
|
+
indices = data.primitivePolygonIndices;
|
|
5025
5024
|
break;
|
|
5026
5025
|
case "LineString":
|
|
5027
5026
|
indices = data.pathIndices;
|
|
5028
5027
|
break;
|
|
5029
|
-
case "
|
|
5030
|
-
indices = data
|
|
5028
|
+
case "Point":
|
|
5029
|
+
indices = createIndicesForPoints(data);
|
|
5031
5030
|
break;
|
|
5032
5031
|
default:
|
|
5033
|
-
throw new Error(
|
|
5032
|
+
throw new Error(
|
|
5033
|
+
`Unsupported geometry type: ${type}`
|
|
5034
|
+
);
|
|
5034
5035
|
}
|
|
5035
5036
|
return indices.value;
|
|
5036
5037
|
}
|
|
@@ -5137,7 +5138,7 @@ function addAllFeaturesInTile({
|
|
|
5137
5138
|
uniqueIdProperty,
|
|
5138
5139
|
options
|
|
5139
5140
|
}) {
|
|
5140
|
-
const indices = getIndices(data);
|
|
5141
|
+
const indices = getIndices(data, type);
|
|
5141
5142
|
const storeGeometry = options?.storeGeometry || false;
|
|
5142
5143
|
for (let i = 0; i < indices.length - 1; i++) {
|
|
5143
5144
|
const startIndex = indices[i];
|
|
@@ -5165,7 +5166,7 @@ function createIndicesForPoints(data) {
|
|
|
5165
5166
|
};
|
|
5166
5167
|
pointIndices.value.set(featureIds);
|
|
5167
5168
|
pointIndices.value.set([lastFeatureId + 1], featureIds.length);
|
|
5168
|
-
|
|
5169
|
+
return pointIndices;
|
|
5169
5170
|
}
|
|
5170
5171
|
|
|
5171
5172
|
// src/filters/tileFeaturesSpatialIndex.ts
|