zekefarwell / josm-strava-heatmap

A browser extension that simplifies getting the TMS imagery url for using the Strava Heatmap in JOSM
MIT License
62 stars 3 forks source link

URL is incorrect until the map is panned or zoomed #2

Closed zekefarwell closed 3 years ago

zekefarwell commented 3 years ago

Strava changed something recently so the initial url when you visit the heatmap ends with undefined/undefined rather than {color}/{activity} like it used to. This part of the url also does not change immediately when the user selects a different color or activity like it used to. This is a problem because the extension uses the values from this url to build out the TMS url.

There is a workaround because the url does update as soon as the map is panned or zoomed even slightly. So as long as you do this you can copy a correct TMS url. However if a user copies the url immediately on page load without any other interaction they can get a non working url. Also if they don't interact with the map after changing the color or activity they can get a url for the wrong activity/color combo.

Clearly relying on the url like this is not reliable. Perhaps the color/activity values can be pulled from the DOM instead.

zekefarwell commented 3 years ago

resolved by c3aaaffea57283ca7418860fa7871b68e2fd30ab