| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import InitMap from "@/assets/js/Map"; |
| | | import { |
| | | ref, |
| | | onMounted, |
| | |
| | | }); |
| | | }; |
| | | const gridSwitch = () => { |
| | | if (!window.graticules) { |
| | | window.graticules = new SmartEarth.Cesium.Graticules( |
| | | earthCtrl.Viewer, |
| | | SmartEarth.Cesium.Color.PALEGREEN |
| | | ); |
| | | |
| | | earthCtrl.Viewer.scene.preUpdate.addEventListener(function () { |
| | | window.graticules.update(); |
| | | }); |
| | | } else { |
| | | window.graticules._enable = false; |
| | | } |
| | | // window.earthCtrl.wireframe = !window.earthCtrl.wireframe; |
| | | // gridIsshow.value = !gridIsshow.value; |
| | | // if (gridIsshow.value) { |
| | | // grid(10); |
| | | // // getHeight(); |
| | | // // createPrimitives(); |
| | | // } else { |
| | | // gridDel(); |
| | | // } |
| | | InitMap.showlonlatLine(); |
| | | }; |
| | | const getHeight = () => { |
| | | let removeListener = Viewer.camera.changed.addEventListener(() => { |