projecthorus / sondehub-tracker

🎈 Frontend for SondeHub Radiosonde Tracking
https://v2.sondehub.org
MIT License
59 stars 25 forks source link

Fix Chase cars icons not showing on map #245

Closed HoshenKadosh closed 2 years ago

HoshenKadosh commented 2 years ago

This PR fixes #244 issue. When there are multiple chase cars with the same color at site load, since the HTML img element is stored in icon_cache before the img loads, accessing it right away and making a canvas will not work since the img hasn’t loaded yet. So i added a listener for load.

LukePrior commented 2 years ago

Oh awesome thanks for fixing this up, I will leave it in testing and if there aren't any problems I'll merge it into main shortly.