mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
Refactor loadGPXfiles()
Retrieve directly [path,wpoints] from getMapCoordinates[][]
This commit is contained in:
parent
ffa5ed687d
commit
5e56561576
@ -386,8 +386,7 @@ export class GalleryMapLightboxComponent implements OnChanges {
|
||||
// tslint:disable-next-line:prefer-for-of
|
||||
for (let i = 0; i < this.gpxFiles.length; i++) {
|
||||
const file = this.gpxFiles[i];
|
||||
const path = await this.mapService.getMapCoordinates(file,'trkpt');
|
||||
const wpoints = await this.mapService.getMapCoordinates(file,'wpt');
|
||||
const [path,wpoints] = await this.mapService.getMapCoordinates(file);
|
||||
if (file !== this.gpxFiles[i]) { // check race condition
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user