Dear Cesium Support Team,
We are experiencing an intermittent rendering issue with labels.
Issue Description
Problem: Label text intermittently renders outside/separate from its background box, causing the text to appear misaligned or detached from the label background. This creates a visual glitch where the text and background are not properly synchronized.
Frequency: The issue occurs randomly - approximately 2 out of 10 times when labels are rendered or the view is changed.
Affected Modes: The issue occurs in both 2D (SCENE2D) and 3D (SCENE3D) modes.
Workaround: Toggling label visibility (hide/show), switching map modes(2D/3D) automatically fixes the alignment, suggesting this is a rendering synchronization issue rather than a configuration problem.
Currently we are using Cesium 1.135, we tried switching it to 1.136, 1.137, 1.138, but the issue still persists
Im attaching the video for reference and also the sandlink for the code reference
Expected Behavior: Label text should always render inside/aligned with the semi-transparent background box and should be properly synchronized at all times.
Sandcastle link: https://tinyurl.com/mrd6kp8u
Video link: https://drive.google.com/file/d/1gHyU47BVe6OahD7iunCD4HuUkPubfSxf/view?usp=sharing
We greatly appreciate your assistance in resolving this intermittent rendering issue.
Regards,
Vishant Shah
Hi @Vishant_Shah,
Thanks for posting - welcome to the Cesium community! I see what you’re talking about in the video reference, but I’m having trouble reproducing it in the sandcastle you linked. Are you able to reproduce it in the sandcastle? Any tips for me?
You mentioned you’re using Cesium 1.135 but you’ve tried up to 1.138. Did this workflow used to work bug-free before 1.135? Have you tried 1.139? (The version deployed live to sandcastle). We have been making changes to billboards and labels lately, so I wouldn’t be surprised if it’s a new bug, nor would I be surprised if it’s already been resolved.
Best,
Matt
This issue happens once in 10 times, its very random. Also as u mentioned I tried with the latest 1.139.1 version, the issue still persists.
- Are you able to reproduce it in sandcastle, or just in this app you’ve built on top of Cesium?
- You mentioned originally that the issue occurs “when labels are rendered or the view is changed” - but in both videos you’ve linked, it only seems to occur when the view is changed. It’s important to know if the issue only happens when the view is changed. Do you know for sure if the issue does in fact happen even when just moving the camera?
It’s also possible the issue is specific to a browser or operating system, or combination thereof. What browser and OS are you using when the issue occurs?
I have updated the sandcastle, when u will toggle the labels, during rendering it breaks, u will be able to replicate it on this.
1 Like
This seems like a legitimate bug. Here’s a minimal reproduction in sandcastle, distilled from the original with help from @donmccurdy.
It seems that the issue occurs specifically with the use of HeightReference. If that property is removed from the label, the misalignment does not occur.
I’ve written up an issue for this here. You can track its progress there and, if you’re interested, you can try to help root cause the issue (even finding if this is a regression in a recent Cesium version / which version the bug was introduced can be very helpful).
Best,
Matt
1 Like