]> git.openstreetmap.org Git - rails.git/commitdiff
Pass on routing failures from MapQuest
authorRichard Fairhurst <richard@systemeD.net>
Sat, 8 Mar 2014 14:14:43 +0000 (14:14 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Sat, 8 Mar 2014 14:14:43 +0000 (14:14 +0000)
app/assets/javascripts/routing_engines/mapquest.js

index 598614c2977c1be80a0561f5658c5ec9eb2e1aa0..bd580da3e34ca602fc45a6099fbccb7f01e004da 100644 (file)
@@ -51,7 +51,7 @@ MapQuestEngine.prototype.createConfig = function() {
                        this.requestCORS(url);
                },
                gotRoute: function(router,data) {
                        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;
                
                        var poly=[];
                        var shape=data.route.shape.shapePoints;