Advertisement
Guest User

Cesium

a guest
Jun 12th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function loadData(filePath){
  2.         Cesium.loadJson(filePath).then(function(czml) {
  3.                 console.log("******************************");         
  4.                 Cesium.processCzml(czml, dynamicObjectCollection, filePath);       
  5.                 visualizers = Cesium.VisualizerCollection.createCzmlStandardCollection(scene, dynamicObjectCollection);
  6.                 var availability = dynamicObjectCollection.computeAvailability();
  7.                 if (availability.start.equals(Cesium.Iso8601.MINIMUM_VALUE)) {
  8.                      clock.startTime = new JulianDate();
  9.                      clock.stopTime = clock.startTime.addDays(1);
  10.                      clock.clockRange = Cesium.ClockRange.UNBOUNDED;
  11.                 } else {
  12.                      clock.startTime = availability.start;
  13.                      clock.stopTime = availability.stop;
  14.                      clock.clockRange = Cesium.ClockRange.LOOP;
  15.                 }              
  16.                 clock.currentTime = clock.startTime;
  17.                 timeline.zoomTo(clock.startTime, clock.stopTime);
  18.                 var extent = new Cesium.Extent(-2.056, 0.587, -2.010, 0.633);
  19.                 scene.getCamera().controller.viewExtent(extent);   
  20.                        
  21.                 console.log("******************************");
  22.             }, function (e) {
  23.                 console.error(e);
  24.         });
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement