From 9468898e83478c60165b987350f35edb6d1c77f8 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期五, 17 三月 2023 09:34:27 +0800
Subject: [PATCH] 底图切换

---
 src/components/MapDiv.vue |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/components/MapDiv.vue b/src/components/MapDiv.vue
index d28f4f8..b926a6d 100644
--- a/src/components/MapDiv.vue
+++ b/src/components/MapDiv.vue
@@ -23,20 +23,25 @@
     >
       <mapol></mapol>
     </div>
+    <add-online-map ref="addOnlineMap" />
   </div>
 </template>
 
 <script>
+
 import mapsdk from "./mapsdk"
 import mapol from "./mapol"
 import { transform } from "ol/proj"
 import ol from "ol"
 import $ from "jquery"
+import AddOnlineMap from '../views/Tools/AddOnlineMap.vue'
 export default {
   name: "",
+
   components: {
     mapsdk,
     mapol,
+    AddOnlineMap
   },
   data() {
     return {
@@ -222,8 +227,17 @@
       }
       return this.levelArray[this.levelArray.length - 1]
     },
+    showBaseMapLayer() {
+      this.$refs && this.$refs.addOnlineMap && this.$refs.addOnlineMap.open("鍦颁笅妯″紡", null);
+    }
   },
   mounted() {
+    this.$bus.$on("setChangeBaseMapLayer", (res) => {
+      this.showBaseMapLayer()
+
+
+    })
+    // 
     this.$bus.$on("changemap", e => {
       if (this.isSplitFlag == 1) {
         this.changeMap(3)

--
Gitblit v1.9.3