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

地图问题修改 gengdidi

parent c8b854a7
...@@ -172,7 +172,7 @@ class gaodeMap { ...@@ -172,7 +172,7 @@ class gaodeMap {
that.deleteMarker(markerType, data.deviceId); that.deleteMarker(markerType, data.deviceId);
} }
} else { } else {
map.setZoomAndCenter(13, e.target.getPosition()); //map.setZoomAndCenter(13, e.target.getPosition());
let infoWindow = new AMap.InfoWindow({ let infoWindow = new AMap.InfoWindow({
isCustom: true, isCustom: true,
offset: new AMap.Pixel(24, -38), offset: new AMap.Pixel(24, -38),
......
...@@ -267,15 +267,16 @@ export default { ...@@ -267,15 +267,16 @@ export default {
this.iconClass = "icon-create"; this.iconClass = "icon-create";
this.createValue = 0; this.createValue = 0;
this.createLabel = "新建"; this.createLabel = "新建";
this.gaoMap.closeAddMarker();
}, },
editDevice() { editDevice() {
this.targetNum = this.targetNum != 2 ? 2 : 0; this.targetNum = this.targetNum != 2 ? 2 : 0;
this.gaoMap.lineType = this.targetNum; this.gaoMap.lineType = this.targetNum;
console.log(this.gaoMap.lineType);
if (this.targetNum != 2) { if (this.targetNum != 2) {
this.gaoMap.linePolyEditorAllClose(); this.gaoMap.linePolyEditorAllClose();
} this.gaoMap.removeMarkerDragg();
this.createReset(); this.gaoMap.mapOperateType = "normal";
}else{
// 如果正在新建线条,则清空 // 如果正在新建线条,则清空
this.gaoMap.newLineReset(); this.gaoMap.newLineReset();
this.deviceType = false; this.deviceType = false;
...@@ -283,21 +284,27 @@ export default { ...@@ -283,21 +284,27 @@ export default {
this.gaoMap.addMarkerDragg(); this.gaoMap.addMarkerDragg();
// this.gaoMap.placeSearch.clear(); // this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker(); this.gaoMap.closeAddMarker();
}
this.createReset();
}, },
deleteDevice() { deleteDevice() {
this.targetNum = this.targetNum != 3 ? 3 : 0; this.targetNum = this.targetNum != 3 ? 3 : 0;
this.gaoMap.lineType = this.targetNum; this.gaoMap.lineType = this.targetNum;
if (this.targetNum != 3) {
this.gaoMap.removeMarkerDragg();
this.gaoMap.mapOperateType = "normal";
}else{
// 如果正在新建线条,则清空 // 如果正在新建线条,则清空
this.gaoMap.newLineReset(); this.gaoMap.newLineReset();
// 清空所有正在编辑状态的线 // 清空所有正在编辑状态的线
this.gaoMap.linePolyEditorAllClose(); this.gaoMap.linePolyEditorAllClose();
this.createReset();
this.deviceType = false; this.deviceType = false;
this.gaoMap.mapOperateType = "delete"; this.gaoMap.mapOperateType = "delete";
this.gaoMap.removeMarkerDragg(); this.gaoMap.removeMarkerDragg();
//this.gaoMap.placeSearch.clear(); //this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker(); this.gaoMap.closeAddMarker();
}
this.createReset();
}, },
selectDeviceType(val) { selectDeviceType(val) {
// if("add" == this.operationType){ // 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