tongshanglei 2 years ago
parent
commit
5a332b6c95
1 changed files with 9 additions and 0 deletions
  1. 9 0
      src/views/map/gpsRouteDialog.vue

+ 9 - 0
src/views/map/gpsRouteDialog.vue

@@ -205,6 +205,15 @@ export default {
       // map.centerAndZoom("杭州市滨江区", 15);
       this.searchControlOffset=new BMap.Size(20, 20)
       this.listControlOffset=new BMap.Size(20, 40)
+
+      var  mapStyle ={
+          style : "dark"  //设置地图风格为高端黑
+      }
+      this.map.setMapStyle(mapStyle);
+      const styleJson = require('@/styles/map_style.json');
+      setTimeout(() => {
+        map.setMapStyleV2({styleJson:styleJson});
+      }, 600);
       // 添加鼠标滚动缩放
       map.enableScrollWheelZoom();
       //临时写的