|
|
|
@ -211,7 +211,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
//地图范围圆圈---重点单位
|
|
|
|
|
circle:ICircle = MapFactory.CircleInstance({ |
|
|
|
|
circle: ICircle = MapFactory.CircleInstance({ |
|
|
|
|
center: null, |
|
|
|
|
radius: 0, //半径
|
|
|
|
|
strokeOpacity: 1, |
|
|
|
@ -223,7 +223,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
zIndex: 50, |
|
|
|
|
}) |
|
|
|
|
//地图范围圆圈---水源
|
|
|
|
|
circleofwater:ICircle = MapFactory.CircleInstance({ |
|
|
|
|
circleofwater: ICircle = MapFactory.CircleInstance({ |
|
|
|
|
center: null, |
|
|
|
|
radius: 0, //半径
|
|
|
|
|
strokeOpacity: 1, |
|
|
|
@ -235,7 +235,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
zIndex: 50, |
|
|
|
|
}) |
|
|
|
|
//地图范围圆圈---消防力量
|
|
|
|
|
circleoffireForce:ICircle = MapFactory.CircleInstance({ |
|
|
|
|
circleoffireForce: ICircle = MapFactory.CircleInstance({ |
|
|
|
|
center: null, |
|
|
|
|
radius: 0, //半径
|
|
|
|
|
strokeOpacity: 1, |
|
|
|
@ -247,7 +247,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
zIndex: 50, |
|
|
|
|
}) |
|
|
|
|
//地图范围圆圈---联动力量
|
|
|
|
|
circleoflinkageForces:ICircle = MapFactory.CircleInstance({ |
|
|
|
|
circleoflinkageForces: ICircle = MapFactory.CircleInstance({ |
|
|
|
|
center: null, |
|
|
|
|
radius: 0, //半径
|
|
|
|
|
strokeOpacity: 1, |
|
|
|
@ -402,6 +402,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
this.unitCluster = MapFactory.MarkerClusterInstance(this.map, unitMarkerArrcluster, { |
|
|
|
|
gridSize: gridSize, // 设置网格像素大小
|
|
|
|
|
maxZoom :15, |
|
|
|
|
render: render //自定义聚合点样式, 自定义非聚合点样式
|
|
|
|
|
}); |
|
|
|
|
this.unitCluster.on('click', (e) => { |
|
|
|
@ -456,10 +457,17 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.renderer2.listen(this.elementRef.nativeElement.querySelector('#seePlan'), 'click', (event) => { this.seePlan(item) })//查看预案点击事件
|
|
|
|
|
this.renderer2.listen(this.elementRef.nativeElement.querySelector('#share'), 'click', (event) => { this.share(item) })//分享点击事件
|
|
|
|
|
} |
|
|
|
|
},this) |
|
|
|
|
}, this) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
setMaxZoom() { |
|
|
|
|
this.unitCluster ? this.unitCluster.setMaxZoom(0) : null |
|
|
|
|
|
|
|
|
|
this.waterCluster ? this.waterCluster.setMaxZoom(0) : null |
|
|
|
|
this.fireForceCluster ? this.fireForceCluster.setMaxZoom(0) : null |
|
|
|
|
this.linkageForcesCluster ? this.linkageForcesCluster.setMaxZoom(0) : null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//取消显示单位
|
|
|
|
|
resetUnit() { |
|
|
|
|
this.keyUnitForm.reset() |
|
|
|
@ -578,6 +586,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
this.fireForceCluster = MapFactory.MarkerClusterInstance(this.map, fireForceMarkerArrcluster, { |
|
|
|
|
gridSize: gridSize, // 设置网格像素大小
|
|
|
|
|
maxZoom :15, |
|
|
|
|
render: render //自定义聚合点样式, 自定义非聚合点样式
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -727,6 +736,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
this.linkageForcesCluster = MapFactory.MarkerClusterInstance(this.map, linkageForcesMarkerArrcluster, { |
|
|
|
|
gridSize: gridSize, // 设置网格像素大小
|
|
|
|
|
maxZoom :15, |
|
|
|
|
render: render //自定义聚合点样式, 自定义非聚合点样式
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -901,6 +911,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
// }
|
|
|
|
|
this.waterCluster = MapFactory.MarkerClusterInstance(this.map, waterMarkerArrcluster, { |
|
|
|
|
gridSize: gridSize, // 设置网格像素大小
|
|
|
|
|
maxZoom :15, |
|
|
|
|
render: render //自定义聚合点样式, 自定义非聚合点样式
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -913,7 +924,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
if (e.clusterData.length == 1) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
},this) |
|
|
|
|
}, this) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//取消显示水源
|
|
|
|
@ -1050,7 +1061,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
that.map = MapFactory.MapInstance('map', { |
|
|
|
|
layers: [layer], |
|
|
|
|
WebGLParams: {preserveDrawingBuffer: true}
|
|
|
|
|
WebGLParams: { preserveDrawingBuffer: true } |
|
|
|
|
}); |
|
|
|
|
that.map.setCity('上海市'); |
|
|
|
|
that.mouseTool = MapFactory.MouseToolInstance(that.map); |
|
|
|
@ -1063,7 +1074,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
measureDistance; //测距离
|
|
|
|
|
distanceList = []; //测距离 点和线
|
|
|
|
|
measureArea; //测面积
|
|
|
|
|
mouseTool:IMouseTool;//二合一测距和侧面积
|
|
|
|
|
mouseTool: IMouseTool;//二合一测距和侧面积
|
|
|
|
|
checkRadio = false //判断测距和侧面积是否选中
|
|
|
|
|
|
|
|
|
|
//测距离 开始
|
|
|
|
@ -1339,7 +1350,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
var autoOptions = { city: info.city } |
|
|
|
|
let keywords |
|
|
|
|
e == 0 ? keywords = that.routeStart : keywords = that.routeEnd |
|
|
|
|
var autoComplete = MapFactory.AutocompleteInstance(autoOptions,that); |
|
|
|
|
var autoComplete = MapFactory.AutocompleteInstance(autoOptions, that); |
|
|
|
|
autoComplete.search(keywords, function (status, result) { |
|
|
|
|
if (result && result.tips && result.tips.length) { //搜索到数据时
|
|
|
|
|
that._ngZone.run(() => { |
|
|
|
@ -1432,7 +1443,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
this.snackBar.open('未查询到终点坐标信息,请输入有效地址', '确定', config); |
|
|
|
|
return |
|
|
|
|
} else { |
|
|
|
|
this.routeGIS.search(this,this.startCoordinate, this.endCoordinate, |
|
|
|
|
this.routeGIS.search(this, this.startCoordinate, this.endCoordinate, |
|
|
|
|
function (status, result) { |
|
|
|
|
if (status === 'complete') { |
|
|
|
|
that.routes = result.routes[0] |
|
|
|
@ -1455,7 +1466,7 @@ export class GisLabelingComponent implements OnInit {
|
|
|
|
|
}); |
|
|
|
|
// 根据起终点名称规划驾车导航路线
|
|
|
|
|
|
|
|
|
|
this.routeGIS.search(this,this.startCoordinate, this.endCoordinate, |
|
|
|
|
this.routeGIS.search(this, this.startCoordinate, this.endCoordinate, |
|
|
|
|
function (status, result) { |
|
|
|
|
if (status === 'complete') { |
|
|
|
|
that.routes = result.routes[0] |
|
|
|
|