wesmiler 6 yıl önce
ebeveyn
işleme
22943bd1ad
1 değiştirilmiş dosya ile 3 ekleme ve 6 silme
  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();    //启用地图惯性拖拽,默认禁用
 
             // 控件
-            var navigationControl = new BMap.NavigationControl({
-                // 启用显示定位
-                enableGeolocation: true
-            });
-
-            _this.map.addControl(navigationControl);
+            // 添加定位控件
+            var geolocationControl = new BMap.GeolocationControl();
+            _this.map.addControl(geolocationControl);
 
             _this.loadLocation();