cesium加载KML、KMZ数据
加载KML、KMZ模型
重新编辑我
点击查看详细内容
var options = {
camera : viewer.scene.camera,
canvas : viewer.scene.canvas,
clampToGround: true //开启贴地
};
viewer.dataSources.add(Cesium.KmlDataSource.load('./data/zongdi.kmz', options)).then(function(dataSource){
viewer.clock.shouldAnimate = false;
var rider = dataSource.entities.getById('tour');
viewer.flyTo(rider).then(function(){
viewer.trackedEntity = rider;
viewer.selectedEntity = viewer.trackedEntity;
viewer.clock.multiplier = 30;
viewer.clock.shouldAnimate = true;
});
});