enabled printing
This commit is contained in:
		
							parent
							
								
									2060088c6b
								
							
						
					
					
						commit
						44c38146c9
					
				@ -27,7 +27,7 @@ OSRM.init = function() {
 | 
			
		||||
	OSRM.Localization.init();
 | 
			
		||||
	OSRM.GUI.init();
 | 
			
		||||
	OSRM.Map.init();
 | 
			
		||||
	//OSRM.Printing.init();
 | 
			
		||||
	OSRM.Printing.init();
 | 
			
		||||
	OSRM.Routing.init();
 | 
			
		||||
	
 | 
			
		||||
 	// check if the URL contains some GET parameter, e.g. for showing a route
 | 
			
		||||
 | 
			
		||||
@ -95,12 +95,10 @@ show: function(response) {
 | 
			
		||||
		route_desc += '<div class="result-item">';
 | 
			
		||||
 | 
			
		||||
		// build route description
 | 
			
		||||
		if( i == 0 )
 | 
			
		||||
			route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, OSRM.loc(response.route_instructions[i][6]) );
 | 
			
		||||
		else if( response.route_instructions[i][1] != "" )
 | 
			
		||||
			route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, response.route_instructions[i][1]);
 | 
			
		||||
		if( response.route_instructions[i][1] != "" )
 | 
			
		||||
			route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, response.route_instructions[i][1]).replace(/%d/, OSRM.loc(response.route_instructions[i][6]));
 | 
			
		||||
		else
 | 
			
		||||
			route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"");
 | 
			
		||||
			route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"").replace(/%d/, OSRM.loc(response.route_instructions[i][6]));
 | 
			
		||||
 | 
			
		||||
		route_desc += '</div>';
 | 
			
		||||
		route_desc += "</td>";
 | 
			
		||||
@ -115,8 +113,6 @@ show: function(response) {
 | 
			
		||||
	route_desc += '</tbody>';
 | 
			
		||||
	route_desc += '</table>';
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	// put everything in DOM
 | 
			
		||||
	OSRM.printwindow.document.getElementById('description').innerHTML = route_desc;
 | 
			
		||||
	OSRM.printwindow.document.getElementById('overview-description').innerHTML = 
 | 
			
		||||
 | 
			
		||||
@ -35,10 +35,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
 | 
			
		||||
<link rel="stylesheet" href="printing.css" type="text/css"/>
 | 
			
		||||
 | 
			
		||||
<!-- scripts -->
 | 
			
		||||
<script src="printing.js" type="text/javascript"></script>
 | 
			
		||||
<script src="../leaflet/leaflet-src.js" type="text/javascript"></script>
 | 
			
		||||
<script src="../base/osrm/OSRM.MapView.js" type="text/javascript"></script>
 | 
			
		||||
<script src="../base/OSRM.Map.js" type="text/javascript"></script>
 | 
			
		||||
<script src="printing.js" type="text/javascript"></script>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user