diff --git a/src/app/analyze/analyze.component.ts b/src/app/analyze/analyze.component.ts index 3028ffc..e921f87 100644 --- a/src/app/analyze/analyze.component.ts +++ b/src/app/analyze/analyze.component.ts @@ -36,24 +36,24 @@ export class AnalyzeComponent implements OnInit { let minLat: number = parseFloat(this.lat!) - 0.13; let maxLat: number = parseFloat(this.lat!) + 0.13; - this.status = "Downloading OSM data..."; + this.status = "Downloading OSM data... This might take a few minutes "; this.overpassApiService.sendQueryRequest(`${minLon},${minLat},${maxLon},${maxLat}`) - .pipe(catchError(err => { - console.error(err); - this.status = "\ + .pipe(catchError(err => { + console.error(err); + this.status = "\
You may have been set on pause by the server, because of too many requests in a short amount of time."; - return of(""); - })) - .subscribe((data: string) => { - if(data != ""){ - let osm: OSM = this.osmService.parseOsmContent(data); - // Analyze the OSM data - this.status = "Analyze OSM data..."; - this.osmAnalysis = this.osmAnalysisService.getOsmAnalysis(osm); - this.status = ""; - } - }); + return of(""); + })) + .subscribe((data: string) => { + if (data != "") { + let osm: OSM = this.osmService.parseOsmContent(data); + // Analyze the OSM data + this.status = "Analyze OSM data..."; + this.osmAnalysis = this.osmAnalysisService.getOsmAnalysis(osm); + this.status = ""; + } + }); } } diff --git a/src/app/search/search.component.html b/src/app/search/search.component.html index 518e215..ba5d51a 100644 --- a/src/app/search/search.component.html +++ b/src/app/search/search.component.html @@ -1,18 +1,38 @@