diff --git a/src/assets/images/button/fly.png b/src/assets/images/button/fly.png new file mode 100644 index 0000000..18bc425 --- /dev/null +++ b/src/assets/images/button/fly.png Binary files differ diff --git a/src/assets/images/button/fly.png b/src/assets/images/button/fly.png new file mode 100644 index 0000000..18bc425 --- /dev/null +++ b/src/assets/images/button/fly.png Binary files differ diff --git a/src/assets/images/button/init.png b/src/assets/images/button/init.png new file mode 100644 index 0000000..7f5ecc8 --- /dev/null +++ b/src/assets/images/button/init.png Binary files differ diff --git a/src/assets/images/button/fly.png b/src/assets/images/button/fly.png new file mode 100644 index 0000000..18bc425 --- /dev/null +++ b/src/assets/images/button/fly.png Binary files differ diff --git a/src/assets/images/button/init.png b/src/assets/images/button/init.png new file mode 100644 index 0000000..7f5ecc8 --- /dev/null +++ b/src/assets/images/button/init.png Binary files differ diff --git a/src/views/Index.vue b/src/views/Index.vue index b0fbc95..6e28944 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -2,7 +2,11 @@ @@ -373,6 +377,7 @@ player: null, // 播放器1 currentPlayer: 'player', // 当前切换palyer layersShow: [false, false, false, false, false, false, false, false, false, false], + center:[114.877,25.764], labels: [], data: { feature: [], @@ -439,6 +444,45 @@ } }) }, + // 漫游 + fly(){ + const graphicLayer = new mars3d.layer.GraphicLayer() + window.map.addLayer(graphicLayer) + const positions = [ + { lng: 114.84273043452548,lat: 25.743909014823874, alt: 800, datatime: "2021/3/25 0:01:00" }, + { lng: 114.84196376788776,lat: 25.751940319936182, alt: 800, datatime: "2021/3/25 0:01:02" }, + { lng: 114.8691880101212, lat: 25.75900615537251, alt: 800, datatime: "2021/3/25 0:01:04" }, + { lng: 114.87584148495861,lat: 25.75647465247287, alt: 800, datatime: "2021/3/25 0:01:06" }, + { lng: 114.88155905407521,lat: 25.763214561842943, alt: 800, datatime: "2021/3/25 0:01:08" }, + { lng: 114.88608080366917,lat: 25.76749171695476, alt: 800, datatime: "2021/3/25 0:01:10" } + ] + const fixedRoute = new mars3d.graphic.FixedRoute({ + name: "空中漫游", + timeField: "datatime", + positions: positions, + autoStop: true, + clockLoop: false, // 是否循环播放 + interpolation: true, // setInterpolationOptions插值 + camera: { + type: "dy", + followedX: 50, + followedZ: 30 + } + }) + graphicLayer.addGraphic(fixedRoute) + + // // ui面板信息展示 + fixedRoute.on(mars3d.EventType.end, (event) => { + window.map.removeLayer(graphicLayer) + }) + + // 开始漫游 + fixedRoute.start() + }, + setCenter(position) { + var center = { lat: position[1], lng: position[0], alt: 700, heading: 0, pitch: -30 } + window.map.setCameraView(center) + }, // 刷新token getFlushVideoToken () { this.videoCount = 60 @@ -563,6 +607,27 @@ ], layers: [ { + type: "geojson", + name: "河流(面状)", + url: "http://111.198.10.15:11404/3d/rj_sy.json", + symbol: { + type: "waterC", + styleOptions: { + height: 17, // 水面高度 + normalMap: "img/textures/waterNormals.jpg", // 水正常扰动的法线图 + frequency: 8000.0, // 控制波数的数字。 + animationSpeed: 0.02, // 控制水的动画速度的数字。 + amplitude: 5.0, // 控制水波振幅的数字。 + specularIntensity: 0.8, // 控制镜面反射强度的数字。 + baseWaterColor: "#006ab4", // rgba颜色对象基础颜色的水。#00ffff,#00baff,#006ab4 + blendColor: "#006ab4", // 从水中混合到非水域时使用的rgba颜色对象。 + opacity: 0.4, // 透明度 + clampToGround: false // 是否贴地 + } + }, + show: true + }, + { type: "3dtiles", name: "赣州建筑物", // url: "http://192.168.8.111:9003/model/taT0ftXcS/tileset.json", @@ -2381,4 +2446,39 @@ box-sizing: border-box; white-space: nowrap; } +.cover{ + position:absolute;bottom:0px;left:0px;z-index:100000; + background-color: #212224; + width:100px;height: 30px; +} +.btn-list{ + position:absolute;top:8px;right:50px;z-index:100000; + /*background-color: #021c33;*/ + width:80px;height: 32px; + display: flex; +} +.circle_btn_fly{ + width: 32px; + height: 32px; + text-align: center; + border-radius: 50%; + color: white; + background: url("@/assets/images/button/fly.png") 0px 0px no-repeat; + background-position: 0px 0px; + background-size: cover; + margin: 0px 5px; + cursor: pointer; +} +.circle_btn_init{ + width: 32px; + height: 32px; + text-align: center; + border-radius: 50%; + color: white; + background: url("@/assets/images/button/init.png") 0px 0px no-repeat; + background-position: 0px 0px; + background-size: cover; + margin: 0px 5px; + cursor: pointer; +}