Label rotation

Hi!

Can I rotate a label? Like a billboard?
Thanks!

1 Like

Hi Tamy,

I don’t think this is possible with a label, but you can always draw a label to an HTML5 canvas, and then use that as input to a billboard.

Patrick

I added an issue for this, since we didn’t have one. I don’t think we’ll get to it right away, but at least we won’t forget about it.

https://github.com/AnalyticalGraphicsInc/cesium/issues/1247

Wanted to check in and see if this is still on to do list. Would be pretty helpful for anyone building a custom street map (like me). Thanks!

Hi,

Yes, it is still on the radar. The issue is pretty old, but as we continue to improve Cesium’s vector data features, this will get some attention.

A custom street map sounds cool. Do you have a link to your app?

Thanks,

Patrick

I was able to implement the workaround of writing the text to a canvas and adding it to a billboard. I am using the Aligned Axis default value of Cesium.Cartesian3.ZERO. The rotation is static. In certain cases, I want to display it as a label for a polygon parallel to the line of a polyline or corridor . Initially the label is parallel to the side as desired. However if you rotate the map the angle of the polyline against the axis changes. However the angle of rotation of the label does not update. I tried the other Aligned axis options and they did not rotate the way I wanted either.

Is there a way to make the billboard label rotate the same way the polyline does so that it remains parallel to the polyline? Would I have to do some sort of dynamic update?

I appreciate any help you can provide.

Thanks,
Lori

Do you have any ideas on rotating a label so that it remains parallel to a polyline as the 3d map is moved?

Thanks,
Lori

Hello,

In our application, all our data is sent via CZML. I haven’t gotten a chance to try this yet but would this work for rendering label-like content on a billboard…

billboard {

image: {

uri : “data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E”

}

… (etc)

}

Thank you.

Wanted to check in and see if this is still on to do list. My goal is to have street names remain parallel to their respective streets as the user rotates the map (like in google maps). Thanks!

No, I don’t think this is something we have implemented yet.

Best,

Hannah