dynamic billboard using czmlDatasource

Hello Patrick,

Our product is replacing googleEarth with cesium very soon.

i wanted to generate dynamic billboards based on the availabilty of that billboard based on its availability during that time. but could not render the image on the cesiummap.

i am not getting any exceptions as such, but unable to render the image in the billboard.

please let me know where i have gone wrong in the below code.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

//main method

Sandcastle.addDefaultToolbarButton(‘Satellites’, function() {

var czmlDataSource = new Cesium.CzmlDataSource();

var id = “1234CZML”;

//dyn object

var dyo = czmlDataSource.entities.getOrCreateEntity(id);

var timeInterval = new Cesium.TimeInterval({

start : Cesium.JulianDate.fromIso8601(‘2015-01-06T00:00:00Z’),

stop : Cesium.JulianDate.fromIso8601(‘2015-01-07T00:00:00Z’),

isStartTimeIncluded : true,

iSStopTimeIncluded : true

});

//AvialabiltyofDynamicObject

var timeIntervalAvailableBB = new Cesium.TimeIntervalCollection();

timeIntervalAvailableBB.addInterval(timeInterval);

dyo.availability = timeIntervalAvailableBB;

// DynBill

var dynamicBillboard = Cesium.BillboardGraphics;

dynamicBillboard.image = new Cesium.ConstantProperty(’…/images/Cesium_Logo_overlay.png’);

dynamicBillboard.scale = new Cesium.ConstantProperty(1);

dynamicBillboard.show = true;

//dynamicBillboard.interval=timeInterval;

dyo.billboard = dynamicBillboard;

//DynPos

dyo.position = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)

viewer.dataSources.add(czmlDataSource);

createVisualizers(viewer.scene, czmlDataSource);

});

//supporting methods

function createVisualizers(scene, dataSource) {

return [new Cesium.BillboardVisualizer(scene, dataSource.entities)];

}

thanks and regards,

chandrika

Chandrika, you would probably be very interested in the revamped Entity API we are releasing next week. You can check out this post for a detailed preview. I’m also in the process of writing up a full tutorial which should answer a lot of your questions and make it much easier to transition from Google Earth.

Hello Mathew,

Thats great, so far had great fun working on cesium, looking forward to work on the new features which u have come up with.

thanks and regards

chandrika