From: Tom Hughes Date: Mon, 12 Oct 2015 20:15:47 +0000 (+0100) Subject: Merge remote-tracking branch 'openstreetmap/pull/1068' X-Git-Tag: live~4010 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d2765cb23d5501b6f10c82afdd90a760674f542f?hp=f4a43c3ce2b1ddb1c2eab440eb3062f87015ef96 Merge remote-tracking branch 'openstreetmap/pull/1068' --- diff --git a/app/assets/images/routing-sprite.png b/app/assets/images/routing-sprite.png index 37d94886d..42ec7b4cd 100644 Binary files a/app/assets/images/routing-sprite.png and b/app/assets/images/routing-sprite.png differ diff --git a/app/assets/javascripts/index/directions/osrm.js b/app/assets/javascripts/index/directions/osrm.js index 4a42d5dc9..d9ce0a6b1 100644 --- a/app/assets/javascripts/index/directions/osrm.js +++ b/app/assets/javascripts/index/directions/osrm.js @@ -28,7 +28,8 @@ function OSRMEngine() { 'javascripts.directions.instructions.start', // 14 'javascripts.directions.instructions.destination', // 15 'javascripts.directions.instructions.against_oneway', // 16 - 'javascripts.directions.instructions.end_oneway' // 17 + 'javascripts.directions.instructions.end_oneway', // 17 + 'javascripts.directions.instructions.ferry' // 18 ]; var params = [ @@ -69,6 +70,10 @@ function OSRMEngine() { var s = data.route_instructions[i]; var linesegend; var instCodes = s[0].split('-'); + if (s[8] === 2) { + /* indicates a ferry in car routing mode, see https://github.com/Project-OSRM/osrm-backend/blob/6cbbd1e5a1b441eb27055f56956e1bac14832a58/profiles/car.lua#L151 */ + instCodes = ["18"]; + } var instText = "" + (i + 1) + ". "; var name = s[1] ? "" + s[1] + "" : I18n.t('javascripts.directions.instructions.unnamed'); if (instCodes[0] === "11" && instCodes[1]) { @@ -81,7 +86,7 @@ function OSRMEngine() { } else { linesegend = s[3] + 1; } - steps.push([line[s[3]], s[0].split('-')[0], instText, s[2], line.slice(s[3], linesegend)]); + steps.push([line[s[3]], instCodes[0], instText, s[2], line.slice(s[3], linesegend)]); } callback(false, { diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 9b795aeab..3afef70e3 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1003,7 +1003,7 @@ div.direction { height: 20px; background-repeat: no-repeat; } -@for $i from 1 through 17 { +@for $i from 1 through 18 { div.direction.i#{$i} { background-position: #{($i)*-20+20}px 0px; } }