heartrate as parameter
-
First things first, many thanks for creating this extended version of the leaflet-map plugin it’s really making my life easier . It’s well documented and easy to work with👍!
I would love to show heartrate information on the elevation chart, I did find some commented out code in the elevation.php (probably for good reason) but I wonder if you have plans to natively support it? So far I can’t seem to get it working 🥹
Cheers
-
There is the code for it in the Elevation Leaflet plugin, but I didn’t realize it because I wasn’t interested, my GPS doesn’t have such a measurement. It’s the same with the temperature.
Maybe I do it, but then I need some test data.
You can test the Github version. Or use the plugin WP Rollback and “roll back” to trunk.
P.S. Shortcode:
[elevation heart]Thanks for the quick reply and provided change, much appreciated 🙌 !
The shortcode is working perfectly with the Github Version 4.5-250502 it’s exactly what I’ve been looking for!
I have 2 live examples that can be found here, Example 1 is Raruto’s marathon gpx and the second example is a track I recorded myself.
I did however found out that my the heartrate data of my GPX file did not render as I wanted (as seen in Example 2) and this is likely due to the “auto pause” function of the app that I use to record my outdoor activities. Heart rate data might either be omitted or logged as 0 (which I see in my GPX) ,this results in flat or broken polyline coloring when mapping HR on the Leaflet map.
In both examples I did notice that BPM does not have horizontal measurements lines like m and km/h and would it be possible to toggle between chart data to show/hide a specific value like BPM, Altitude or Speed?
CheersMy test file was the marathon gpx also.
Heart rate data might either be omitted or logged as 0 (which I see in my GPX) ,this results in flat or broken polyline coloring when mapping HR on the Leaflet map.
I have to take a look at Rarutos error handling.
it be possible to toggle between chart data to show/hide a specific value like BPM, Altitude or Speed?
You can switch it on and off with
legend. But it seems you have this setting. I guess, any of your plugins interferes.My personal record GPX Contained multiple
<trkseg>elements (4 total). This usually indicates pauses/resumes or laps during the activity which is caused by the “auto pause” function. I will disable it and record another activity to see if i get a clean HR polyline.You can switch it on and off with
legend. But it seems you have this setting. I guess, any of your plugins interferes.Apparently my WordPress theme css was blocking this functionality because the following
svg {
pointer-events: none !important;
}The elevation control has <svg class=”background”> so I changed it to
svg {
pointer-events: all !important;
}I did made some other minor changes after testing on a mobile phone. I’ve noticed that it was not possible to scroll vertically on the page if you tried it inside the elevation control so I changed
.elevation-control .background {
touch-action: pan-y !important;
}I also hide the legend-switcher-label and legend-switcher-symbol because it was overlapping with other legend values on a mobile screen
.legend-switcher-label
{display: none;}
.legend-switcher-symbol
{display: none;}Cheers
My personal record GPX Contained multiple
<trkseg>elements (4 total).It seems to be a bug with the used togeojson library.
.elevation-control .background {
touch-action: pan-y !important;
}Thank you very much. I will include that.
May I share your gpx file as a test file, or would you like to do it yourself? https://github.com/placemark/togeojson/issues/145#issuecomment-2849254588
Yeah sure no problem, this is the one used in the example🏃🏼
Let me know if I can be of any further assistanceMaybe you already have the latest plugins Github code. Until the bug is solved, the mapbox/togeojson library is used with
heartoption. I don’t tested the mapbox/togeojson library with all other options, please tell me, if something is wrong.I’m currently running Version 4.5-250505 of the “Github Version” and I can confirm that the mapbox/togeojson does handle multiple track segments much better but when you “regular reload” the page with F5 it reverts back to the original issue until you “hard reload” with shift+F5. You can reproduce it in an InPrivate window, seems like a caching issue.
Try to set
preferCanvasto false.Try to set
preferCanvasto false.Sorry for the delay, I’ve tried the preferCanvas to false but it does not seem to effect the issue. That’s all I can report for now.
After a page refresh (sometimes a multiple) the graph looks like:
I tried the recommended setting on a clean WP environment just to be sure –> Leaflet map – Numerous Clock
-
This reply was modified 1 year ago by
sl0wp0k3.
The only solution is now, I don’t use the older togeojson library anymore and you need to edit your gpx file and delete the 3 lines
</trkseg><trkseg>. And we’ll wait until the bug is fixed.Bug fixed and version 4.5.1 released.
-
This reply was modified 1 year ago by
The topic ‘heartrate as parameter’ is closed to new replies.