Skip to content

Commit

Permalink
Merge pull request #5 from inelo/feature/abort-routing-request
Browse files Browse the repository at this point in the history
Return corslite xhr from route instead this instance
  • Loading branch information
Daredzik authored Sep 11, 2020
2 parents 230a25e + 5cf89fa commit f613130
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/L.Routing.Here.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// Let reference here, problem when reverse geocoding point took to long, didnt have name here
wps = waypoints;

corslite(url, L.bind(function (err, resp) {
return corslite(url, L.bind(function (err, resp) {
var data;

clearTimeout(timer);
Expand All @@ -65,13 +65,12 @@
} else {
callback.call(context || callback, {
status: -1,
message: 'HTTP request failed: ' + err
message: 'HTTP request failed: ' + err,
type: err.type
});
}
}
}, this));

return this;
},

_routeDone: function (response, inputWaypoints, callback, context) {
Expand Down Expand Up @@ -293,8 +292,7 @@
type: instruction.action,
road: instruction.roadName
};
},

}
});

L.Routing.here = function (appId, appCode, options) {
Expand Down

0 comments on commit f613130

Please sign in to comment.