How to add the Download button to a gpxGroup map
marcoA152 opened this issue · comments
Hallo. I'm sorry to bother you but I struggling with this (my) issue: I'm trying to add a Download button to a multiple .gpx tracks map from your examples.
On single gpx file map the button is shown but on multiple gpx map is not present. There is a way to add it?
Thanks in advance
Hi Marco,
probably when using the L.GpxGroup
class the following variable is not setted:
this._downloadURL = url; // see: leaflet-elevation/src/control.js#741
Take a look at this other #160 (comment) to start monkey patching that class as you wish (aka L.Class.include()).
👋 Raruto
leaflet-gpxgroup.js
leaflet-elevation/libs/leaflet-gpxgroup.js
Lines 172 to 177 in ea15556
leaflet-elevation.js
leaflet-elevation/src/control.js
Lines 1300 to 1312 in ea15556
leaflet-elevation/src/control.js
Lines 737 to 745 in ea15556
Thank you i will try the way you have suggested, but but probably the fastest (and dirt) thing to do is to put a direct anchor to the gpx files under the "elevation-div"
Thanks for your work and for this amazing plugin!