Cancel any outstanding route when starting a new one

Fixes #913
This commit is contained in:
Tom Hughes 2015-02-26 18:39:31 +00:00
parent 4b2c64fbed
commit 4254a1f291
4 changed files with 8 additions and 6 deletions

View file

@ -32,7 +32,7 @@ function GraphHopperEngine(id, vehicleParam) {
url += "&point=" + points[i].lat + ',' + points[i].lng;
}
$.ajax({
return $.ajax({
url: url,
dataType: 'jsonp',
success: function (data) {

View file

@ -42,7 +42,7 @@ function MapQuestEngine(id, vehicleParam) {
url += "&manMaps=false";
url += "&shapeFormat=raw&generalize=0&unit=k";
$.ajax({
return $.ajax({
url: url,
success: function (data) {
if (data.info.statuscode !== 0)

View file

@ -44,7 +44,7 @@ function OSRMEngine() {
url += "&checksum=" + hintData.checksum;
}
$.ajax({
return $.ajax({
url: url,
dataType: 'json',
success: function (data) {