|
|
|
@ -148,8 +148,8 @@ export class BasicinfoComponent implements OnInit {
|
|
|
|
|
var auto = new AMap.AutoComplete(autoOptions); |
|
|
|
|
this.placeSearch = new AMap.PlaceSearch(); //构造地点查询类
|
|
|
|
|
auto.on("select", (e)=>{ |
|
|
|
|
console.log(e) |
|
|
|
|
console.log( this.newPositionMarker) |
|
|
|
|
// console.log(e)
|
|
|
|
|
// console.log( this.newPositionMarker)
|
|
|
|
|
this.newPositionMarker.setPosition([e.poi.location.lng,e.poi.location.lat]) |
|
|
|
|
this.markerPosition2 = {x: e.poi.location.lng, y: e.poi.location.lat} |
|
|
|
|
this.map.setCenter([e.poi.location.lng,e.poi.location.lat]); //设置地图中心点
|
|
|
|
@ -158,7 +158,7 @@ export class BasicinfoComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if(this.isMapLabel){//如果已经标注单位坐标
|
|
|
|
|
console.log('已标注单位位置') |
|
|
|
|
// console.log('已标注单位位置')
|
|
|
|
|
this.map.setCenter([this.unitinfo.location.x,this.unitinfo.location.y]); |
|
|
|
|
this.oldPositionMarker = new AMap.Marker({ |
|
|
|
|
position: [this.unitinfo.location.x,this.unitinfo.location.y], |
|
|
|
@ -168,7 +168,7 @@ export class BasicinfoComponent implements OnInit {
|
|
|
|
|
// 将 markers 添加到地图
|
|
|
|
|
this.map.add(this.oldPositionMarker); |
|
|
|
|
}else{ |
|
|
|
|
console.log('未标注单位位置') |
|
|
|
|
// console.log('未标注单位位置')
|
|
|
|
|
this.map.setCity('广西'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -178,7 +178,7 @@ export class BasicinfoComponent implements OnInit {
|
|
|
|
|
this.isGisTopBox = false |
|
|
|
|
this.isGisTopBoxTwo = true |
|
|
|
|
if(this.isMapLabel){//如果已经标注单位坐标
|
|
|
|
|
console.log('已标注单位位置') |
|
|
|
|
// console.log('已标注单位位置')
|
|
|
|
|
|
|
|
|
|
if(this.oldPositionMarker){ |
|
|
|
|
this.oldPositionMarker.setContent(this.oldPositionMarkerContent) |
|
|
|
@ -232,7 +232,7 @@ export class BasicinfoComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
console.log('未标注单位位置') |
|
|
|
|
// console.log('未标注单位位置')
|
|
|
|
|
if(this.newPositionMarker){ |
|
|
|
|
this.newPositionMarker.setContent(this.oldPositionMarkerContent) |
|
|
|
|
} |
|
|
|
@ -364,7 +364,6 @@ export class BasicinfoComponent implements OnInit {
|
|
|
|
|
this.unitinfo = data |
|
|
|
|
|
|
|
|
|
resolve(this.unitinfo) |
|
|
|
|
console.log(456789,this.unitinfo) |
|
|
|
|
this.selectedorganizationid = data.organizationId |
|
|
|
|
if(data.imageUrl){ |
|
|
|
|
this.imgsrc = data.imageUrl |
|
|
|
|