zengh
2020-11-06 fee7cd750dbe31bd3c0b6d21382a3e417a323e5a
图片动画框架集成
1 files modified
2 files added
36 ■■■■■ changed files
images/circle_bg.png patch | view | raw | blame | history
images/zhui.glb patch | view | raw | blame | history
widgets/PathShow/Widget.js 36 ●●●●● patch | view | raw | blame | history
images/circle_bg.png
images/zhui.glb
Binary files differ
widgets/PathShow/Widget.js
@@ -127,7 +127,6 @@
                    });
                    //清除地图点
                    self.map.entities.removeAll();
@@ -142,14 +141,13 @@
                                if (res.features[i].attributes.Name == selectItem) {
                                    self.addLines(res.features[i]);
                                    self.map.camera.flyTo({
                                        destination: Cesium.Cartesian3.fromDegrees(res.features[i].attributes.x,res.features[i].attributes.y, res.features[i].attributes.height)
                                        destination: Cesium.Cartesian3.fromDegrees(res.features[i].attributes.x, res.features[i].attributes.y, res.features[i].attributes.height)
                                    });
                                }
                            }
                        }
                    });
                });
@@ -204,16 +202,16 @@
                var self = this;
                if (self.polyline != null){
                if (self.polyline != null) {
                    self.layer.remove(self.polyline);
                }
                var positions ='';
                var positions = '';
                for (var i = 0; i < res.length; i++) {
                    if(i != res.length - 1){
                        positions += res[i][0] + ',' +res[i][1] + ';';
                    }else{
                        positions += res[i][0] + ',' +res[i][1];
                    if (i != res.length - 1) {
                        positions += res[i][0] + ',' + res[i][1] + ';';
                    } else {
                        positions += res[i][0] + ',' + res[i][1];
                    }
                }
@@ -230,11 +228,27 @@
                    material: new DC.PolylineImageTrailMaterialProperty({
                        speed: 20,
                        image: './images/arrow.png',
                        repeat: { x: 40, y: 1 }
                        repeat: {x: 40, y: 1}
                    }),
                    clampToGround: true
                });
                self.layer.addOverlay(self.polyline);
                let position = new DC.Position(115.70683949300007, 28.80868520100006);
                let circle = new DC.Circle(position, 2000)
                circle.setStyle({
                    material: new DC.ImageMaterialProperty({
                        image: './images/circle_bg.png'
                    })
                })
                circle.rotateAmount = 0.01
                let model = new DC.Model(position, './images/zhui.glb')
                model.setStyle({
                    scale: 100
                })
                model.rotateAmount = 4
                self.layer.addOverlay(model).addOverlay(circle)
            },
            addPoint: function (res) {
@@ -243,7 +257,7 @@
                var self = this;
                for (var i = 0; i < result.length; i++) {
                    var imgs = "";