poliastro / czml3

Python 3 library to write CZML
https://pypi.org/project/czml3/
MIT License
37 stars 30 forks source link

Label.pixelOffset does not appear to work #107

Closed rengrub closed 1 month ago

rengrub commented 1 year ago

I am unable to get Label.pixelOffset to work with a list of x/y values. I would expect it to work like this: label=Label(pixelOffset=[5,5])

but instead I can only make it work like this: label=Label( pixelOffset=dict([("cartesian2", [5, 5])]) )

astrojuanlu commented 1 year ago

Hi @rengrub, thanks for opening the issue. It's been a while since I last used CZML, their docs are a bit obscure and I also reckon that the czml3 API could be more compact.

Unfortunately I won't have time in the short term to look into this and confirm or deny whether the API you propose is consistent with the rest. In the meantime, you're welcome to send a PR, or better: to add more context on this based on the CZML spec.

Stoops-ML commented 1 month ago

This seems to be a bug with Cesium where the pixelOffset property of Label should be able to accept a list of points and not just the Cartesian2Value (like the cartesian property of Position).

This can be shown by playing around with the label example on sandcastle.

I'm marking this as an enhancement as we need to add the Cartesian2Value type into CZML3 to work around this issue.