1
0
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:
zigmhount 2022-03-09 20:40:52 +01:00 committed by GitHub
parent ffa5ed687d
commit 5e56561576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}