Open LucaMoiana opened 10 years ago
Hi Luca,
Here's the setup:
leaflet-selection.js
is a small mixin that allows keeping track of the selected item, a gpx track in this case.leaflet-distance-marker.js
adds km/mile markers along polylines. Their frequency is based on the current zoom level. It depends on leaflet-geometryutil.leaflet-gpxgroup.js
is the workhorse: it loads a set of gpx tracks, adds them to the map, draws them with different colors and lets the user select one of them at a time. The elevation control is created and updated by this object. It depends on the above modules, plus leaflet-elevation and leaflet-gpx.map.js
creates the map, the OSM layer (via leaflet-osm), and the GpxGroup.That's all. Let me know if you need any specific help (although I'm just a visitor in JS-land).
-Attila
Thanks Attila for your email. I'm far behind in the learning curve, and I don't get it. I'm adding layers via JSON, creating groups for markers and Polylines and willing to group the elevation profile so I can turn it on and off...but I'm stuck
Hi, great code you did here! I noticed You have the elevation profile for a track popping up when the tracks is selected; how did you do? I'm working on this: http://lucamoiana.github.io/maggiore/ And what I'm trying to achieve is to have the elevation profile appear when the track is selected on layer control
thanks