@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/api-client.js
CHANGED
|
@@ -10360,7 +10360,6 @@ function tileFeaturesGeometries({
|
|
|
10360
10360
|
continue;
|
|
10361
10361
|
}
|
|
10362
10362
|
const transformedGeometryToIntersect = tileFormat === "mvt" /* MVT */ ? transformToTileCoords(clippedGeometryToIntersect.geometry, bbox2) : clippedGeometryToIntersect.geometry;
|
|
10363
|
-
createIndicesForPoints(tile.data.points);
|
|
10364
10363
|
calculateFeatures({
|
|
10365
10364
|
map,
|
|
10366
10365
|
tileIsFullyVisible,
|
|
@@ -10447,7 +10446,7 @@ function addIntersectedFeaturesInTile({
|
|
|
10447
10446
|
uniqueIdProperty,
|
|
10448
10447
|
options
|
|
10449
10448
|
}) {
|
|
10450
|
-
const indices = getIndices(data);
|
|
10449
|
+
const indices = getIndices(data, type);
|
|
10451
10450
|
const storeGeometry = options?.storeGeometry || false;
|
|
10452
10451
|
for (let i = 0; i < indices.length - 1; i++) {
|
|
10453
10452
|
const startIndex = indices[i];
|
|
@@ -10466,20 +10465,22 @@ function addIntersectedFeaturesInTile({
|
|
|
10466
10465
|
});
|
|
10467
10466
|
}
|
|
10468
10467
|
}
|
|
10469
|
-
function getIndices(data) {
|
|
10468
|
+
function getIndices(data, type) {
|
|
10470
10469
|
let indices;
|
|
10471
|
-
switch (
|
|
10472
|
-
case "
|
|
10473
|
-
indices = data.
|
|
10470
|
+
switch (type) {
|
|
10471
|
+
case "Polygon":
|
|
10472
|
+
indices = data.primitivePolygonIndices;
|
|
10474
10473
|
break;
|
|
10475
10474
|
case "LineString":
|
|
10476
10475
|
indices = data.pathIndices;
|
|
10477
10476
|
break;
|
|
10478
|
-
case "
|
|
10479
|
-
indices = data
|
|
10477
|
+
case "Point":
|
|
10478
|
+
indices = createIndicesForPoints(data);
|
|
10480
10479
|
break;
|
|
10481
10480
|
default:
|
|
10482
|
-
throw new Error(
|
|
10481
|
+
throw new Error(
|
|
10482
|
+
`Unsupported geometry type: ${type}`
|
|
10483
|
+
);
|
|
10483
10484
|
}
|
|
10484
10485
|
return indices.value;
|
|
10485
10486
|
}
|
|
@@ -10586,7 +10587,7 @@ function addAllFeaturesInTile({
|
|
|
10586
10587
|
uniqueIdProperty,
|
|
10587
10588
|
options
|
|
10588
10589
|
}) {
|
|
10589
|
-
const indices = getIndices(data);
|
|
10590
|
+
const indices = getIndices(data, type);
|
|
10590
10591
|
const storeGeometry = options?.storeGeometry || false;
|
|
10591
10592
|
for (let i = 0; i < indices.length - 1; i++) {
|
|
10592
10593
|
const startIndex = indices[i];
|
|
@@ -10614,7 +10615,7 @@ function createIndicesForPoints(data) {
|
|
|
10614
10615
|
};
|
|
10615
10616
|
pointIndices.value.set(featureIds);
|
|
10616
10617
|
pointIndices.value.set([lastFeatureId + 1], featureIds.length);
|
|
10617
|
-
|
|
10618
|
+
return pointIndices;
|
|
10618
10619
|
}
|
|
10619
10620
|
|
|
10620
10621
|
// src/filters/tileFeaturesSpatialIndex.ts
|