Merge pull request #226 from bagage/222-add-users-poi

export user's POI (point of interest)
This commit is contained in:
Norbert Renner 2019-10-10 22:17:44 +02:00 committed by GitHub
commit ddf8e27085
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 260 additions and 35 deletions

View file

@ -1,8 +1,9 @@
BR.Export = L.Class.extend({
latLngs: [],
initialize: function(router) {
initialize: function(router, pois) {
this.router = router;
this.pois = pois;
this.exportButton = $('#exportButton');
var trackname = (this.trackname = document.getElementById('trackname'));
this.tracknameAllowedChars = BR.conf.tracknameAllowedChars;
@ -38,7 +39,7 @@ BR.Export = L.Class.extend({
var name = encodeURIComponent(exportForm['trackname'].value);
var includeWaypoints = exportForm['include-waypoints'].checked;
var uri = this.router.getUrl(this.latLngs, format, name, includeWaypoints);
var uri = this.router.getUrl(this.latLngs, this.pois.getMarkers(), format, name, includeWaypoints);
var evt = document.createEvent('MouseEvents');
evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);