Display strava error if any

This commit is contained in:
Gautier Pelloux-Prayer 2019-03-15 19:09:51 +01:00
parent 1dffe85eb8
commit daa8abe810
2 changed files with 4 additions and 0 deletions

View file

@ -253,6 +253,9 @@
}) })
.addTo(map); .addTo(map);
layersControl.addOverlay(stravaControl.stravaLayer, i18next.t('map.layer.strava-segments')); layersControl.addOverlay(stravaControl.stravaLayer, i18next.t('map.layer.strava-segments'));
stravaControl.onError = function(err) {
BR.message.showError(i18next.t('warning.strava-error', {error: err && err.message ? err.message : err}));
}
} }
map.addControl(new BR.OpacitySlider({ map.addControl(new BR.OpacitySlider({

View file

@ -165,6 +165,7 @@
"no-response": "no response from server", "no-response": "no response from server",
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?", "no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
"profile-error": "Profile error: no or empty response from server", "profile-error": "Profile error: no or empty response from server",
"strava-error": "Error getting Strava segments: {{error}}",
"temporary-profile": "<strong>Note:</strong> Uploaded custom profiles are only cached temporarily on the server.<br/>Please save your edits to your local PC.", "temporary-profile": "<strong>Note:</strong> Uploaded custom profiles are only cached temporarily on the server.<br/>Please save your edits to your local PC.",
"upload-error": "Upload error: {{error}}" "upload-error": "Upload error: {{error}}"
} }