Commit 3da0c3a3 authored by 耿迪迪's avatar 耿迪迪

地图问题修改 gengdidi

parent c8b854a7
......@@ -172,7 +172,7 @@ class gaodeMap {
that.deleteMarker(markerType, data.deviceId);
}
} else {
map.setZoomAndCenter(13, e.target.getPosition());
//map.setZoomAndCenter(13, e.target.getPosition());
let infoWindow = new AMap.InfoWindow({
isCustom: true,
offset: new AMap.Pixel(24, -38),
......
......@@ -267,37 +267,44 @@ export default {
this.iconClass = "icon-create";
this.createValue = 0;
this.createLabel = "新建";
this.gaoMap.closeAddMarker();
},
editDevice() {
this.targetNum = this.targetNum != 2 ? 2 : 0;
this.gaoMap.lineType = this.targetNum;
console.log(this.gaoMap.lineType);
if (this.targetNum != 2) {
this.gaoMap.linePolyEditorAllClose();
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
}else{
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
this.deviceType = false;
this.gaoMap.mapOperateType = "edit";
this.gaoMap.addMarkerDragg();
// this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
}
this.createReset();
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
this.deviceType = false;
this.gaoMap.mapOperateType = "edit";
this.gaoMap.addMarkerDragg();
// this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
},
deleteDevice() {
this.targetNum = this.targetNum != 3 ? 3 : 0;
this.gaoMap.lineType = this.targetNum;
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
// 清空所有正在编辑状态的线
this.gaoMap.linePolyEditorAllClose();
if (this.targetNum != 3) {
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
}else{
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
// 清空所有正在编辑状态的线
this.gaoMap.linePolyEditorAllClose();
this.deviceType = false;
this.gaoMap.mapOperateType = "delete";
this.gaoMap.removeMarkerDragg();
//this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
}
this.createReset();
this.deviceType = false;
this.gaoMap.mapOperateType = "delete";
this.gaoMap.removeMarkerDragg();
//this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
},
selectDeviceType(val) {
// if("add" == this.operationType){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment