File tree 1 file changed +8
-0
lines changed
packages/display/src/displays/webgl
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -443,9 +443,17 @@ export class CollisionHandler {
443
443
) {
444
444
const layerId = this . getLayerId ( layer ) ;
445
445
446
+ // When tiles are repeated due to the singleWorldView setting, we skip processing them for collision detection.
447
+ // This prevents redundant checks and ensures they don't incorrectly collide with themselves,
448
+ // which could cause them to become invisible.
449
+ const skipRepeatedTiles = new Set < string > ( ) ;
450
+
446
451
for ( let screentile of tiles ) {
447
452
const { quadkey, scale : tileScale } = screentile ;
448
453
454
+ if ( skipRepeatedTiles . has ( quadkey ) ) continue ;
455
+ skipRepeatedTiles . add ( quadkey ) ;
456
+
449
457
const zoom = quadkey . length ;
450
458
const tileCache = this . getTileCache ( zoom ) ;
451
459
const tileCollisionData = tileCache . get ( quadkey ) ;
You can’t perform that action at this time.
0 commit comments