Merge pull request #221 from Phyks/exportWaypoints
Export waypoints from BRouter-web interface
This commit is contained in:
commit
4b470ab0b6
3 changed files with 35 additions and 2 deletions
|
|
@ -45,8 +45,14 @@ BR.Export = L.Class.extend({
|
|||
exportForm['format'].value ||
|
||||
$('#export-format input:radio:checked').val();
|
||||
var name = encodeURIComponent(exportForm['trackname'].value);
|
||||
var includeWaypoints = exportForm['include-waypoints'].checked;
|
||||
|
||||
var uri = this.router.getUrl(this.latLngs, format, name);
|
||||
var uri = this.router.getUrl(
|
||||
this.latLngs,
|
||||
format,
|
||||
name,
|
||||
includeWaypoints
|
||||
);
|
||||
|
||||
var evt = document.createEvent('MouseEvents');
|
||||
evt.initMouseEvent(
|
||||
|
|
|
|||
|
|
@ -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,7 @@ L.BRouter = L.Class.extend({
|
|||
trackname: trackname
|
||||
})
|
||||
);
|
||||
if (exportWaypoints) args.push('exportWaypoints=1');
|
||||
|
||||
var prepend_host = format != null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue