oskarkraemer / komootHeatmap

Quickly map all the places you have been, on one map.
https://komoot.oskarkraemer.me/
29 stars 3 forks source link

Fix a bug where Infinity speed causes the speed visualisation to break #1

Closed MeltedHugo closed 3 months ago

MeltedHugo commented 3 months ago

I ran into the issue that speed visualization didn't work properly (it only showed "Infinity" in the sidebar and all lines were blue). The problem was that one of my datasets has an instance of Infinity speed at some point, so I added a condition to check if the speed is a finite number during getSpeedMax() and just ignore that entry if it is infinite. With this fix in place, the maximum speed is now calculated correctly and everything works as intended again.

Before the fix: grafik

After the fix: grafik

oskarkraemer commented 3 months ago

Thanks for contributing! I merged your PR.