|
|
|
@ -166,7 +166,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('请切换2D模式使用此功能','确定',config); |
|
|
|
|
}else{ |
|
|
|
|
console.log('提交',this.selectedUnit) |
|
|
|
|
// console.log('提交',this.selectedUnit)
|
|
|
|
|
this.circle.setRadius(Number(this.unitAreaDefault)) |
|
|
|
|
this.circle.setCenter(this.markers[0]._position) |
|
|
|
|
this.circle.setMap(this.map) |
|
|
|
@ -185,7 +185,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
Distance : Distance, |
|
|
|
|
BuildingTypeIdList : this.selectedUnitList.length != 0 ? this.selectedUnitList : ['123'] |
|
|
|
|
} |
|
|
|
|
console.log(666,paramsdata) |
|
|
|
|
// console.log(666,paramsdata)
|
|
|
|
|
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any) => { |
|
|
|
|
data.items.forEach((i,index) => { |
|
|
|
|
if(i.id == this.selectedUnit.id){ |
|
|
|
@ -280,7 +280,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
text: text, |
|
|
|
|
}); |
|
|
|
|
labelMarker.on('click', (e)=>{ |
|
|
|
|
console.log(item) |
|
|
|
|
// console.log(item)
|
|
|
|
|
let markerContent =
|
|
|
|
|
`<div style="font-size: 14px" id="gispopupbox">
|
|
|
|
|
<div style="color: #0080FF;"><span style="margin-left:8px">${item.name}</span><label style="font-size: 12px; color: #999; margin-left: 10px">${item.address}</label> </div> |
|
|
|
@ -448,7 +448,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.keyUnitForm.controls.areaUnit.setValue('0') |
|
|
|
|
this.map.remove(this.circle) |
|
|
|
|
this.clearUnitMarker()//取消显示单位markers
|
|
|
|
|
console.log('取消') |
|
|
|
|
// console.log('取消')
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//取消显示水源
|
|
|
|
@ -458,7 +458,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.watertForm.reset() |
|
|
|
|
this.watertForm.controls.areaWater.setValue('0') |
|
|
|
|
this.map.remove(this.circleofwater) |
|
|
|
|
console.log('取消') |
|
|
|
|
// console.log('取消')
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//右上角点击每一个title
|
|
|
|
@ -553,6 +553,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
layers:[layer], //当只想显示标准图层时layers属性可缺省,
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
that.map.setCity('上海市'); |
|
|
|
|
AMap.plugin(["AMap.RangingTool", "AMap.MouseTool"],function () { |
|
|
|
|
that.mouseTool=new AMap.MouseTool(that.map); |
|
|
|
|
/* that.measureDistance = new AMap.RangingTool(that.map, rulerOptions); //测距离 |
|
|
|
@ -792,6 +793,9 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.leftDivState = false |
|
|
|
|
this.showLeftDiv = false |
|
|
|
|
this.isShowRouteGIS = true |
|
|
|
|
// console.log(1,e)
|
|
|
|
|
this.routeEnd = e.name |
|
|
|
|
this.endCoordinate = new AMap.LngLat(e.location.x, e.location.y) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//全景漫游
|
|
|
|
@ -864,8 +868,18 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
var autoComplete = new AMap.Autocomplete(autoOptions); |
|
|
|
|
autoComplete.search(keywords, function(status, result) { |
|
|
|
|
if (result && result.tips && result.tips.length) { //搜索到数据时
|
|
|
|
|
that._ngZone.run(()=>{
|
|
|
|
|
if(e == 0){ |
|
|
|
|
that.routeStartList = result.tips |
|
|
|
|
|
|
|
|
|
that._ngZone.run(()=>{ e == 0 ? that.routeStartList = result.tips : that.routeEndList = result.tips }); |
|
|
|
|
|
|
|
|
|
that.startCoordinate = new AMap.LngLat(result.tips[0].location.lng, result.tips[0].location.lat) |
|
|
|
|
// console.log(666,result)
|
|
|
|
|
}else{ |
|
|
|
|
that.routeEndList = result.tips
|
|
|
|
|
that.endCoordinate = new AMap.LngLat(result.tips[0].location.lng, result.tips[0].location.lat) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -880,9 +894,11 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
if (e==0) { |
|
|
|
|
this.routeStart = null |
|
|
|
|
this.routeStartList = [] |
|
|
|
|
this.startCoordinate = null |
|
|
|
|
} else { |
|
|
|
|
this.routeEnd = null |
|
|
|
|
this.routeEndList = [] |
|
|
|
|
this.endCoordinate = null |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -892,9 +908,11 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.routeStartList = [] |
|
|
|
|
this.routeEnd = null |
|
|
|
|
this.routeEndList = [] |
|
|
|
|
this.startCoordinate = null |
|
|
|
|
this.endCoordinate = null |
|
|
|
|
this.routeGIS? this.routeGIS.clear() : null |
|
|
|
|
this.routes = { distance: 0, time: 0, steps: [], } |
|
|
|
|
console.log(this.selectedUnit) |
|
|
|
|
// console.log(this.selectedUnit)
|
|
|
|
|
this.map.setZoomAndCenter(13,[this.selectedUnit.location.x,this.selectedUnit.location.y]); //设置地图中心点
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -905,9 +923,16 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.routeEnd = data |
|
|
|
|
this.routeStartList = [] |
|
|
|
|
this.routeEndList = [] |
|
|
|
|
let data2 = this.startCoordinate |
|
|
|
|
this.startCoordinate = this.endCoordinate |
|
|
|
|
this.endCoordinate = data2 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
routes:any = { distance: 0, time: 0, steps: [], };//导航查询结果 路线规划
|
|
|
|
|
|
|
|
|
|
startCoordinate:any//开始坐标
|
|
|
|
|
endCoordinate:any//结束坐标
|
|
|
|
|
|
|
|
|
|
//导航查询
|
|
|
|
|
queryGISRoute () { |
|
|
|
|
//构造路线导航类
|
|
|
|
@ -917,8 +942,10 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.routeGIS = new AMap.Driving({ |
|
|
|
|
map: this.map, |
|
|
|
|
});
|
|
|
|
|
// console.log(1,this.startCoordinate)
|
|
|
|
|
// console.log(2,this.endCoordinate)
|
|
|
|
|
// 根据起终点名称规划驾车导航路线
|
|
|
|
|
this.routeGIS.search([{keyword: this.routeStart},{keyword: this.routeEnd}], |
|
|
|
|
this.routeGIS.search(this.startCoordinate,this.endCoordinate, |
|
|
|
|
function(status, result) { |
|
|
|
|
if (status === 'complete') { |
|
|
|
|
that.routes = result.routes[0] |
|
|
|
@ -938,7 +965,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
policy: e==true? AMap.DrivingPolicy.LEAST_TIME : AMap.DrivingPolicy.REAL_TRAFFIC |
|
|
|
|
});
|
|
|
|
|
// 根据起终点名称规划驾车导航路线
|
|
|
|
|
this.routeGIS.search([{keyword: this.routeStart},{keyword: this.routeEnd}], |
|
|
|
|
this.routeGIS.search(this.startCoordinate,this.endCoordinate, |
|
|
|
|
function(status, result) { |
|
|
|
|
if (status === 'complete') { |
|
|
|
|
that.routes = result.routes[0] |
|
|
|
@ -1051,7 +1078,7 @@ export class LookPlanDialog {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
|
console.log(this.data) |
|
|
|
|
// console.log(this.data)
|
|
|
|
|
this.getAllPlans() |
|
|
|
|
} |
|
|
|
|
//关闭弹窗
|
|
|
|
@ -1073,7 +1100,7 @@ export class LookPlanDialog {
|
|
|
|
|
} |
|
|
|
|
this.http.get("/api/PlanComponents",{params:paramsData}).subscribe((data:any)=>{ |
|
|
|
|
this.allPlanComponents = data.items |
|
|
|
|
console.log(this.allPlanComponents) |
|
|
|
|
// console.log(this.allPlanComponents)
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
//查看预案
|
|
|
|
@ -1117,7 +1144,7 @@ export class LookPlanDialog {
|
|
|
|
|
dialogRef.afterClosed().subscribe( |
|
|
|
|
data=>{ |
|
|
|
|
if(data){ |
|
|
|
|
console.log(123,data) |
|
|
|
|
// console.log(123,data)
|
|
|
|
|
this.downloadFileName = data.fileName |
|
|
|
|
this.download = data |
|
|
|
|
this.downloadFile() |
|
|
|
@ -1217,7 +1244,7 @@ export class DownloadFile {
|
|
|
|
|
selectedFileData : any
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
// console.log(this.data)
|
|
|
|
|
this.name = this.data.name |
|
|
|
|
this.fileUrls = this.data.attachmentUrls |
|
|
|
|
this.fileUrls.forEach(item=>{ |
|
|
|
@ -1241,7 +1268,7 @@ export class DownloadFile {
|
|
|
|
|
|
|
|
|
|
//点击想要下载的文件
|
|
|
|
|
addurl(item,key){ |
|
|
|
|
console.log(item,key) |
|
|
|
|
// console.log(item,key)
|
|
|
|
|
this.selectedFileIndex = key |
|
|
|
|
this.selectedFileData = item |
|
|
|
|
} |
|
|
|
|