tongshanglei 2 years ago
parent
commit
ebc3898c5c
2 changed files with 7 additions and 6 deletions
  1. 4 3
      src/views/map/routeMap.vue
  2. 3 3
      src/views/work_box_map/routeMap.vue

+ 4 - 3
src/views/map/routeMap.vue

@@ -161,7 +161,7 @@ export default {
       const styleJson = require('@/styles/map_style.json');
       setTimeout(() => {
         map.setMapStyleV2({styleJson:styleJson});
-      }, 600);
+      }, 1000);
 
       
       this.searchControlOffset=new BMap.Size(20, 20)
@@ -287,10 +287,11 @@ export default {
         let studentWindowContent=this.createMarkerContent(data)
         var infoWindow = new BMap.InfoWindow(studentWindowContent,opts);  // 创建信息窗口对象 
         this.map.openInfoWindow(infoWindow, pt); //开启信息窗口
-        this.map.centerAndZoom(pt,19);
+        this.map.centerAndZoom(pt,17);
+
     },
     createMarkerContent(data){
-      let address
+      let address='-'
      
         var myGeo = new BMap.Geocoder();      
         // 根据坐标得到地址描述    

+ 3 - 3
src/views/work_box_map/routeMap.vue

@@ -165,7 +165,7 @@ export default {
       const styleJson = require('@/styles/map_style.json');
       setTimeout(() => {
         map.setMapStyleV2({styleJson:styleJson});
-      }, 600);
+      }, 1000);
       // this.queryLocationStationList()
       this.queryLocationList()
       // 获取风场数据
@@ -284,10 +284,10 @@ export default {
         let studentWindowContent=this.createMarkerContent(data)
         var infoWindow = new BMap.InfoWindow(studentWindowContent,opts);  // 创建信息窗口对象 
         this.map.openInfoWindow(infoWindow, pt); //开启信息窗口
-        this.map.centerAndZoom(pt,19);
+        this.map.centerAndZoom(pt,17);
     },
     createMarkerContent(data){
-      let address
+      let address='-'
      
         var myGeo = new BMap.Geocoder();      
         // 根据坐标得到地址描述