|
|
@ -22,6 +22,8 @@ export class AboutComponent implements OnInit { |
|
|
|
lat = 37.9838; |
|
|
|
lng = 23.7275; |
|
|
|
|
|
|
|
sub: any; |
|
|
|
|
|
|
|
constructor(private logsService: LogsService) {} |
|
|
|
|
|
|
|
async ngOnInit() { |
|
|
@ -36,6 +38,7 @@ export class AboutComponent implements OnInit { |
|
|
|
// Add map controls
|
|
|
|
// this.map.addControl(new mapboxgl.NavigationControl());
|
|
|
|
|
|
|
|
this.sub = interval(1000).subscribe(async val => { |
|
|
|
let data = await this.logsService.getUpdates(); |
|
|
|
for (let log of data) { |
|
|
|
if (log['gps_data']['status'] == 'A') { |
|
|
@ -59,5 +62,6 @@ export class AboutComponent implements OnInit { |
|
|
|
.addTo(this.map); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|