Fix the symbol blink issue by only placing the symbol in current level (#3534)

Co-authored-by: Xiaolian Qin <xiaoq@microsoft.com>
This commit is contained in:
qqz003
2025-06-24 09:37:27 +08:00
committed by GitHub
parent bf4b55727d
commit 55ff6a4428

View File

@@ -276,6 +276,12 @@ JointPlacement Placement::placeSymbol(const SymbolInstance& symbolInstance, cons
// a parent tile that _should_ be placed.
return kUnplaced;
}
// Place the symbol only at the current level to prevent it from blinking during the transition.
if (ctx.getOverscaledID().overscaledZ != int(placementZoom)) {
return kUnplaced;
}
const SymbolBucket& bucket = ctx.getBucket();
const mat4& posMatrix = ctx.getRenderTile().matrix;
const auto& collisionGroup = ctx.collisionGroup;