| | |
| | | }); |
| | | |
| | | |
| | | |
| | | //清除地图点 |
| | | self.map.entities.removeAll(); |
| | | |
| | |
| | | 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) |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | }); |
| | |
| | | |
| | | 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]; |
| | | } |
| | | |
| | | } |
| | |
| | | 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) { |
| | | |
| | |
| | | var self = this; |
| | | |
| | | for (var i = 0; i < result.length; i++) { |
| | | |
| | | |
| | | |
| | | var imgs = ""; |
| | | |