reseting now also resets OSRM.JSONP
This commit is contained in:
parent
204189c326
commit
54c0d50b68
@ -56,9 +56,6 @@ OSRM.JSONP = {
|
|||||||
clearTimeout(OSRM.JSONP.timers[id]); // clear timeout timer
|
clearTimeout(OSRM.JSONP.timers[id]); // clear timeout timer
|
||||||
OSRM.JSONP.timers[id] = undefined;
|
OSRM.JSONP.timers[id] = undefined;
|
||||||
|
|
||||||
if( OSRM.JSONP.fences[id] == undefined ) // fence to prevent execution after timeout function (when precompiled!)
|
|
||||||
return;
|
|
||||||
|
|
||||||
callback_function(response); // actual wrapped callback
|
callback_function(response); // actual wrapped callback
|
||||||
|
|
||||||
OSRM.JSONP.callbacks[id] = OSRM.JSONP.late; // clean functions
|
OSRM.JSONP.callbacks[id] = OSRM.JSONP.late; // clean functions
|
||||||
@ -85,5 +82,13 @@ OSRM.JSONP = {
|
|||||||
|
|
||||||
// OSRM.debug.log("[jsonp] init: "+id);
|
// OSRM.debug.log("[jsonp] init: "+id);
|
||||||
return true;
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
// reset all data
|
||||||
|
reset: function() {
|
||||||
|
OSRM.JSONP.fences = {};
|
||||||
|
OSRM.JSONP.callbacks = {};
|
||||||
|
OSRM.JSONP.timeouts = {};
|
||||||
|
OSRM.JSONP.timers = {};
|
||||||
}
|
}
|
||||||
};
|
};
|
@ -431,6 +431,8 @@ function resetRouting() {
|
|||||||
|
|
||||||
document.getElementById('information-box').innerHTML = "";
|
document.getElementById('information-box').innerHTML = "";
|
||||||
document.getElementById('information-box-headline').innerHTML = "";
|
document.getElementById('information-box-headline').innerHTML = "";
|
||||||
|
|
||||||
|
OSRM.JSONP.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
// click: button "reverse"
|
// click: button "reverse"
|
||||||
|
Loading…
Reference in New Issue
Block a user