| | |
| | | </template> |
| | | <script> |
| | | import store from "@/utils/store2.js"; |
| | | import { setClick, leftClick } from "@/utils/map2.js"; |
| | | import { setClick, leftClick,touchClick } from "@/utils/map2.js"; |
| | | import _GLOBAL from "@/assets/GLOBAL2"; |
| | | // import { leftClick, loadLayer } from "@/utils/map.js"; |
| | | import leftBottom from "@/components/leftMenu/bottom2.vue"; |
| | |
| | | }); |
| | | |
| | | window.mapapi = map; |
| | | |
| | | addImageLayer(); |
| | | addAnnotationLayer(); |
| | | addHxLayer(); |
| | | addYzLayer(); |
| | | |
| | | setClick(true); |
| | | touchClick(); |
| | | |
| | | getCurrentPosition(); |
| | | listenDirection(); |
| | | |
| | | |
| | | // leftClick() |
| | | |
| | | window.layerOpen = function (name, options) { |
| | |
| | | }, |
| | | methods: { |
| | | clicktoclose() { |
| | | clearTimeout(this.timer); |
| | | this.timer = setTimeout(() => { |
| | | this.count++; |
| | | if (this.count == 2) { |
| | | // console.log("单击事件"); |
| | | // 关闭所有弹窗 |
| | | //this.$refs.menu.closeall(); |
| | | // 清除定位中的位置标记 |
| | | //this.$refs.menu.clearFlyPoint(); |
| | | } else { |
| | | // 执行放大操作 |
| | | // console.log("双击"); |
| | | // Viewer.camera.zoomIn(); |
| | | // console.log(window.clickPOI); |
| | | // let p = sgworld.Navigate.getDegrees(); |
| | | // console.log(p); |
| | | // Viewer.camera.flyTo({ |
| | | // destination: Cesium.Cartesian3.fromDegrees( |
| | | // window.clickPOI.lon, |
| | | // window.clickPOI.lat, |
| | | // p.height / 1.8 |
| | | // ), |
| | | // duration: 1.0, |
| | | // }); |
| | | } |
| | | this.count = 0; |
| | | }, 300); |
| | | this.count++; |
| | | // clearTimeout(this.timer); |
| | | // this.timer = setTimeout(() => { |
| | | // this.count++; |
| | | // if (this.count == 2) { |
| | | // // console.log("单击事件"); |
| | | // // 关闭所有弹窗 |
| | | // //this.$refs.menu.closeall(); |
| | | // // 清除定位中的位置标记 |
| | | // //this.$refs.menu.clearFlyPoint(); |
| | | // } else { |
| | | // // 执行放大操作 |
| | | // // console.log("双击"); |
| | | // // Viewer.camera.zoomIn(); |
| | | // // console.log(window.clickPOI); |
| | | // // let p = sgworld.Navigate.getDegrees(); |
| | | // // console.log(p); |
| | | // // Viewer.camera.flyTo({ |
| | | // // destination: Cesium.Cartesian3.fromDegrees( |
| | | // // window.clickPOI.lon, |
| | | // // window.clickPOI.lat, |
| | | // // p.height / 1.8 |
| | | // // ), |
| | | // // duration: 1.0, |
| | | // // }); |
| | | // } |
| | | // this.count = 0; |
| | | // }, 300); |
| | | // this.count++; |
| | | }, |
| | | datafromchild(data) { |
| | | for (var i in data) { |