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,37 +267,44 @@ export default { ...@@ -267,37 +267,44 @@ 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.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.createReset();
// 如果正在新建线条,则清空
this.gaoMap.newLineReset();
this.deviceType = false;
this.gaoMap.mapOperateType = "edit";
this.gaoMap.addMarkerDragg();
// this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
}, },
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.newLineReset(); this.gaoMap.removeMarkerDragg();
// 清空所有正在编辑状态的线 this.gaoMap.mapOperateType = "normal";
this.gaoMap.linePolyEditorAllClose(); }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.createReset();
this.deviceType = false;
this.gaoMap.mapOperateType = "delete";
this.gaoMap.removeMarkerDragg();
//this.gaoMap.placeSearch.clear();
this.gaoMap.closeAddMarker();
}, },
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