| | |
| | | <template> |
| | | <div> |
| | | <div id="sdkContainer"></div> |
| | | <!-- <div style="z-index: 30;position: absolute; top:1%;left: 1%;"> |
| | | <el-button @click="setLocation(3)">漫游</el-button> |
| | | </div> --> |
| | | <!-- <div |
| | | id="msg" |
| | | style="min-width: 200px;min-height: 100px; z-index: 30;position: absolute; top:5%;left: 40%;background: skyblue;" |
| | | > |
| | | <label>{{ messagelayer }}</label> |
| | | |
| | | </div>--> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { mapState, mapMutations } from "vuex"; |
| | | import "animate.css"; |
| | | import rpc from "../../assets/js/rpc"; |
| | | import mapData from "../../../static/mapData"; |
| | | import mapMsg from "../../assets/js/mapMsg"; |
| | | import vueEvents from '@/utils/vueEvent.js' |
| | | let PoiLayerConstructor = Vue.extend(poiLayer); |
| | | |
| | | let handler; |
| | |
| | | locationPoint: null, |
| | | locationInstance: null, |
| | | locationData: null, |
| | | messagelayer: null |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState(["cesiumInit"]), |
| | | }, |
| | | mounted() { |
| | | |
| | | vueEvents.$on('messagelayer', (res) => { this.messagelayer = JSON.stringify(res) }) |
| | | this.$nextTick(function () { |
| | | let that = this; |
| | | let option = { |
| | |
| | | // duration: 8, //飞行时间8s |
| | | // }); |
| | | // }, 10000); |
| | | var data = mapData.mapRest |
| | | setTimeout(() => { |
| | | sgworld.Navigate.flyToPointsInterest({ |
| | | destination: { |
| | | "x": -2187108.231948378, |
| | | "y": 4392040.442348233, |
| | | "z": 4063265.829085007 |
| | | }, |
| | | destination: { 'x': data.lng, 'y': data.lat, 'z': data.alt }, |
| | | orientation: { |
| | | heading: 2.4384163743219607, |
| | | pitch: -0.32733173444759833, |
| | | roll: 6.283095595698651, |
| | | heading: data.heading, |
| | | pitch: data.pitch, |
| | | roll: data.roll, |
| | | }, |
| | | duration: 10, //飞行时间8s |
| | | }); |
| | | }, 1000); |
| | | }, 10000); |
| | | that.setCesiumInit(true); |
| | | // rpc.initRpc(); |
| | | } |
| | |
| | | //地下模式距离参数 |
| | | Viewer.scene.globe.translucency.frontFaceAlpha = 0.5; |
| | | Viewer.scene.globe.undergroundColor = undefined; |
| | | rpc.initMessage(); |
| | | mapMsg.init(); |
| | | rpc.clickToCoordinates(); |
| | | |
| | | //标会编辑 |