Strava Heatmap requires now authentification at higher zoom.

Jonas M shared this question 3 months ago
Answered

I used the sttrava heatmap as map/overlay in locus maps, as explained here: http://www.locusmap.eu/de/strava-heatmap-in-locus-why-not/


Strava hetamap was updated and requires now at some zoom level authentication.


See https://blog.strava.com/de/press/heatmap-updates/ (or german: https://blog.strava.com/de/press/heatmap-updates/ )


To access stava segments there is possibility to generate a token for access from locus maps:

http://forum.locusmap.eu/index.php?topic=4457.0


Is there any possibility to do the same for the zoomed heatmap ?

Comments (37)

photo
3

Hi Jonas,

Strava Heatmap could be added to Locus as a custom online map. The current procedure is quite simple and it is not equipped by any third-party login system. At the moment, we have to find out if it is possible at all to add a login-protected map.

photo
1

I got Strava Heat map into Locus but the zoom lever is upto 20km only.

How can i log into strava from here?

photo
1

@Sooncm: as I wrote below - now it's not possible to log in to Strava heatmap via Locus. We have to implement this option first.

photo
1

Hi Michal, sorry if i missed it. But which option are you opting now?

photo
1

A few days ago Strava Heatmap works in Locus, what happend with it? I used this option http://www.locusmap.eu/strava-heatmap-in-locus-why-not/ but now it does not work.

photo
1

Strava now needs you to login first for authentication. I am hoping there is a method

photo
1

now it's not possible to log in to Strava heatmap via Locus. We have to implement this option first.

photo
1

When will it be implemented to Locus? Within a few days or months?

photo
photo
1

The recent change Strava made to its Heatmap (the general public cannot magnify more than level 11) is a loss for OpenStreetMap editors (like me). Strava's Heatmap was a valuable resource for drawing/refining hiking trails. Now it's far less useful to me because zoom level 11 is insufficient for map-editing.

If you have a Strava account, you can login and magnify the Heatmap to more than level 11. However, it only works in a browser after you login with your account. There's no explanation for how to make it work with other apps. Strava will have to offer some form of authentication system so you can call its maps with a URL that identifies your Strava account. I don't know if they plan to do this (or if they already have it but just don't mention it).

Here's the issue in the JOSM forum (JOSM is a map-editor for OpenStreetMap).

https://josm.openstreetmap.de/ticket/16100

photo
1

Tady je popis proč to nefunguje. Musíme počkat na vyřešení problému.

http://help.locusmap.eu/topic/strava-heatmap-requires-now-authentification-at-higher-zoom#comment-53251

photo
5

As I am a heavy user to the strava heatmap as overlay I found a hack (disclaimer it's ugly :))

  1. Create a Strava account (it's free)
  2. Use Chrome to browse to the Strava Heatmap site (i.e. https://www.strava.com/heatmap#12.56/8.53666/47.37749/hot/ride)
  3. Login in Strava to be able to zoom on street level
  4. Open open chrome developer tools -> network, filter for .png
  5. Right click an entry in the column Name and do a "copy as cURL"
  6. Paste that in an editor and copy the Cookie Part, everything after "Cookie:" up unto '
  7. Override the strava2.providers.xml on your phone with the following: replace {paste cookie data here} with your Cookie data.

<?xml version="1.0" encoding="UTF-8"?>

<providers>

<provider id="10900" type="0" visible="true" background="-1">

<name>Strava</name>

<mode>Global Heatmap Biking</mode>

<countries>World</countries>

<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/ride/bluered/{z}/{x}/{y}.png?v=19]]></url>

<zoomPart>{z}-8</zoomPart>

<zoomMin>8</zoomMin>

<zoomMax>22</zoomMax>

<tileSize>256</tileSize>

<attribution><![CDATA[Strava]]></attribution>

<extraHeader><![CDATA[Origin#https://www.strava.com]]></extraHeader>

<extraHeader><![CDATA[Accept-Encoding#gzip, deflate, br]]></extraHeader>

<extraHeader><![CDATA[Accept-Language#de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7]]></extraHeader>

<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36]]></extraHeader>

<extraHeader><![CDATA[Accept#*/*]]></extraHeader>

<extraHeader><![CDATA[Referer#https://www.strava.com/heatmap]]></extraHeader>

<extraHeader><![CDATA[Cookie#{paste cookie data here}]]></extraHeader>

<extraHeader><![CDATA[Connection#keep-alive]]></extraHeader>

</provider>

</providers>


  


photo
1

Thank you this worked for me!

I'm a trail runner and rely on the heatmaps to find alternatives when on the trails so I also changed maps from ride to run to pull the heatmap I was after:

<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/ride/bluered/{z}/{x}/{y}.png?v=19]]></url>

to

<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/run/bluered/{z}/{x}/{y}.png?v=19]]></url>


You saved the day for me.. many THANKS!

photo
1

...keep in mind that you'll need to renew that info after one week (that's the lifetime of that cookie I guess)! br

photo
1

It's not good news

photo
1

Lukily it's static data and by using this hack you're abel to download needed areas to local - Until we get a permanent solution / fix

photo
1

I've tried but can't get it working - Still limited above 10km zoom

Have I copied the token / cookie from correct position or what else could be wrong?

cc1090fe722050fc5505a4ae0c01c4d3

photo
1

You need to copy the whole area, in your screenshot from the beginning to the end of what you marked yellow, so even the stuff in between which you didn't mark

photo
1

Thanks,

Now I know that what I did was right and I'll try again.

I actually copied all that, but just marked the begining and the end of the copied part.


And now I also know that in the future Strava will release heatmaps updates monthly

photo
1

I tried to apply your trick, but I failed so far...

Below what I copied and pasted, is it OK ?

In Android I overwrote :

Root/sdcard/Locus/mapsOnline/custom/strava2.providers.xml

And

Root/sdcard/Locus/mapsOnline/custom/stava2.providers/strava2.providers.xml

/mlNwEzwAgwAowAI8AIMAKMACPACDACjAAjwAgwAowAI8AIMAKMACMwSgj8f1uAFbIRHQRDAAAAAElFTkSuQmCC

photo
1

Cookie data looks good. Your path to the xml file looks strange there should be only one folder with the providers.xml, at my phone it is under .../Locus/mapsOnline/custom

photo
1

Just saw that the Strava Cookie is generally valid for 2 years :) so you should be fine for 2 years with that method...

photo
1

Confirmation. That trick works for me too ! Tnks.

photo
1

yep, confirmed. Unofficially! :D

photo
1

Still not ok for me :(

I'm loging into Strava with my gmail account, could it the cause of my issue ?

Looking at the beginning of my cookie stuff, it starts with "ajs_anonymous", but in your howto it is "optimizel"... what do you think ?

photo
1

Great workaround, thanks a lot! I did have to update the cookie after a few weeks for it to keep working though

photo
photo
1

Now it is working I am wondering a few questions :

- can we display both running and cycling activities as you can select "all" in Strava ?

- can the heatmap can display as "hot" instead of "red" ?

- is this heatmap is yhe one with the 2017 data or the previous one ?

Thanks !

photo
1

You can just change this line in the xml file:

<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/ride/bluered/{z}/{x}/{y}.png?v=19]]></url>

and replace ride and bluered with the values you want. The heatmap data is the most recent one.

photo
2

Hi guys, so according to Strava, there is no official way how to access global heatmap from a third party app, even with Strava authentication token that works flawlessly for exporting tracks. We'll wait and when there is such a way, we'll implement it. Keep your eyes open and let us know when you get something. For the time being, there's Colin's "elegant" solution :) Thanx Colin!

photo
1

Thanks Colin, it is working :)

photo
1

Hey Colin, thank you for the trick that generally works. But I have the problem that the detailled heatmaps are only visible in a certain area and not everywhere although the flag "countries " ist set to world?


Here is my XML (I deleted some info in the cookie data)


<?xml version="1.0" encoding="UTF-8"?>


<providers>

<!-- Strava -->

<provider id="10900" type="0" visible="true" background="-1">

<name>Strava</name>

<mode>Global Heatmap Biking</mode>

<countries>World</countries>

<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/ride/bluered/{z}/{x}/{y}.png?v=19]]></url>;

<zoomPart>{z}-8</zoomPart>

<zoomMin>8</zoomMin>

<zoomMax>22</zoomMax>

<tileSize>256</tileSize>

<attribution><![CDATA[Strava]]></attribution>

<extraHeader><![CDATA[Origin#https://www.strava.com]]></extraHeader>;

<extraHeader><![CDATA[Accept-Encoding#gzip, deflate, br]]></extraHeader>

<extraHeader><![CDATA[Accept-Language#de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7]]></extraHeader>

<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36]]></extraHeader>

<extraHeader><![CDATA[Accept#*/*]]></extraHeader>

<extraHeader><![CDATA[Referer#https://www.strava.com/heatmap]]></extraHeader>;

<extraHeader><![CDATA[Cookie#ajs_group_id=null; ajs_anonymous_id=%22f43-b6bf-4136-8b18-f945b%22; _ga=GA1.2.76357.154764; _gid=GA1.2.184869.1554764; _strava4_session=543cqug97ddnrnqp34js; ajs_user_id=43870; CloudFront-Policy=eyJTdGF0ZW1lbnyJSZXNvdXJjZSI6Imh0dHBzOi8vaGVhdG1hlcm5hbC0qLnN0cmF2YS5jb20vKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoTUyNjgxODg0OH0sIkRhdGVHcmVhdGVyVGhhbiI6vY2hUaW1lIjoxNTI1NTk0ODQ4fX19XX0_; CloudFront-Key-Pair-Id=APKAIDVUQPSA; CloudFront-Signature=RTUUx~eDTd9E9YZ8FrDnV0utw7zH4v3NSE4JEQPJdVOcLzyC~ug4bxgscfb602jDCxO9jhdBjrygHLtYXohwlfkc~DYPpPCCze0BUhu0EYi~Ub4HlnEGKnpNYMg-XS5XTtPZ3f5qPvT-1uoUDt1eRjI7OEPovsZyFgzGZDQeqlvKL5gLKAhh45axUF9Py61LnEZm-KCkw7NLLrAyBRi4VGszP7bH7QjwAiix4K7IU1R5~X3UtihnK4WEZce3-kbn5e6bRq-5C5b-WFNto4Z-AquZ0~3j0H-yQJFSzg__]]></extraHeader>

<extraHeader><![CDATA[Connection#keep-alive]]></extraHeader>

</provider>


</providers>

photo
1

I guess you need to update your cookie, after some time cookie expires and Locus only shows the Strava Data which was cached in the area you used it before.

photo
photo
1

Ah that is true when I delete the database I can see that it is not working anymore anywhere.

But the cookie is only two weeks old? You said two years?

photo
1

...my fault :) I was wrong I need to correct that comment.

photo
1

OK, bad to hear because in this case it is too much effort to renew this procedure every two weeks.

You do not know a trick to "patch" the website to issue a cookie with a longer expiry date? ;D

photo
1

You only need open the page on web browser from where you copied the cookies (you must use the same cookies, if you delete it on browser it will not work).After that will be going on Locus too.

photo
1

Is any option to copy cookies by android phone? When I am out of PC more then 2 weeks.

photo
1

@Thomas Vanco: Thanks for this hint. I will try that.

@Dan Seliga: Unfortunately not because Chrome under Android does not provide access to the developer settings that are neccessary to copy the content of the cookie.

photo