]> git.openstreetmap.org Git - rails.git/commitdiff
add a credits line for each routing service
authorDan Stowell <danstowell@users.sourceforge.net>
Sun, 23 Feb 2014 21:56:39 +0000 (21:56 +0000)
committerDan Stowell <danstowell@users.sourceforge.net>
Sun, 23 Feb 2014 21:56:39 +0000 (21:56 +0000)
app/assets/javascripts/routing.js.erb
app/assets/javascripts/routing_engines/cloudmade_foot.js
app/assets/javascripts/routing_engines/graphhopper_bicycle.js
app/assets/javascripts/routing_engines/mapquest_bicycle.js
app/assets/javascripts/routing_engines/osrm_car.js
app/assets/stylesheets/common.css.scss

index 3c6db9999888703ea310a0f0b5ef57777cf383ff..6a8961a7c8bac62c0212d4449f2b49d2601a2459 100644 (file)
@@ -211,6 +211,8 @@ OSM.Routing=function(map,name,jqSearch) {
                        $('#turnbyturn').append(row);
                        cumulative+=step[3];
                }
+               $('#sidebar_content').append('<p id="routing_credit">' + r.chosenEngine.creditline + '</p>');
+
        };
        r.clickTurn=function(num,latlng) {
                r.popup=L.popup().setLatLng(latlng).setContent("<p>"+(num+1)+"</p>").openOn(r.map);
index 5c1ba0e9716ab1088042640fab5f7470230a7a90..bee9e448a931be071d34349579f45e94c3b208f5 100644 (file)
@@ -5,6 +5,7 @@
 
 OSM.RoutingEngines.list.push({
        name: "javascripts.directions.engines.cloudmade_foot",
+       creditline: 'Directions courtesy of <a href="http://cloudmade.com/products/routing" target="_blank">Cloudmade</a>',
        draggable: false,
        CM_SPRITE_MAP: {
                "C": 1,
index 6245124b1cd1ea5349027aac9e94195c719b3cb3..bec855f88dd44e0f1b07f6cd21a537ddf18055ab 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) {
index b080969558400c03fd2d012a7d86b0697d65daed..4cff366a604d43b4668e4c1a15f4bbda7b6e890e 100644 (file)
@@ -7,6 +7,7 @@
 
 OSM.RoutingEngines.list.push({
        name: "javascripts.directions.engines.mapquest_bike",
+       creditline: 'Directions courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">',
        draggable: false,
        _hints: {},
        MQ_SPRITE_MAP: {
index 0011b02058167d33ed4fdce606e09418a6d81a2b..da94adf053aa8356c385a1aff8b9ad9562850545 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) {
index 0f306b6d3036b865c9d679ef28a621a6bc06be6c..a8fba1943fa0eee84d150d4e1cadae6185a4c45f 100644 (file)
@@ -1217,6 +1217,15 @@ tr.turn:hover {
   }
 }
 
+/* Rules for the routing sidebar */
+
+#sidebar_content {
+  #routing_credit {
+    text-align: center;
+    padding: 0.5em;
+  }
+}
+
 /* Rules for edit pages */
 
 .site-edit {