diff --git a/WebContent/printing/OSRM.Printing.js b/WebContent/printing/OSRM.Printing.js index 5907af799..e6e313fa1 100644 --- a/WebContent/printing/OSRM.Printing.js +++ b/WebContent/printing/OSRM.Printing.js @@ -61,44 +61,81 @@ deactivate: function() { // use hide route as trigger // create UI in printwindow show: function(response) { - // create header + // create header (using tables for compatibility with IE quirks mode) var header = '' + - '
' + - '
' + + '' + + '' + - '
' + - '
' + - '
' + - '
' + OSRM.loc("GUI_START")+ ':
' + - '
' + document.getElementById("gui-input-source").value + '
' + - '
' + - '
' + - '
' + OSRM.loc("GUI_END")+ ':
' + - '
' + document.getElementById("gui-input-target").value + '
' + - '
' + - '
' + - '
' + + '' + - '
' + - '
' + - '
' + - '
' + OSRM.loc("DISTANCE")+':
' + - '
' + OSRM.Utils.toHumanDistance(response.route_summary.total_distance) + '
' + - '
' + - '
' + - '
' + OSRM.loc("DURATION")+':
' + - '
' + OSRM.Utils.toHumanTime(response.route_summary.total_time) + '
' + - '
' + - '
' + - '
' + + '' + - '' + - '' + + '' + + '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
' + OSRM.loc("GUI_START")+ ': ' + document.getElementById("gui-input-source").value + '
' + OSRM.loc("GUI_END")+ ': ' + document.getElementById("gui-input-target").value + '
' + + '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
' + OSRM.loc("DISTANCE")+': ' + OSRM.Utils.toHumanDistance(response.route_summary.total_distance) + '
' + OSRM.loc("DURATION")+': ' + OSRM.Utils.toHumanTime(response.route_summary.total_time) + '
' + + '
' + '
' + ''; +// var header = +// '' + +// +// '
' + +// '
' + +// +// '
' + +// '
' + +// '
' + +// '
' + OSRM.loc("GUI_START")+ ':
' + +// '
' + document.getElementById("gui-input-source").value + '
' + +// '
' + +// '
' + +// '
' + OSRM.loc("GUI_END")+ ':
' + +// '
' + document.getElementById("gui-input-target").value + '
' + +// '
' + +// '
' + +// '
' + +// +// '
' + +// '
' + +// '
' + +// '
' + OSRM.loc("DISTANCE")+':
' + +// '
' + OSRM.Utils.toHumanDistance(response.route_summary.total_distance) + '
' + +// '
' + +// '
' + +// '
' + OSRM.loc("DURATION")+':
' + +// '
' + OSRM.Utils.toHumanTime(response.route_summary.total_time) + '
' + +// '
' + +// '
' + +// '
' + +// +// '
' + +// '
' + +// +// '
' + +// ''; // create route description var body = ''; @@ -122,8 +159,7 @@ show: function(response) { body += ""; body += ''; - if( i != response.route_instructions.length-1 ) - body += ''+OSRM.Utils.toHumanDistance(response.route_instructions[i][2])+''; + body += (i == response.route_instructions.length-1) ? ' ' : ''+OSRM.Utils.toHumanDistance(response.route_instructions[i][2])+''; // fill last entry with a space body += ""; body += ""; @@ -141,7 +177,7 @@ show: function(response) { var zoom = print_window.OSRM.drawMap( OSRM.DEFAULTS.TILE_SERVERS[tile_server_id], new L.LatLngBounds( positions ) ); // draw markers - print_window.OSRM.prefetchIcons( OSRM.G.images, OSRM.Printing.BASE_DIRECTORY ); + print_window.OSRM.prefetchIcons( OSRM.G.images ); print_window.OSRM.drawMarkers( OSRM.G.markers.route ); // draw route & query for better geometry diff --git a/WebContent/printing/printing.css b/WebContent/printing/printing.css index db8a09845..62cce0f81 100644 --- a/WebContent/printing/printing.css +++ b/WebContent/printing/printing.css @@ -192,7 +192,7 @@ div.label } .medium-font { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10.5px; + font-size: 10.5px; /* will be 10px in IE quirks mode */ font-weight: normal; } .small-font { diff --git a/WebContent/printing/printing.html b/WebContent/printing/printing.html index 37d8ada84..079362dec 100644 --- a/WebContent/printing/printing.html +++ b/WebContent/printing/printing.html @@ -28,6 +28,7 @@ or see http://www.gnu.org/licenses/agpl.txt. OSRM Website + diff --git a/WebContent/printing/printing.js b/WebContent/printing/printing.js index 37bfd8063..c3e2a8002 100644 --- a/WebContent/printing/printing.js +++ b/WebContent/printing/printing.js @@ -32,7 +32,7 @@ function printWindow() { //prefetch icons OSRM.GLOBALS.icons = {}; -OSRM.prefetchIcons = function(images_list, BASE_DIRECTORY) { +OSRM.prefetchIcons = function(images_list) { var icon_list = [ {id:'marker-source', image_id:'marker-source'}, {id:'marker-target', image_id:'marker-target'}, {id:'marker-via', image_id:'marker-via'}, @@ -41,8 +41,9 @@ OSRM.prefetchIcons = function(images_list, BASE_DIRECTORY) { for(var i=0; i