|
|
|
@ -1417,16 +1417,15 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
toLoadGis() { |
|
|
|
|
console.log(666666, this.selectingSitePlan) |
|
|
|
|
|
|
|
|
|
this.map = |
|
|
|
|
MapFactory.MapInstance("planContainer", { |
|
|
|
|
this.map = MapFactory.MapInstance("planContainer", { |
|
|
|
|
viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D',
|
|
|
|
|
zoom: 11, //初始化地图层级
|
|
|
|
|
}); |
|
|
|
|
}).self; |
|
|
|
|
if (this.selectingSitePlan.defaultCenter) { |
|
|
|
|
this.map.self.setZoom(this.selectingSitePlan.zoomLevel); //设置地图层级
|
|
|
|
|
this.map.self.setCenter([this.selectingSitePlan.defaultCenter.x, this.selectingSitePlan.defaultCenter.y]) |
|
|
|
|
this.map.setZoom(this.selectingSitePlan.zoomLevel); //设置地图层级
|
|
|
|
|
this.map.setCenter([this.selectingSitePlan.defaultCenter.x, this.selectingSitePlan.defaultCenter.y]) |
|
|
|
|
} else { |
|
|
|
|
this.map.self.setCity('上海市'); |
|
|
|
|
this.map.setCity('上海市'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.map.on('click', (e) => { |
|
|
|
@ -1452,7 +1451,7 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 将 icon 传入 marker
|
|
|
|
|
let startMarker = new AMap.Marker({ |
|
|
|
|
let startMarker = MapFactory.MarkerInstance({ |
|
|
|
|
position: new AMap.LngLat(element.Point.x, element.Point.y), |
|
|
|
|
// 将 html 传给 content
|
|
|
|
|
content: markerContent, |
|
|
|
@ -1460,7 +1459,7 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
//offset: MapFactory.PixelInstance(-13,-30).self,
|
|
|
|
|
offset: MapFactory.PixelInstance(-13, 30).self, |
|
|
|
|
draggable: editable == '1' ? true : false, |
|
|
|
|
}); |
|
|
|
|
}).self |
|
|
|
|
|
|
|
|
|
startMarker.id = element.Id |
|
|
|
|
startMarker.on('click', (e) => { |
|
|
|
@ -2211,7 +2210,6 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
// console.log('选中图片',this.selectImage)
|
|
|
|
|
this.selectImageIndex = index |
|
|
|
|
if (this.isGis) { |
|
|
|
|
console.log(this.map) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
this.canvasData.selectTemplateData = items |
|
|
|
@ -2241,14 +2239,14 @@ export class CollectionToolsPlanComponent implements OnInit {
|
|
|
|
|
'</div>'; |
|
|
|
|
|
|
|
|
|
// 将 icon 传入 marker
|
|
|
|
|
let startMarker = new AMap.Marker({ |
|
|
|
|
let startMarker = MapFactory.MarkerInstance({ |
|
|
|
|
position: new AMap.LngLat(e.lnglat.lng, e.lnglat.lat), |
|
|
|
|
// 将 html 传给 content
|
|
|
|
|
content: markerContent, |
|
|
|
|
// 以 icon 的 [center bottom] 为原点
|
|
|
|
|
offset: MapFactory.PixelInstance(-13, -30).self, |
|
|
|
|
draggable: true, |
|
|
|
|
}); |
|
|
|
|
}).self; |
|
|
|
|
|
|
|
|
|
startMarker.id = id |
|
|
|
|
startMarker.on('click', (e) => { |
|
|
|
|