Export waypoints from BRouter-web interface. Counterpart of https://github.com/abrensch/brouter/pull/170

This commit is contained in:
Phyks (Lucas Verney) 2019-07-16 12:07:54 +02:00
parent ea9cc49dd4
commit c1169c5c6a
5 changed files with 42 additions and 8 deletions

View file

@ -111,7 +111,7 @@ L.BRouter = L.Class.extend({
return opts;
},
getUrl: function(latLngs, format, trackname) {
getUrl: function(latLngs, format, trackname, exportWaypoints) {
var urlParams = this.getUrlParams(latLngs, format);
var args = [];
@ -137,6 +137,12 @@ L.BRouter = L.Class.extend({
trackname: trackname
})
);
if (exportWaypoints)
args.push(
L.Util.template('exportWaypoints={exportWaypoints}', {
exportWaypoints: +exportWaypoints
})
);
var prepend_host = format != null;