Raruto / leaflet-elevation

Leaflet plugin that allows to add elevation profiles using d3js
GNU General Public License v3.0
255 stars 85 forks source link

Hoverable tracks example not compatible with latest leaflet-elevation #74

Closed marcin-gryszkalis closed 4 years ago

marcin-gryszkalis commented 4 years ago

https://github.com/Raruto/leaflet-elevation/blob/464a5ed0aa98691e970d4c943b268897624864b9/examples/leaflet-elevation_hoverable-tracks.html#L32

Version 0.3.4 works ok, higher cause different types of errors, with the last one (1.3.5 release from unpkg) causing problems with marker.remove() while trying to switch tracks.

control.js:60 Uncaught TypeError: Cannot read property 'remove' of undefined
    at i.clear (control.js:60)
    at i._onSelectionChanged (leaflet-gpxgroup.min.js:12)
    at i.fire (leaflet.js:5)
    at i.setSelection (leaflet-gpxgroup.min.js:2)
    at i._onLegendSelected (leaflet-gpxgroup.min.js:13)
    at i.fire (leaflet.js:5)
    at i._onInputClick (leaflet-gpxgroup.min.js:3)
    at HTMLInputElement.s (leaflet.js:5)

you can seem my attempt at https://ultra.fork.pl/t.html

Raruto commented 4 years ago

Hi marcin, I have uptaded that example in version 1.3.6.

I hope it works fine now, Raruto