-
-
Save KBuon/80315cc1a5a29b2a8fdf42dc08c368a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var czml = [{ | |
"id" : "document", | |
"name" : "CZML Model", | |
"version" : "1.0" | |
}, { | |
"id" : "aircraft model", | |
"name" : "Cesium Air", | |
"position" : { | |
"cartographicDegrees" : [-77, 37, 10000] | |
}, | |
"model": { | |
"gltf" : "../../SampleData/models/CesiumAir/Cesium_Air.glb", | |
"scale" : 2.0, | |
"minimumPixelSize": 128 | |
} | |
}]; | |
var viewer = new Cesium.Viewer('cesiumContainer'); | |
var dataSourcePromise = viewer.dataSources.add(Cesium.CzmlDataSource.load(czml)); | |
dataSourcePromise.then(function(dataSource){ | |
viewer.trackedEntity = dataSource.entities.getById('aircraft model'); | |
}).otherwise(function(error){ | |
window.alert(error); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment