I’m trying to implement my own custom label which would be comprised from 3 rows in different colors.
Since Cesium label does not support it at the moment, I was thinking of using a billboard with an SVG based text to implement it.
Am I going the right way? What should I pay attention while implementing this?
Thank you for the detailed explanation of your problem. You are absolutely correct - CesiumJS does not have robust support for creating intricate labels. I agree with your suggestion. Using a Billboard
with an SVG is the correct tool for this application. I have provided the documentation for Billboard
for your reference.
https://cesium.com/learn/cesiumjs/ref-doc/Billboard.html?classFilter=billboard
Let me know if you have any other questions or concerns!
-Sam
@sam.rothstein
Hi,
I think I have made some progress in my implementation but I am Afraid I have reached a dead-end.
My labels should also be dynamic , meaning they should be able to change in a large scale frequently .
Sadly , billboard setImage takes too long.
Setting 25 images at once take about 11ms when calling Billboards setImage while without it it takes about 0.4ms.
Any ideas why that is happening ?
I am happy to hear that you have made some progress! Do you think this slight delay in rendering time makes your current implementation unfeasible? If so, do you have any workarounds in mind?
To be candid, I am not super familiar with the back-end of setImage
. It looks like setImage
calls createBillboardPointCallback
in createBillboardPointCallback.js
.
Looking through the code, I am not seeing anything that looks especially computationally intensive. It is likely that the process of accessing the HTMLImageElement
is causing the delay. A lower fidelity image or a faster network connection might streamline this process. I am curious to hear your overall thoughts.
-Sam