From 83202f1ab51b5f2108b5076a02dabac0e7476f4f Mon Sep 17 00:00:00 2001 From: Anthony GULLIENT Date: Mon, 25 Nov 2024 15:44:18 +0100 Subject: [PATCH] fix(i3dm): use instanceId to get info --- src/Layer/OGC3DTilesLayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Layer/OGC3DTilesLayer.js b/src/Layer/OGC3DTilesLayer.js index c43be234a3..181ae392b6 100644 --- a/src/Layer/OGC3DTilesLayer.js +++ b/src/Layer/OGC3DTilesLayer.js @@ -356,14 +356,14 @@ class OGC3DTilesLayer extends GeometryLayer { getC3DTileFeatureFromIntersectsArray(intersects) { if (!intersects.length) { return null; } - const { face, index, object } = intersects[0]; + const { face, index, object, instanceId } = intersects[0]; /** @type{number|null} */ let batchId; if (object.isPoints && index) { batchId = object.geometry.getAttribute('_BATCHID')?.getX(index) ?? index; } else if (object.isMesh && face) { - batchId = object.geometry.getAttribute('_BATCHID')?.getX(face.a); + batchId = object.geometry.getAttribute('_BATCHID')?.getX(face.a) ?? instanceId; } if (batchId === undefined) {