|
|
@ -200,7 +200,9 @@ const vueGis = { |
|
|
|
distanceMax: null,//显示的坐标距离中心点的范围 |
|
|
|
|
|
|
|
input_lat: null, |
|
|
|
input_lon: null |
|
|
|
input_lon: null, |
|
|
|
|
|
|
|
isChangeCenter: true,//是否根据多边形改变数组 |
|
|
|
} |
|
|
|
}, |
|
|
|
async mounted () { |
|
|
@ -259,12 +261,13 @@ const vueGis = { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//刷新地图 |
|
|
|
async refreshMap (mapInfo, polygonArray, iconArrays) { |
|
|
|
//刷新地图:地图信息,多边形数组,标注数组,是否根据多边形改变中心点 |
|
|
|
async refreshMap (mapInfo, polygonArray, iconArrays, isChangeCenter) { |
|
|
|
this.mapInfo = mapInfo |
|
|
|
this.polygonArray = [] |
|
|
|
this.polygonArray = polygonArray |
|
|
|
this.iconArrays = iconArrays |
|
|
|
this.isChangeCenter = isChangeCenter |
|
|
|
if (iconSource) { |
|
|
|
iconSource.clear() |
|
|
|
} |
|
|
@ -511,6 +514,11 @@ const vueGis = { |
|
|
|
}, |
|
|
|
//设置地图定位的中心点和缩放级别 |
|
|
|
setMapLocation () { |
|
|
|
|
|
|
|
if (!this.isChangeCenter) { |
|
|
|
return false |
|
|
|
} |
|
|
|
// debugger |
|
|
|
if (!this.zoom) { |
|
|
|
this.setZoom(this.mapInfo.agencyLevel) |
|
|
|
} |
|
|
|