wesmiler 6 年之前
父節點
當前提交
22943bd1ad
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      public/static/weixin/js/shop-map.js

+ 3 - 6
public/static/weixin/js/shop-map.js

@@ -60,12 +60,9 @@ var app = new Vue({
             _this.map.disableDoubleClickZoom();    //启用地图惯性拖拽,默认禁用
             _this.map.disableDoubleClickZoom();    //启用地图惯性拖拽,默认禁用
 
 
             // 控件
             // 控件
-            var navigationControl = new BMap.NavigationControl({
-                // 启用显示定位
-                enableGeolocation: true
-            });
-
-            _this.map.addControl(navigationControl);
+            // 添加定位控件
+            var geolocationControl = new BMap.GeolocationControl();
+            _this.map.addControl(geolocationControl);
 
 
             _this.loadLocation();
             _this.loadLocation();