Is ClampToGround not supported for Billboards in CZML?

1. A concise explanation of the problem you’re experiencing.

Attempting to add “heightReference” : Cesium.HeightReference.CLAMP_TO_GROUND, to Billboard options in CZML,

TypeError: Cannot read property ‘length’ of undefined

the full error is

TypeError: Cannot read property ‘length’ of undefined

at processProperty (Cesium.js:137465)

at processPacketData (Cesium.js:137603)

at Array.processBillboard (Cesium.js:138107)

at processCzmlPacket (Cesium.js:138685)

at Function.CzmlDataSource._processCzml (Cesium.js:139063)

at loadCzml (Cesium.js:138797)

at Cesium.js:138778

at Promise.then (Cesium.js:1163)

at when (Cesium.js:1026)

at load (Cesium.js:138777)

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

insert on Line #11: “heightReference” : Cesium.HeightReference.CLAMP_TO_GROUND,

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I am trying to animate a GPX tracklog using Billboard entities to represent the '“breadcrumb trail”. A better way night have been to include native support for GPX files in Cesium, if that project by Andre Nunes had ever been merged into master… then I wouldn’t struggle writing code to generate a CzmlDataSource from the GPX XML, which works great until I attempt to ClampToGround.

4. The Cesium version you’re using, your operating system and browser.

Cesium v1.4.8, Windows 7, Chrome

(NOT “heightReference”, which is usually the proper syntax)

However, the billboard still disappears underground at certain times&places when the GPS Z elevation value is less than the Z value of Cesium World Terrain.

Which leads me back to the original question,

Is ClampToGround not supported for Billboards in CZML?

The AGI logo graphic disappears underground in

when you paste the following line #11

“HeightReference”: Cesium.HeightReference.CLAMP_TO_GROUND,

change to Cesium World Terrain in the Basemap Picker and zoom in on the AGI logo.

Thanks-

-Jon

I solved the “TypeError: Cannot read property ‘length’ of undefined”, after reading https://github.com/AnalyticalGraphicsInc/cesium/blob/1.48/Source/DataSources/CzmlDataSource.js and realizing that in a CZML document, I need to capitalize “HeightReference”: Cesium.HeightReference.CLAMP_TO_GROUND,

The correct syntax in CZML is:

“heightReference”: “CLAMP_TO_GROUND”

sandcastle example

The CZML property names for billboards are listed here:

https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/Billboard

and the string values for the HeightReference type are listed here:

https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/HeightReferenceValue

Thank you, Scott!