Adding polyline through CZML


Let’s say I have a czml document, and I want to create a static polyline—that is, ignore the timestamps and create a polyline with no animation that will just sit on the terrain. How do I do that? Open to other formats as well; my original file is in GPX format.

The CZML format more or less mirrors CesiumJS entity API, so you should be able to create anything you can in the scene directly with CZML. This code example shows a static polyline being created with CZML:

Let me know if this helps! What kind of application are you working on?

Thanks, Omar! Any advice/examples of how to call that up from an external file? The file I’m working with is huge—about 200 miles of hiking trail.

I’m putting together a visualization of a long hike, with points of interest, and the like.

Never mind—found an easier way to do it with GeoJSON. Thanks again!