From 3e15c0a164f017dbc54155d6450c68bb8a4b076b Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Wed, 9 May 2012 16:22:18 +0100 Subject: [PATCH] tests with showing routing history --- WebContent/base/OSRM.Routes.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/WebContent/base/OSRM.Routes.js b/WebContent/base/OSRM.Routes.js index 02e75f2fb..8c665f815 100644 --- a/WebContent/base/OSRM.Routes.js +++ b/WebContent/base/OSRM.Routes.js @@ -45,6 +45,7 @@ OSRM.Route.ROUTE = false; OSRM.extend( OSRM.Route,{ showRoute: function(positions, noroute) { +// if( document.getElementById('option-show-previous-routes').checked == true) // if(!this._noroute) { // this._route_history.push( this._current_route ); // if(this._route_history.length==6) { @@ -69,17 +70,20 @@ OSRM.extend( OSRM.Route,{ hideRoute: function() { this._current_route.hide(); this._unnamed_route.hide(); +// this.clearHistoryRoutes(); // activate printing OSRM.Printing.deactivate(); }, hideAll: function() { - this._current_route.hide(); - this._unnamed_route.hide(); + this.hideRoute(); this._old_route.hide(); this._noroute = OSRM.Route.ROUTE; - // activate printing - OSRM.Printing.deactivate(); - }, + }, +// clearHistoryRoutes: function() { +// for(var i=0,size=this._route_history.length; i