Commit 895be7a0 by niuxiaolin

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

parent 088531f5
......@@ -70,7 +70,7 @@
</fieldset>
<fieldset>
<legend>普通干线</legend>
<legend (click)="toNormalWay()">普通干线</legend>
<div class="proj-info" *ngIf="!normalShow">
<label>
......@@ -101,10 +101,15 @@
</div>
</label>
</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>
</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>
</fieldset>
</div>
......
......@@ -319,15 +319,18 @@ export class MainComponent implements OnInit {
//map.setViewport(allPoints.map(p => ({ lng: p[0], lat: p[1] })));
}
toNormal() {
this.map.clearOverlays();
toNormalWay() {
this.normalShow = !this.normalShow;
this.http.get<any>(this.s.basePath + `/project/list/${markType.NORMAL}`).subscribe(res => {
this.normalProjects = res.data;
});
if (this.normalShow) {
///map.clearOverlays();
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) {
......
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