Merge pull request #102 from bagage/fix/improve-error-no-route-99

feat: improve error message if route cannot be found (fix #99)
This commit is contained in:
Norbert Renner 2018-02-03 11:33:41 +01:00 committed by GitHub
commit f3d08c7136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,6 +34,9 @@ BR.Message = L.Class.extend({
},
showError: function (err) {
if (err == 'Error: target island detected for section 0\n') {
err = 'Error: cannot find a route for given points. Maybe try to move them closer to roads?';
}
this._show(err, 'error');
},