]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/graphhopper_bicycle.js
Merge pull request #13 from danstowell/jsrouting-ffoxdragok
[rails.git] / app / assets / javascripts / routing_engines / graphhopper_bicycle.js
index 6245124b1cd1ea5349027aac9e94195c719b3cb3..acf089278439db8d2445085f3ac7b23d50f77550 100644 (file)
@@ -2,6 +2,7 @@
 
 OSM.RoutingEngines.list.push({    
     name: "javascripts.directions.engines.graphhopper_bike",
+    creditline: 'Directions courtesy of <a href="http://graphhopper.com/routing/" target="_blank">Graphhopper</a>',
     draggable: true,
     _hints: {},
     getRoute: function(isFinal, points) {
@@ -16,7 +17,6 @@ OSM.RoutingEngines.list.push({
     },
     gotRoute: function(router, data) {
         if (!data.info.routeFound) {
-            alert("Couldn't find route between those two places");
             return false;
         }
         // Draw polyline
@@ -35,6 +35,7 @@ OSM.RoutingEngines.list.push({
             steps.push([{lat: latlng[0], lng: latlng[1]}, instrCode, instrText, distInMeter]);
         }
         router.setItinerary({steps: steps});
+        return true;
     },
     GH_INSTR_MAP: {
         "-3": 6, // sharp left