wesmiler 6 년 전
부모
커밋
8b632cec41
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      public/static/weixin/js/shop-map.js

+ 8 - 0
public/static/weixin/js/shop-map.js

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