I am trying to show a badge in the form of a billboard and scale it by distance. I can handle it well, but as soon as I load the billboard via CZML and not directly into JS, I cannot resize the billboard.
In my JS file, I have:
var czmlDataSource = new Cesium.CzmlDataSource();
czmlDataSource.loadUrl('airports.czml');
viewer.dataSources.add(czmlDataSource);
My CZML file shows:
[
{
"id":"document",
"version":"1.0"
},
{
"id":"test",
"billboard":{
"image":"airport.png",
"verticalOrigin":"BOTTOM",
"show":true
},
"position":{
"cartographicDegrees":[
0.055278, 51.505278, 0
]
}
}
]
Before using this:
entity.billboard.scaleByDistance = new Cesium.ConstantProperty(new Cesium.NearFarScalar(1.5e3, 0.3, 3.5e5, 0.0));
Obviously this is not working right now. But I cannot find a way how to possibly get the billboard identifier and use scaleByDistance.
source
share