Add message if no elevation data is available (#373)

This commit is contained in:
Gautier P 2021-03-01 20:05:29 +01:00 committed by GitHub
parent 1ff25a566e
commit 845a3f0378
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 1 deletions

View file

@ -157,6 +157,16 @@ BR.Heightgraph = function (map, layersControl, routing, pois) {
}
if (track && track.getLatLngs().length > 0) {
// there is no elevation data available above 60°N, except within 10°E-30°E (issue #365)
if (
track.getLatLngs().filter(function (point) {
return point.alt !== undefined;
}).length == 0
) {
$('#no-elevation-data').show();
} else {
$('#no-elevation-data').hide();
}
var geojsonFeatures = geoDataExchange.buildGeojsonFeatures(track.getLatLngs());
this.addData(geojsonFeatures);