|
@@ -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();
|
|
|
|
|
|