From a636232f1036250bdab0e31cb205c7c2e438763c Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 2 Feb 2018 21:49:05 +0100 Subject: [PATCH] feat: improve error message if route cannot be found (fix #99) --- js/control/Message.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/control/Message.js b/js/control/Message.js index fd84f24..7bdabad 100644 --- a/js/control/Message.js +++ b/js/control/Message.js @@ -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'); },