Commit 895be7a0 by niuxiaolin

latest ui 08/20/2019 10:52:31

parent 088531f5
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>普通干线</legend> <legend (click)="toNormalWay()">普通干线</legend>
<div class="proj-info" *ngIf="!normalShow"> <div class="proj-info" *ngIf="!normalShow">
<label> <label>
...@@ -101,10 +101,15 @@ ...@@ -101,10 +101,15 @@
</div> </div>
</label> </label>
</div> </div>
<section *ngIf="normalShow" class="sub"> <!-- <section *ngIf="normalShow" class="sub">
<label (click)="highLight(i,prj)" *ngFor="let prj of normalProjects;let i=index">{{prj.name}} <label (click)="highLight(i,prj)" *ngFor="let prj of normalProjects;let i=index">{{prj.name}}
</label> </label>
</section> -->
<section *ngIf="normalShow" class="sub">
<div class="item" *ngFor="let prj of normalProjects;let i=index">
<label (click)="highLight(i,prj,'p');setPrj(prj);">{{prj.name}} </label>
</div>
</section> </section>
</fieldset> </fieldset>
</div> </div>
......
...@@ -319,15 +319,18 @@ export class MainComponent implements OnInit { ...@@ -319,15 +319,18 @@ export class MainComponent implements OnInit {
//map.setViewport(allPoints.map(p => ({ lng: p[0], lat: p[1] }))); //map.setViewport(allPoints.map(p => ({ lng: p[0], lat: p[1] })));
} }
toNormal() { toNormalWay() {
this.map.clearOverlays();
this.normalShow = !this.normalShow; this.normalShow = !this.normalShow;
if (this.normalShow) {
this.http.get<any>(this.s.basePath + `/project/list/${markType.NORMAL}`).subscribe(res => { ///map.clearOverlays();
this.normalProjects = res.data; this.http.get<any>(this.s.basePath + `/project/list/${markType.NORMAL}`).subscribe(res => {
this.projects = res.data;
}); var points = this.loadPolys(res,true);
});
}else{
this.map.centerAndZoom("山西省",8);
}
} }
openDialog(id: string) { openDialog(id: string) {
......
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