Add reverse route button

This commit is contained in:
Gautier Pelloux-Prayer 2019-05-11 17:48:37 +02:00
parent 79ce49fdb8
commit d009aa5bc6
3 changed files with 19 additions and 2 deletions

View file

@ -299,4 +299,11 @@ BR.Routing = L.Routing.extend({
,isDrawing: function () {
return this._draw._enabled;
}
,reverse: function() {
var waypoints = this.getWaypoints();
waypoints.reverse();
this.clear();
this.setWaypoints(waypoints);
}
});