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

No GPX data for get_moving_speed #135

Open petermisovic opened 2 years ago

petermisovic commented 2 years ago

Hello, when I use following code to display average moving speed from GPX, I do not have any data shown in console:

new L.GPX(gpx_etapa_2_den_4, { async: false, polyline_options: { color: 'red', opacity: 1, weight: 5, lineCap: 'round' }}).on('loaded', function(e) { var gpx = e.target; Console.Log(gpx.get_moving_speed()); }).addTo(mymap);

Could you please help me with this code?

thank you Peter