From: Richard Fairhurst Date: Sat, 8 Mar 2014 14:14:43 +0000 (+0000) Subject: Pass on routing failures from MapQuest X-Git-Tag: live~4781^2~28 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/15904542a6694248c08cbcb06739e4788bf59f2a?ds=sidebyside Pass on routing failures from MapQuest --- diff --git a/app/assets/javascripts/routing_engines/mapquest.js b/app/assets/javascripts/routing_engines/mapquest.js index 598614c29..bd580da3e 100644 --- a/app/assets/javascripts/routing_engines/mapquest.js +++ b/app/assets/javascripts/routing_engines/mapquest.js @@ -51,7 +51,7 @@ MapQuestEngine.prototype.createConfig = function() { this.requestCORS(url); }, gotRoute: function(router,data) { - // *** what if no route? + if (data.info.statuscode!=0) return false; var poly=[]; var shape=data.route.shape.shapePoints;