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

Elevation profile gets cut off at first gpx point that is missing elevation data #227

Closed thomas-oderud closed 1 year ago

thomas-oderud commented 1 year ago

Subject of the issue

Having used this on our site for a long time, an update broke one off the elevation vizualisations.

Your environment

https://www.krsultra.no/mizuno-krsultra-60/ using this gpx: https://www.krsultra.no/wp-content/uploads/gpx/KRSUltra_60_2022_v3.gpx

hupe13 commented 1 year ago

Delete line 1829 of the gpx file, then it should work. The question would be better addressed in the support forum.

Raruto commented 1 year ago

@thomas-oderud thanks for the report, although:

  • leaflet-elevation: 3.2.2
  • leaflet: 3.0.5

there is no version of either of those libraries yet...

BTW, i think this pull request https://github.com/Raruto/leaflet-elevation/pull/219 should also come back to handle the problem in case of malformed gpx file (i.e. on missing altitude data). If I'm not mistaken it should be related to the refactoring done in version 2.x

Greetings, Raruto