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;
        });
    });


posted @ 2019-07-29 18:58  marvelousone  阅读(6269)  评论(0编辑  收藏  举报