Questions tagged [czml]

Cesium Language (CZML) is a JSON format for describing a time-dynamic graphical scene, primarily for display in a web browser running Cesium. It describes lines, points, billboards, models, and other graphical primitives, and specifies how they change with time.

Cesium Language (CZML)

CZML is a JSON format for describing a time-dynamic graphical scene, primarily for display in a web browser running Cesium. It describes lines, points, billboards, models, and other graphical primitives, and specifies how they change with time. In many ways, the relationship between Cesium and CZML is similar to the relationship between Google Earth and KML. Both CZML and KML are data formats for describing scenes in their respective clients and are meant to be generated by a wide variety of applications.

  1. CZML is based on JSON.
  2. CZML can accurately describe properties that change over time.
  3. CZML is structured for efficient, incremental streaming to a client.
  4. CZML is optimized for client consumption.
  5. CZML is extensible.
  6. CZML is an open format.

CZML is a subset of JSON, meaning that a valid CZML document is also a valid JSON document. Specifically, a CZML document contains a single JSON array where each object-literal element in the array is a CZML Packet. A CZML packet describes the graphical properties for a single object in the scene, such as a single aircraft.

Examples

Note: javascript comments in this example are for illustration purposes even though comments are not technically allowed in JSON.

[
    // packet one
    {
        "id": "GroundControlStation"
        "position": { "cartographicDegrees": [-75.5, 40.0, 0.0] },
        "point": {
            "color": { "rgba": [0, 0, 255, 255] },
        }
    },
    // packet two
    {
        "id": "PredatorUAV",
        // ...
    }
]

There are additional examples online.

Demos

Cesium ships with several CZML demos.

References

51 questions
2
votes
1 answer

How can set "wait time" in CZML?

I have some position & time values describing movement of some vehicle. But in some time intervals vehicle wait in some position. I cant figure out how can i set waiting time.? In the example data provided below : position values corresponding to…
Cherkesgiller
  • 520
  • 4
  • 17
2
votes
1 answer

Add a Label to the Polygon in Cesium

How can I add a label to the entity (ex. Polygon) at the specify location: This is how I tried to do it: (entity.polygon = true) static addLabel(entity) { entity.myLabel = new Cesium.LabelGraphics({ position :…
GeoCom
  • 1,290
  • 2
  • 12
  • 33
2
votes
1 answer

Cloning and modifiying CZML Packets

I wish to spawn a certain number of copies of shape1 and shape2 in different positions that shall only be known at runtime, and be able to programmatically alter their other properties as well. What is the preferred methodology for referring to,…
Slaiyer
  • 444
  • 8
  • 22
2
votes
2 answers

CZML polygon without color or material

Is it possible to draw a CZML polygon with only polygon outline and no material to cover the sides of polygon? This is required as my requirement is to enable clicking on an object completely immersed into the polygon, i.e., no side of inner polygon…
meen
  • 2,287
  • 3
  • 23
  • 42
2
votes
1 answer

Can we set outlineWidth property for polygon drawn using CZML in Cesium?

I want to reduce the thickness of outline of polygon drawn using CZML in Cesium. I tried to search if there is any option available in CZML to achieve it. I found this, but it provides 'outlineWidth' for label and point. Is there any way to adjust…
meen
  • 2,287
  • 3
  • 23
  • 42
2
votes
3 answers

using 3D models in CZML file to move an object

I am creating a CZML file, I have a path that I want my object to follow that path and move on it location by location (I defined positions based on time epoch.) It works perfectly with billboard with an image, but when I change my code to have a…
azar
  • 283
  • 3
  • 21
2
votes
1 answer

Live streaming and processing of CZML Packets in cesium

Hi how to stream live czml packets and process in java script without making UI freeze and without starting the scenario from the begining, whenever i send new czml packet of an object from server with new updated Cartesian coordinates along with…
2
votes
1 answer

Cesium javascript library

I want to ask one question about online kml file to czml file converter because i want to convert my kml file into czml file to use it in cesium 3d globe for clickable placemark.Please provide me answer of that question.
1
vote
1 answer

How do I specify the color of an ellipsoid in a CZML document?

How do I specify the color of an ellipsoid in CZML? This snippet works when I add an entity to the viewer from within the JavaScript: let redEllipsoid = viewer.entities.add({ "name": "red ellipsoid", "position":…
mcmuffin6o
  • 348
  • 1
  • 9
1
vote
1 answer

Load specific part of CZML file according to ID

In the Cesium demo here, you have the option to select choose what data you want to view by simple changing where you are reading the data from. I want the "Satellites" button to only display those with "Satellite" in the id from the CZML file and…
1
vote
1 answer

Load Czml FILE in CesiumJS

I struggle to load my czml file without copying its content inside my JS script in Cesium. I would like to load the file using its url but I don't manage to do it. var czml = "test_trace.czml"; var viewer = new Cesium.Viewer("cesiumContainer",…
Naydz
  • 11
  • 3
1
vote
1 answer

Access position values from loaded CZML data using Cesiumjs

I load in a CZML file into my app.js file [both files are provided below]. I'm able to access the name and id fields but not the position field. The position field contains cartographic values as 'time, longitude, latitude, altitude'. I'd like…
JJT
  • 167
  • 7
1
vote
1 answer

Cesium problem using distanceDisplayCondition in CZML format #8657

I am trying to add distanceDisplayCondition parameters into a corridor described by CZML format with the code below: var czml = [{ "id" : "document", "name" : "CZML Geometries: Polyline", "version" : "1.0" }, { "id" :…
chatzich
  • 1,083
  • 2
  • 11
  • 26
1
vote
1 answer

Using “Show” property in Cesium to turn on and off visibility has a strange delay

I am loading some geometries through a datasource load promise like above: Cesium.when(Cesium.CzmlDataSource.load(environment.apiBaseURL + `/geometry/all`), result => { this.dataSources = result; …
chatzich
  • 1,083
  • 2
  • 11
  • 26
1
vote
2 answers

How to control the visibility to Cesium/CZML DataSources

I have a CZML datasource declared: public geometryDataPromise: Cesium.CzmlDataSource; I am loading it with an endpoint above when a component is loaded: if(!this.store.geometryDataPromise) { this.store.geometryDataPromise =…
chatzich
  • 1,083
  • 2
  • 11
  • 26