Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loadData(filePath){
- Cesium.loadJson(filePath).then(function(czml) {
- console.log("******************************");
- Cesium.processCzml(czml, dynamicObjectCollection, filePath);
- visualizers = Cesium.VisualizerCollection.createCzmlStandardCollection(scene, dynamicObjectCollection);
- var availability = dynamicObjectCollection.computeAvailability();
- if (availability.start.equals(Cesium.Iso8601.MINIMUM_VALUE)) {
- clock.startTime = new JulianDate();
- clock.stopTime = clock.startTime.addDays(1);
- clock.clockRange = Cesium.ClockRange.UNBOUNDED;
- } else {
- clock.startTime = availability.start;
- clock.stopTime = availability.stop;
- clock.clockRange = Cesium.ClockRange.LOOP;
- }
- clock.currentTime = clock.startTime;
- timeline.zoomTo(clock.startTime, clock.stopTime);
- var extent = new Cesium.Extent(-2.056, 0.587, -2.010, 0.633);
- scene.getCamera().controller.viewExtent(extent);
- console.log("******************************");
- }, function (e) {
- console.error(e);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement