added functions to check whether source or target exists,
readded routing button
This commit is contained in:
		
							parent
							
								
									9c2a1dc37f
								
							
						
					
					
						commit
						6a9216d6e4
					
				@ -82,8 +82,8 @@ OSRM.Localization["en"] = {
 | 
			
		||||
//gui
 | 
			
		||||
"GUI_START": "Start",
 | 
			
		||||
"GUI_END": "End",
 | 
			
		||||
"GUI_RESET": "  Reset  ",
 | 
			
		||||
"GUI_SEARCH": " Search ",
 | 
			
		||||
"GUI_RESET": "Reset",
 | 
			
		||||
"GUI_SEARCH": "Search",
 | 
			
		||||
"GUI_ROUTE": "Route",
 | 
			
		||||
"GUI_REVERSE": "Reverse",
 | 
			
		||||
"GUI_OPTIONS": "Options",
 | 
			
		||||
 | 
			
		||||
@ -206,5 +206,15 @@ removeMarker: function(id) {
 | 
			
		||||
	
 | 
			
		||||
	this.route[id].hide();
 | 
			
		||||
	this.route.splice(id, 1);
 | 
			
		||||
},
 | 
			
		||||
hasSource: function() {
 | 
			
		||||
	if( my_markers.route[0] && my_markers.route[0].label == OSRM.SOURCE_MARKER_LABEL )
 | 
			
		||||
		return true;
 | 
			
		||||
	return false;
 | 
			
		||||
},
 | 
			
		||||
hasTarget: function() {
 | 
			
		||||
	if( my_markers.route[my_markers.route.length-1] && my_markers.route[my_markers.route.length-1].label == OSRM.TARGET_MARKER_LABEL )
 | 
			
		||||
		return true;
 | 
			
		||||
	return false;
 | 
			
		||||
}
 | 
			
		||||
});
 | 
			
		||||
@ -108,11 +108,8 @@ or see http://www.gnu.org/licenses/agpl.txt.
 | 
			
		||||
    <table style="width:100%">
 | 
			
		||||
    <tr>
 | 
			
		||||
    <td>				<a class="button not-selectable" id="gui-reset" onclick="resetRouting();">Reset</a></td>
 | 
			
		||||
    <!-- 
 | 
			
		||||
    <td class="center">	<a class="button not-selectable" id="gui-reverse" onclick="reverseRouting();">Reverse</a></td>
 | 
			
		||||
    <td class="right">	<a class="button not-selectable" id="gui-route" onclick="startRouting();">Route</a></td>
 | 
			
		||||
    -->
 | 
			
		||||
    <td class="right">	<a class="button not-selectable" id="gui-reverse" onclick="centerRoute();">Reverse</a></td>
 | 
			
		||||
    <td class="right">	<a class="button not-selectable" id="gui-route" onclick="centerRoute();">Route</a></td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    </table>
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user