]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/mapquest.js
Pass on routing failures from MapQuest
[rails.git] / 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) {
-                       // *** what if no route?
+                       if (data.info.statuscode!=0) return false;
                
                        var poly=[];
                        var shape=data.route.shape.shapePoints;