Browse Source

[完善]地图

master
邵佳豪 10 months ago
parent
commit
ed1f680b76
  1. 28
      src/app/gis-management/gis-labeling/gis-labeling.component.ts
  2. 1130
      src/app/statistic-analysis/home/home.component.ts
  3. 4
      src/index.html

28
src/app/gis-management/gis-labeling/gis-labeling.component.ts

@ -121,7 +121,12 @@ export class GisLabelingComponent implements OnInit {
});
});
}
ngOnInit(): void {
isHN = false; //是否是海南
async ngOnInit(): Promise<void> {
await this.getProfiles();
this.Profiles.organizationName.indexOf("海南") !== -1
? (this.isHN = true)
: (this.isHN = false);
window.setTimeout(() => {
this.mapInit();
}, 0);
@ -182,6 +187,16 @@ export class GisLabelingComponent implements OnInit {
});
}
Profiles;
getProfiles() {
return new Promise<void>((resolve, reject) => {
this.http.get("/api/Account/Profiles").subscribe((res) => {
this.Profiles = res;
resolve();
});
});
}
//构造重点单位checkbox控制器
buildUnits() {
const arr = this.keyUnitList.map((item) => {
@ -287,7 +302,7 @@ export class GisLabelingComponent implements OnInit {
ketUnitSubmit(value) {
if (this.markers.length == 0) {
let paramsdata: any = {
PageSize: 99999,
PageSize: 9999,
BuildingTypeIdList:
this.selectedUnitList.length != 0 ? this.selectedUnitList : ["123"],
};
@ -322,7 +337,7 @@ export class GisLabelingComponent implements OnInit {
if (this.unitAreaDefault == "-1") {
//如果勾选全部
let paramsdata: any = {
PageSize: 99999,
PageSize: 9999,
BuildingTypeIdList:
this.selectedUnitList.length != 0 ? this.selectedUnitList : ["123"],
};
@ -1264,7 +1279,7 @@ export class GisLabelingComponent implements OnInit {
features: ["bg", "road", "point", "building"],
mapStyle: "amap://styles/light",
});
this.map.setCity("上海市");
this.isHN ? this.map.setCity("海南省") : this.map.setCity("上海市");
}
this.satelliteModel = false;
this.loadModel = false;
@ -1284,7 +1299,7 @@ export class GisLabelingComponent implements OnInit {
layers: [layer],
WebGLParams: { preserveDrawingBuffer: true },
});
that.map.setCity("上海市");
this.isHN ? that.map.setCity("海南省") : that.map.setCity("上海市");
that.mouseTool = MapFactory.MouseToolInstance(that.map);
}
@ -1744,8 +1759,7 @@ export class GisLabelingComponent implements OnInit {
console.log("走这里了吗2", that.routeStartList);
that.routeStartList = [];
setTimeout(() => {
that.routeStartList = [...result.tips];
that.routeStartList = [...result.tips];
console.log("走这里了吗3", that.routeStartList);
}, 0);

1130
src/app/statistic-analysis/home/home.component.ts

File diff suppressed because it is too large Load Diff

4
src/index.html

@ -27,9 +27,9 @@
<!-- <script
src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=2584e43582b85680d76a515979503538&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script> -->
<!-- <script
<script
src="https://webapi.amap.com/maps?v=2.0&key=2584e43582b85680d76a515979503538&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->
<script src="https://webapi.amap.com/ui/1.1/main.js"></script>
<script src="/assets/html2canvas.js"></script>
<script type="text/javascript" src="/assets/wordexport/jquery.js"></script>
<script type="text/javascript" src="/assets/wordexport/FileSaver.js"></script>

Loading…
Cancel
Save