]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/osrm_car.js
Remove CloudMade foot engine
[rails.git] / app / assets / javascripts / routing_engines / osrm_car.js
index 0011b02058167d33ed4fdce606e09418a6d81a2b..8ff6ba482a3883cd5ea0d86643f4d0cdbe0894e1 100644 (file)
@@ -4,6 +4,7 @@
 
 OSM.RoutingEngines.list.push({
        name: "javascripts.directions.engines.osrm_car",
+       creditline: 'Directions courtesy of <a href="http://project-osrm.org/" target="_blank">OSRM</a>',
        draggable: true,
        _hints: {},
        getRoute: function(isFinal,points) {
@@ -18,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
@@ -38,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;
        }
 });