]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/osrm_car.js
Improve error-handling
[rails.git] / app / assets / javascripts / routing_engines / osrm_car.js
index da94adf053aa8356c385a1aff8b9ad9562850545..8ff6ba482a3883cd5ea0d86643f4d0cdbe0894e1 100644 (file)
@@ -19,7 +19,6 @@ OSM.RoutingEngines.list.push({
        },
        gotRoute: function(router,data) {
                if (data.status==207) {
-                       alert("Couldn't find route between those two places");
                        return false;
                }
                // Draw polyline
@@ -39,5 +38,6 @@ OSM.RoutingEngines.list.push({
                        steps.push([line[s[3]], s[0].split('-')[0], instText, s[2]]);
                }
                if (steps.length) router.setItinerary({ steps: steps });
+               return true;
        }
 });