This commit is contained in:
DennisSchiefer
2012-05-10 12:52:55 +01:00
parent 224c55dec1
commit 47b2268504
4 changed files with 74 additions and 43 deletions
+10
View File
@@ -65,6 +65,16 @@ showRouteSimple: function(response) {
} else {
OSRM.RoutingGeometry.show(response);
OSRM.RoutingDescription.showSimple(response);
// store history route
var route = OSRM.G.route;
if( document.getElementById('option-show-previous-routes').checked == true) {
if(route._noroute != OSRM.Route.NOROUTE) {
for(var i=route._route_history.length-1; i>0; i--)
route._route_history[i].setPositions( route._route_history[i-1].getPositions() );
route._route_history[0].setPositions( route._current_route.getPositions() );
}
}
}
OSRM.Routing._updateHints(response);