|
|
|
@ -1400,15 +1400,24 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
this.showInfoClick(e) |
|
|
|
|
}); |
|
|
|
|
this.map.on("complete", () => { |
|
|
|
|
|
|
|
|
|
for (const key in this.canvasData.originaleveryStoreyData.data) { |
|
|
|
|
if (Object.prototype.hasOwnProperty.call(this.canvasData.originaleveryStoreyData.data, key)) { |
|
|
|
|
const element = this.canvasData.originaleveryStoreyData.data[key]; |
|
|
|
|
let markerContent = '' + |
|
|
|
|
let editable = sessionStorage.getItem('editable') |
|
|
|
|
let markerContent
|
|
|
|
|
if(editable == '1') { |
|
|
|
|
markerContent = '' + |
|
|
|
|
'<div class="custom-content-marker" id="xxxx">' + |
|
|
|
|
`<img src="${element.ImageUrl}">` + |
|
|
|
|
`<div class="close-btn" onclick='deleteMarker()'>X</div>` + |
|
|
|
|
'</div>'; |
|
|
|
|
}else{ |
|
|
|
|
markerContent = '' + |
|
|
|
|
'<div class="custom-content-marker" id="xxxx">' + |
|
|
|
|
`<img src="${element.ImageUrl}">` + |
|
|
|
|
'</div>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 将 icon 传入 marker
|
|
|
|
|
let startMarker = new AMap.Marker({ |
|
|
|
|
position: new AMap.LngLat(element.Point.x, element.Point.y), |
|
|
|
@ -1416,7 +1425,7 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
content: markerContent, |
|
|
|
|
// 以 icon 的 [center bottom] 为原点
|
|
|
|
|
offset: new AMap.Pixel(-13, -30), |
|
|
|
|
draggable: true, |
|
|
|
|
draggable: editable == '1' ? true : false, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
startMarker.id = element.Id |
|
|
|
@ -1434,8 +1443,9 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
this.map.add(startMarker); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
this.map.on('rightclick', (e) => { |
|
|
|
|
this.selectImage.imageUrl = null |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2155,7 +2165,7 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
selectImg(item, items, index) { |
|
|
|
|
//如果是gis
|
|
|
|
|
this.selectLibrary = item.name |
|
|
|
|
this.selectImage = items |
|
|
|
|
this.selectImage = JSON.parse(JSON.stringify(items))
|
|
|
|
|
// console.log('选中图片',this.selectImage)
|
|
|
|
|
this.selectImageIndex = index |
|
|
|
|
if (this.isGis) { |
|
|
|
@ -2175,7 +2185,7 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
//地图单击事件
|
|
|
|
|
clickId |
|
|
|
|
showInfoClick(e) { |
|
|
|
|
if (!this.selectImage.imageUrl) { |
|
|
|
|
if (!this.selectImage || !this.selectImage.imageUrl) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.canvasData.isChange = true |
|
|
|
|