功能优化
This commit is contained in:
parent
238fa360c3
commit
7509262765
|
|
@ -536,8 +536,8 @@ export default {
|
|||
this.innerVisible = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
//在线 new BMapGL
|
||||
//离线 new window.BMap
|
||||
//在线地图 new BMapGL
|
||||
//离线地图 new window.BMap
|
||||
this_.map = new window.BMap.Map('map-container'); // 创建地图实例
|
||||
let point;
|
||||
if (this_.form.lon != null && this_.form.lon !== '' && this_.form.lat != null && this_.form.lat !== '') {
|
||||
|
|
@ -549,8 +549,10 @@ export default {
|
|||
point = new window.BMap.Point(117.13805, 31.8734); // 创建点坐标
|
||||
}
|
||||
|
||||
this_.map.centerAndZoom(point, 12); // 初始化地图,设置中心点坐标和地图级别
|
||||
this_.map.centerAndZoom(point, 14); // 初始化地图,设置中心点坐标和地图级别
|
||||
this_.map.enableScrollWheelZoom(true); // 启用滚轮放大缩小
|
||||
this_.map.setMinZoom(14) // 启用滚轮放大缩小
|
||||
this_.map.setMaxZoom(14) // 启用滚轮放大缩小
|
||||
|
||||
// 禁用不必要的功能
|
||||
// this_.map.disableDragging(); // 禁用拖拽
|
||||
|
|
|
|||
Loading…
Reference in New Issue