How to convert a entity to czml

Is there a built-in function to convert a entity to czml?
I want to store one or more entity to database in hard disk and reload them into cesium next time.
any other better solution?

@zxc1987

I do not know of any built-in functions to convert entities into CZML? I would be curious to learn a little bit more about your use case here - what exactly are you trying to convert to CZML? In the meantime, check out this CZML generator that I found online.

This seems somewhat similar to what you are looking for. Let me know if you have any other questions or concerns. I am looking forward to learning more about your project.

-Sam

@sam.rothstein
thanks for your reply

I develop a website using cesium
people can draw polyline、polygon、box or other entities on the browser like chrome
when they click save button in the website
i will save all the entities drawed by people by ajax request to mysql database.
when they enter the website next time
they will see the entities they drawed last time.

to put it simply
the question can be:
how to serialize and deserialize entity instance in cesium

the CZML generator you mentioned is very good
but my project is a BS project on the web
I can’t use it

@zxc1987

To the best of my knowledge, the ability to serialize and deserialize an entity instance is not a part of CesiumJS. While it is unclear to me if this will be in our roadmap moving forwards, I can keep you posted with updates. What do you mean your project is a BS project?

-Sam

@sam.rothstein
thank you.
I use BS as a abbreviation for Browser-Server.

1 Like

@zxc1987

Great! Let me know if you have any additional questions.

-Sam