|
|
@ -127,12 +127,12 @@ export class BasicinfoComponent implements OnInit { |
|
|
|
search(){ |
|
|
|
search(){ |
|
|
|
this.placeSearch.search(this.searchTitle, (status, result) => { |
|
|
|
this.placeSearch.search(this.searchTitle, (status, result) => { |
|
|
|
// 搜索成功时,result即是对应的匹配数据
|
|
|
|
// 搜索成功时,result即是对应的匹配数据
|
|
|
|
console.log(146,this.searchTitle) |
|
|
|
|
|
|
|
console.log(147,result) |
|
|
|
|
|
|
|
if(result.info == "OK"){ |
|
|
|
if(result.info == "OK"){ |
|
|
|
this.newPositionMarker.setPosition([result.poiList.pois[0].location.lng,result.poiList.pois[0].location.lat]) |
|
|
|
this.newPositionMarker.setPosition([result.poiList.pois[0].location.lng,result.poiList.pois[0].location.lat]) |
|
|
|
this.markerPosition2 = {x: result.poiList.pois[0].location.lng, y: result.poiList.pois[0].location.lat} |
|
|
|
this.markerPosition2 = {x: result.poiList.pois[0].location.lng, y: result.poiList.pois[0].location.lat} |
|
|
|
this.map.setCenter([result.poiList.pois[0].location.lng,result.poiList.pois[0].location.lat]); //设置地图中心点
|
|
|
|
this.map.setCenter([result.poiList.pois[0].location.lng,result.poiList.pois[0].location.lat]); //设置地图中心点
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
alert('查询不到输入地址信息') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
@ -1219,7 +1219,7 @@ export class BasicinfoComponent implements OnInit { |
|
|
|
if(invalid){ |
|
|
|
if(invalid){ |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.verticalPosition = 'top'; |
|
|
|
config.duration = 3000 |
|
|
|
config.duration = 3000
|
|
|
|
this.snackBar.open('请填写必填项','确定',config); |
|
|
|
this.snackBar.open('请填写必填项','确定',config); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
sessionStorage.setItem('buildingTypeId',value.unittype) |
|
|
|
sessionStorage.setItem('buildingTypeId',value.unittype) |
|
|
|