Commit 184e2f8a by niuxiaolin

latest ui 08/09/2019 15:11:52

parent 384dbcf9
...@@ -47,19 +47,7 @@ export class MainComponent implements OnInit { ...@@ -47,19 +47,7 @@ export class MainComponent implements OnInit {
markers: any; markers: any;
map: any; map: any;
constructor(private m:SelfMapService, private router:Router, private idService: IdService, private route: ActivatedRoute, private cd: ChangeDetectorRef, private http: HttpClient, private dynamicScriptLoader: DynamicScriptLoaderService, private modalService: ModalService, private s: DefaultService) { constructor(private m:SelfMapService, private router:Router, private idService: IdService, private route: ActivatedRoute, private cd: ChangeDetectorRef, private http: HttpClient, private dynamicScriptLoader: DynamicScriptLoaderService, private modalService: ModalService, private s: DefaultService) {
//定位山西省地图
this.opts = {
centerAndZoom: {
lat: 37.78663390039693,
lng: 112.43176242674386,
zoom: 10,
},
mapType:MapTypeEnum.BMAP_HYBRID_MAP
}
// this.opts = {
// currentCity:"山西省",
// mapType:MapTypeEnum.BMAP_HYBRID_MAP
// }
this.polylineOptions = { this.polylineOptions = {
strokeColor: 'yellow', strokeColor: 'yellow',
strokeWeight: 10 strokeWeight: 10
...@@ -178,16 +166,16 @@ export class MainComponent implements OnInit { ...@@ -178,16 +166,16 @@ export class MainComponent implements OnInit {
this.http.get<any>(this.s.basePath + "/course/list").subscribe(res => { this.http.get<any>(this.s.basePath + "/course/list").subscribe(res => {
this.courses = res.data; this.courses = res.data;
//加载全局线路 //加载全局线路
setTimeout(() => { // setTimeout(() => {
this.loadPolys(res,false); this.loadPolys(res,false);
}, 5000); //}, 5000);
}); });
this.http.get<any>(this.s.basePath + "/mapLable/list").subscribe(res => { this.http.get<any>(this.s.basePath + "/mapLable/list").subscribe(res => {
// this.maplabes = res.data; // this.maplabes = res.data;
//加载labels //加载labels
setTimeout(() => { // setTimeout(() => {
this.loadLabels(res.data); this.loadLabels(res.data);
}, 5000); //}, 5000);
}); });
this.http.get<any>(this.s.basePath + "/scetion/list").subscribe(res => { this.http.get<any>(this.s.basePath + "/scetion/list").subscribe(res => {
this.allsecs = res.data; this.allsecs = res.data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment