mpetazzoni / leaflet-gpx

A GPX track plugin for Leaflet.js
http://mpetazzoni.github.io/leaflet-gpx
BSD 2-Clause "Simplified" License
550 stars 119 forks source link

Cannot read properties of null (reading 'toFixed') #159

Closed Its-Just-Nans closed 2 months ago

Its-Just-Nans commented 3 months ago

when calling get_elevation_data()

gpx.min.js:1 Uncaught TypeError: Cannot read properties of null (reading 'toFixed')
    at gpx.min.js:1:3577
    at e._prepare_data_point (gpx.min.js:1:6320)
    at gpx.min.js:1:3496
    at Array.map (<anonymous>)
    at e.get_elevation_data (gpx.min.js:1:3471)
    at plotly (7139496606:56:35)
    at e.<anonymous> (7139496606:112:17)
    at e.fire (Events.js:195:9)
    at i (gpx.min.js:1:7354)
    at o.onreadystatechange (gpx.min.js:1:7233)

Because of https://github.com/Its-Just-Nans/leaflet-gpx/blob/c1c73d18a2035e694d6d909e6c011eeef498b50c/gpx.js#L522