This object is in archive! 

Strava Heatmap requires now authentification at higher zoom.

Jonas M shared this question 6 years 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 ?

Replies (41)

photo
4

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
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
1

Hello,

Please show my current Chrome how to do it.

On Windows10 I run Bluestacks on Locus Pro. Planning goes here

Thank you very much!

photo
1

In Jan 2023 I got this working by following instructions in the post by @Lopus, further down this thread. I suggest people start there for the time being.

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
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
1

HI Guys. Is this workaround still working for you? I have successfully updated the cookie info 3 times over past couple months, but can not get it to work now. In fact, the strava map will not even show up on the list of maps in the Locus app when I try putting in new cookie info now. Can I get a sanity check?

I really like this feature of the Locus app. Is there any other way to see where I am in relation to strava global heat map while out in the field mt biking? Will the "strava app" do such a thing? Thank you

photo
1

Hi Greg,

yes, it's working. I've just updated my cookie and Strava Heatmap i on.

15f95e4bc26e4893f56c576931842751

photo
1

Good news. Thank you Michal.

Is it possible you can attached your current working copy of the file?

Maybe remove a part of your cookie. Just like to confirm the syntax and characters as I have tried several times.

photo
1

@Tomas Vanco You only need open the page on web browser from where you copied the cookies (you must use the same cookies

The page must be opened from PC from which I copied the cookies? Not from mobile where I have instaled Locus?

photo
1

Yes. What i know about cookies that contains unique identification of session on your bowser. therfor when you use another browser on another device or on the same device you will get another ID on cookies.And you are copied cookies from browser on specific computer.

photo
1

just follow EXACTLY the instructions given by Colin, no need to post the file here again. The instructions are written clearly enough.

photo
2

Got it working again. I did omit one of Colin's directions. I did not have an xml editor and was screwing around with text editor. I download XML notepad (free) and the task was mush easier. Silly me. I can post a working file if of any interest to anyone, but for now I will assume it's just me being the slow kid in the class. :-)

photo
1

Guys - slight off topic, but as there are heavy heatmap users here, there is hope somebody managed to find a solution.

For finding new routes for road cycling, it is not enough to use strava heatmap, as mtb routed are shown too. One invaluable tool for this is google street view - as where the google car wouldnt go, it usually doesnt make sense to even try on the road bike. So it would be immensely valuable to be able to get markers where google street view is available as an overlay. Unfortunately i havent found a way hot to get that yet (it shows as blue lines on the map but only while you drag the street view icon). Any ideas?

photo
1

Hi ,, Are you of Hungarian descent? I would like to ask for help on this.


please,

horak.tibor@gmail.com


Thank you

photo
1

Colin's instructions are excellent, but it doesnt mention couple of crutial details.

1) The xml file he is showing is not the same as the http://docs.locusmap.eu/lib/exe/fetch.php?media=manual:advanced:customization:strava2.providers.zip referenced from http://www.locusmap.eu/en/strava-heatmap-in-locus-why-not/ - so it is not sufficient to add extraHeader Cookie - you need to also change the <url> to heatmap-external-a.strava.com/tiles-auth (same as shown on Colins instruction). Other changes Colin made - additional extreHeader as not cricital - it works without those.

2) Recent version of Chrome have multiple copy options - i used copy Copy Request Headers and took Cookie value. Copy as cUrl might have issues with quoting for bash or cmd.


@Locus - could you please update strava2.providers.xml to fix the url and maybe add extraHeader Cookie and add a comment about the workaround?

photo
2

Hi Peter,

we updated the file and the article at our website

photo
1

it is not avaible anymore

photo
2

Folks,

it is doable ...


XML


5c46afc64d367ae4e065a8d857cb93a0


Cookie


bad8964c31b5b825babb90be8768679f

photo
1

After Locus fixed the URL it is now complete (before the update you had to fix it too).

Btw - why are you adding parentheses around cookie values?

photo
1

Good questions ?


Propably I copied 'em from the original strava2.providers.xml file


14c6c1370a91f39ab1c57ec2884c1c85

photo
1

I tried several times, and it does not work for me. I read the whole thread, I am sure I followed all steps.

photo
1

Diego - just post your XML (blur your credentials).

photo
1

Peter, thank you very much for your disposition to collaborate.

I tried again this time in LINUX and now it works.


Thank you very much!

photo
1

I have still problem that strava cookies are valid only 14 days, after it don´t work. I tried periodically to load web strava.com/heatmap from PC which I copied cookies but after 14 days I must copy new cookies to work it.

What I do wrong?

photo
1

Nothing's wrong with the procedure. Just Strava's cookies are valid only two weeks, that's all. I'm afraid we can't anything with it.

photo
1

Dan, my advise is to download the Strava map for your region, so that you do not have to do this procedure every two weeks.

photo
1

I don't understand. Which Strava maps I need to download?

photo
1

Dan - strava heatmap is an online map. You can download any online map for the selected region and then use that as an offline map. Click "..." button on strava heatmap (online map) and select download map.

photo
1

THX

photo
1

Doesnt work for me!

When I try load the strava heat map allways says: access denyed in the map

I do all the steps..

photo
1

Checking the heatmap now, trying to get Strava Heatmap working in Orux Maps, it appears the cookie data is not provided with the PNG anymore. Copying the cURL, which worked previously, gives me this:

curl "https://heatmap-external-c.strava.com/tiles-auth/all/hot/15/17676/11612.png?v=19" -H "Referer: https://www.strava.com/heatmap" -H "Origin: https://www.strava.com" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.28 Safari/537.36" -H "DNT: 1" --compressed

photo
1

FYI: Colin's fix is still working for me, I need to update cookie data every few weeks but still working in Locus.

Here are some handles to change output, look for bold below:

Change bold run below to see = ride run all

Change bold bluered below to see = hot blue bluered

-------------------------------------------------------------------------


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


<providers>


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


<name>Strava</name>


<mode>Global Heatmap Run</mode>


<countries>World</countries>


<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/run/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# ---PasteCookieDataHere--- ]]></extraHeader>


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


</provider>


</providers>

photo
1

Hi. The method doesn't work. It is written "Unknown problem" instead of tiles. Moreover, my cookie has a little different structure than in example - it has "sp=" part but doesn't have "ajs_group_id", "_ga" and "_gid". I tried to use both cookies - own and from example with my parameters and "_ga" and "_gid" values from the example - anyway it doesn't work.

My cookie (I masked some data):

sp=c55e096c-54f6-47d8-9bb1-789fda09bdf2; _strava4_session=ili415r0ckd5ss07fl1mvsilusq3ti92; ajs_user_id=92096**; ajs_anonymous_id=^%^228c1e97f0-358a-4ecf-8ec9-3c48b3a***18^%^22; CloudFront-Policy=eyJTdGF0ZW1lbnQiOiBbeyJSZXNvdXJjZSI6Imh0dHBzOi8vaGVhdG1hcC1leHRlcm5hbC0qLnN0cmF2YS5jb20vKiIsIkNvbmRpdGlvbiI***_; CloudFront-Key-Pair-Id=APKAIDPUN4***VUQPSA; CloudFront-Signature=nLFE09LwXMIlu-ChsxtCTBygd1Mvy0McOhVXrAgFGpx0UypNUO-***rcdqbHlbD5BSbUYCeJCSqsTkj~LS6Giew__"
What's wrong? Does anybody can share working xml file with me for checking it?

photo
1

As @Primož Resman said the cookie data can't be found in the .png files anymore (at least I can't find them anymore). Are there any other known solutions? Is it still possible to retrieve the cookie data?

photo
1

You need to use "copy all as curl", paste into some text editor and search keyword "cookie". Rest of the procedure is the same.

photo
1

Like I said, curl doesn't work. It worked on another PC at the time, but a friend of mine also now said that it doesn't work.


Could GDPR be a problem?

photo
1

what do you mean curl does not work? on pc in chrome developer tools right click on png, and "copy all as curl".

I just tried and it works.

photo
1

The format of the copied data is different from what it used to be, at least for me. This is the code i get:


curl "https://heatmap-external-a.strava.com/tiles-auth/all/hot/13/4452/2895.png?v=19" -H "Referer: https://www.strava.com/heatmap" -H "Origin: https://www.strava.com" -H "Save-Data: on" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36" --compressed

photo
1

I get this(first line contains cookie):

/3de6641e370cbb57e23b458531b9ad36

photo
1

Does it maybe matter if you are a summit member vs. a free account?

photo
2

So, on 7th January i wrote this:

"Checking the heatmap now, trying to get Strava Heatmap working in Orux Maps, it appears the cookie data is not provided with the PNG anymore. Copying the cURL, which worked previously, gives me this:


curl "https://heatmap-external-c.strava.com/tiles-auth/all/hot/15/17676/11612.png?v=19" -H "Referer: https://www.strava.com/heatmap" -H "Origin: https://www.strava.com" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.28 Safari/537.36" -H "DNT: 1" --compressed"


This is what Jan referenced in his 'As @Primož Resman said...' post. So this is what he and also I mean curl doesn't work. And to confirm, once again, even though Jan already gave a confirmation and even though i already wrote it worked on one PC and didn't work on this one at the time (that time being 2 months ago) and even though i also said a friend of mine has the same issue, here it is again. For the third time in this thread.


The output (in Chrome) of 'copy as cURL (cmd) for my png: curl "https://heatmap-external-c.strava.com/tiles-auth/all/hot/15/17676/11612.png?v=19" -H "Referer: https://www.strava.com/heatmap" -H "Origin: https://www.strava.com" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.56 Safari/537.36" -H "DNT: 1" --compressed'


I mentioned if it could be a GDPR problem, since that deals with cookies. I mentioned before that it worked on another PC. But i just checked that same PC where it used to work (at the time when it did not work on my PC) and i now get the same output as above with no cookie. My friend says he has the same issue. If it works for you, great. But you have here in effect three people telling you that for some reason this method does not work anymore (it did used to work for me). At least not for everybody and at least not all the time. And it's not like we're idiots, i think this is clear from our posts...

photo
2

Tried with Firefox and was able to retrieve the cookie data. No idea why it wasn't working on Chrome.

photo
1

Have you tried using Firefox instead? For me it solved the problem. As for why it stopped working with Chrome I have no idea.

photo
2

I made a script that can load Strava Heatmaps without authorization at close zoom levels.


You can use these links to download the map (open them from your phone web browser):


http://anygis.herokuapp.com/Tracks_Strava_All/{x}/{y}/{z}

http://anygis.herokuapp.com/Tracks_Strava_Ride/{x}/{y}/{z}

http://anygis.herokuapp.com/Tracks_Strava_Run/{x}/{y}/{z}

http://anygis.herokuapp.com/Tracks_Strava_Water/{x}/{y}/{z}

http://anygis.herokuapp.com/Tracks_Strava_Winter/{x}/{y}/{z}


Zoom levels from 0 to 15.

photo
1

Hello Makc,

can you write a little description how to implement in Locus?

I am not fully aware how to do that.


Thanks in advance. If this works this will be great!

photo
1

Hello nnngrach,

If some maps on your side do not follow terms of use of these maps, I have to kindly ask to remove your post from our help desk.

We try to keep stuff here legit and not breaking rules of the other work. Thanks for understanding.

Jiří M. aka Menion

photo
1

Ok, of course, no problem. But how can I do this? I don't see any 'delete' or 'edit' button.

If you have the option to manually delete my message, then I ask you to do this .

photo
1

Great! Thank you very much!!

I will go on holiday tomorrow and try it in practice. Perfect timing!

photo
1

To me, the whole point of Locus is to have Strava maps and the ability to download them. This cookie thing is a pia. My friends have given up on Locus, but I still go thru the cookie drill.

nnngrach, does your script for Strava conflict with its terms of use? Any thoughts on just a fix for Strava rather than all the other maps that most would never use? Thank you. Hannes ..look forward to hear your results.

photo
1

Anyone knows what has changed with the new version 3.38? For me locus map now overlays tiles from strava heatmap one over another.

Does it happen to anyone else?

photo
1

Hi Igor,

by what method did you get Strava maps into Locus? By the "cookies" method or from AnyGIS server?

photo
1

Hi Michal,

first from anygis, then I thought the error is with them, but same error with old "cookie" method.dd01849091bfc9300dbdfe3ebaefaaed860ce01eecaad5cc849ce56858ec1978

photo
1

we know about the bug on AnyGIS server - they distribute map tiles with incorrectly defined tile size. But the "cookie" method should work... so I understand with "cookie" method the Strava layer is not displayed at all?

photo
1

no, this is the "cookie" method, screenshot with layer enabled and disabled.

photo
1

Igor, could you please share your strava.xml here for analysis? Thanks

photo
1

here.

(edit: attachment removed by @Menion)

photo
2

Good day guys, Igor

indeed, with the latest Locus Map version, there were some changes around maps. One of the biggest is how Locus Map use map tiles & device DPI now. I've checked configuration for Strava heatmaps used here in this topic. Strava seems to return 512x512 map tiles and old configuration handled it "correctly" only partially. It worked more as a side effect.

I'll describe necessary changes for using other than standard 256x256 map tiles. We need to tell Locus if

  1. we want to use 512x512 map tiles without any scaling, which means that for every zoom level, there will be only half of the map tiles. For this, it is enough to define <tileSize>512</tileSize>. This is not our case here.
  2. we want to use 512x512 map tiles but with the same number of tiles per zoom level. This is the case of Strava. Tiles are bigger, contain more details, but their numbers (x and y indexes) are the same as for 256x256 sizes.

To achieve our point no 2., we need to define tileScale parameter. In this case, we have a single scale 512x512. so part of the configuration will look:


<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/winter/blue/{z}/{x}/{y}.png?v={ts}]]></url>;
<tileSize>256</tileSize>
<tileScale dpi="0" multi="2.0" replace="19" />
Where important is
  • tileScale, that define scaling factor (multi) to be 2x, DPI to which apply (dpi, 0 = all devices) and value that will replace in url (replace, must not be empty)
  • {ts} parameter in Url where tileScale place it replace value

Size of the tile remains on base 256x256 value.

---

I've prepared an optimized version of XML configuration based on the description above, mainly for your inspiration. Only necessary is to replace place cookie here text for your own cookie value. Working? Any questions?

photo
1

I tried download new map from Strava, by Any Gis again, and Strava map works just now. What problem was with Any Gis?

photo
1

AnyGIS web and also my definition above most probably violate Terms of Use of Strava web service. So do not use it. It is only demonstration how to use big 512x512 map tiles. Thanks for understanding.

photo
1

Menion .... thank you, Sir. I also was broken and your advice has fixed me. Thank you very much.

photo
1

Thanks Menion, that fixed the problem for the Strava maps with cookie method. However, I am no longer able to download the map for offline use. When I download it, it seems to be downloading, but it doesn't show up in the offline map list. When restarting locus, it tells me I "Problem with map adding", lists the new map.sqlitedb with "Error: unknown problem". Also, looking at the sqlitedb files, they are very small (24.58kB). Also the download went really (too?) fast.

I am able to download other maps without any problems.

photo
1

I'm just joining this thread, but I've caught up to where Jacob is. Creating a provider per the instructions Menion provided, Strava works fine online. But when I try downloading the map for offline use, the downloaded map doesn't show anything except the empty grid pattern, and like with Jacob, it is too small (176kb).

photo
1

Menion, thanks to you. Strava map is visible again, but it´s not possible to download it. Is there any fix?

photo
1

Current locus map download method is blocked by strava.

OSM download works, strava download doesn't.

Tested with 3.38.3 Pro and with 3.38.3 Free from Beta programm.

I did test the following Auth setups:

Database files got deleted and map got cleared after each test.

And here is the result:

  • View of all Maps does work
  • Download does not work with Locus
  • Download does work with CURL
  • Download of other Maps do work


The main problem: We can't use our old heatmap Database files. Maybe the scaling is only applied during store into database because it does only work with online maps.

photo
2

Really. I noticed that the Locus does not save offline maps with 512 pixel tiles. But with maps of 256 pixels it works fine. Just compare the two files.

photo
4

Good day guys,

downloading of online maps with 512x512px (generally custom) tile size will be fixed in next Locus Map version. Thanks for the bug report.

photo
1

@nnngrach can you please provide "blue" colored heatmap option (ride) on your web service?


Thanks in advance.

photo
1

HI Guys,

Anyone else notice the Strava feature recently stopped working?

The files from nngrach were wonderful for a while, but now having issues. Map area showing blank or says "Map of this area is not available". Any advice? Thanks.

photo
1

All set again. A recent update to Locus seems to fix my issues. Thank you.

photo
2

Hi, A basic question. How do you use mngrach files in Locus to display Strava Heatmaps as overlay? Thanks!

photo
1

@Greg White Strava heat maps are only working up to zoom 11, higher zoom displays denied access. A few weeks ago it worked fine up to zoom 14 (which is a proper zoom for street-road navigation), any idea about what has changed?

Thanks in advanced

photo
3

Hi everyone. I was blocked and had to move to a new hosting - AnyGIS.ru. So download the updated maps pack.

photo
1

Thanks! Works like a charm!!! @nnngrach

Up to level 14 more than enough.

photo
1

@nnngrach ..Thank you again Sir. You have been a great help. I got level 15 on a test download of the ride map.

@piatpif .. I overlay opencycle with strava sometimes to get more info. My steps are menu, then more functions, then map overlays. The "tip" is to select the other map first then overlay with strava.

photo
3

Thanks! Both, the cookie and AnyGIS methods work!

photo
1

@nnngrach Can you write in simple words what should I do with these AnyGis files?

photo
3
  • Open the folder where you have installed Locus.
  • Open the folder with online maps presets: Locus/mapsOnline/custom.
  • Copy all files in to this folder.
  • Restart the app to see the maps you’ve added.

photo
1

Love U! THX! :)

photo
1

Downloaded files from NNGRACH work great thank you !

photo
3

Hello @nnngrach


ANYGIS is not working anymore. LOCUS does not load the maps. I uninstalled LOCUS and tried with a freshly installed version without success :(


I tried both methods:

1) Installing from the mobile phone

2) Copying the files from my computer to Locus/mapsOnline/custom.


The maps do not appear in the ONLINE tab after restarting LOCUS

photo
1

Hello @nnngrach,

A big thank you for making it possible to have the Strava heatmaps visible in Locus Map. I was initially put off by the length / issues mentioned in this blog, but found it surprisingly easy to set it up. It works first time right! Very impressed, and very useful to have the heatmap for route planning. In particular for catching VeloViewer Tiles. :-)

photo
1

It looks like I have a of set problem an tiles size problem. Does anyone have a similar problem?

photo
1

f760c59e8883a2bf80b02465243865ba

photo
1

For me the heatmap data is no longer available above zoom level 11.

photo
1

@nnngrach: worked flawlessly until some days ago, probably strava changed something?

photo
1

I have the same.

photo
1

Something changed because the heatmap overlay doesn't work anymore.

Any options?

Regards.

photo
1

the General heatmap works well for me as strava premium user. I used the last xml posted by Menion


I tried to use it also with my personal heatmap, but the it seems that the url of the .png is different so I couldn't adapt the orginal strava.xml.


any help?

thank you

photo
1

This modified mapsource for personal heatmap works for me in Locus.

After login to your premium Strava account, go to heatmap, use your options (type of activities, heat color, etc.) and open developement tools (I use Mozilla Firefox browser)

Replace XXXXXXX from your url address

Replace parameters from your url address (filter_type, filter_start ...)

Copy your cookie and paste it to <extraHeader> element (YYYYYYY).

Provider ID must be unique in your custom online map sources.

photo
1

Still works for me. Use tileScale correction as mentioned above

photo
1

Hello,,


Please help me how to do it.


horak.tibor@gmail.com

https://www.instagram.com/horaktibor/


I do not understand.


Thanks!

photo
1

Could you please explain it in a more detailed way.

Simply extracting the cookie line as explained in the post above doesn't do the trick for me.

photo
1

Few weeks ago the xml from anygis.ru doesn't work. Today I try to add version with cookies And IT worms Hood by few minutes (only 1,9mb in map cache).

I don't have a Premium Strava - it's a problem?

photo
1

Without premium strava you should see the heatmap up to the level 11 - same as directly on Strava Global Heatmap. The login recorded in the cookie is only valid for 2 weeks. Other than that, it should work.

photo
1

Can you send a setting, link to install the strava heatmap?


Thanks!

photo
2

Finally, it works!

Problems I had: Can't find cookie. How to include cookie. Error: Duplicate map provider id.

Solution:

- Using the xml attachment by menion.

- Changing the provider ids, since they conflicted with waymarked trails in providers.xml.

- Used Chrome dev console and clicking on Copy as cURL (bash) on a .png tile.

- Extracting the text after cookie: but removing the leading whitespace between cookie: _strava4.

- In the .xml by menion I had to add Cookie# like the previous posts mentioned, resulting in

<extraHeader><![CDATA[Cookie#_strava4_session=erq ...and so on... 847-24=1]]></extraHeader> Remember that you have to do that four times in menions file.

photo
2
  • Don't forget to paste the cookie for all maps providers in the .xml. I did it just for the first, which is winter, and wondered why I don't see anything while using the biking map as overlay. ;-)
  • I use Acode to change the .xml quickly on the phone.

photo
1

could you please share the XML code so I can cut and paste it in to my "providers.xml" if possible?

photo
1

This worked great for me (version 3.60.2), thanks a lot!

Quick link to the mentioned post/file by menion in this thread.


I use the maps as an overlay layer which works great. Also downloading for offline usage worked with a test area. I am really impressed.

In case you would like different colors for the "heat": you can change the last word of the url(s) in the

xml to hot, blue, purple, gray, bluered. See here how it looks like.

I am not sure yet how long the specific cookie will last, but replacing it won't be a problem.

photo
1

Hello

I'm trying to launch .xml map in MOBAC with this code:

<customMapSource>

<name>heatmap</name>

<minZoom>0</minZoom>

<maxZoom>20</maxZoom>

<tileType>PNG</tileType>

<tileUpdate>IfNoneMatch</tileUpdate>

<url>https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{z}/{x}/{y}.png?Key-Pair-Id=XXXX&Policy=XXXX&Signature=XXXX</url>;

<serverParts>0 1 2 3</serverParts>

</customMapSource>


This results with following error:

"MalformedURLException

Illegal character in URL"


What should I correct in these lines?

photo
2

This code works for me:

photo
1

Your code works for me too. Thank You.

photo
1

is the attached file above's code only for MOBAC or can you insert it in to "providers.xml" to have strava available (only high zoom) in the online maps list?

tia

photo
1

Jacek, działają Ci heatmapy? Mógłbyś do mnie napisać na put3k (at) o2.pl ?

photo
2

Hello.. this last file of strava heatmap works? In my locus doesnt work..


Anyone can help..thank you

photo
1

Can someone write in simple steps how in this moment run heatmaps on Locus? It worked last year, but now, i'm totally noob to understand how install this stuff.

photo
5
  • Open Strava Heatmap
  • Create account or log into existing account (it's free)
  • Open a random tile of the heatmap, e.g. this one
  • In Chrome browser (should be similar in others): Right click on tile > Inspect > Network > CTRL+R > Right click on "89.png?v=19" in the list > Copy > Copy as cURL (bash)
  • Put the copied text into a text editor and you get something like this (shortened):
    curl 'https://heatmap-external-a.strava.com/tiles-auth/all/hot/8/134/89.png?v=19' \
    [...]
    -H 'cookie: sp...thisisyourcookie...Q__' \
    [...]
    --compressed
  • Copy your cookie (everything marked bold above, no leading space, including the two underscores at the end (in my case, could be different for your cookie) but without the ' at the end)
  • Download the file strava.xml attached to this post
  • Open the file in a text editor and replace all xxx with your cookie (usually CTRL+H works in all text editors)
  • In case you are already using custom maps via a provider.xml file or similar: make sure all your ids are unique (in the first line of each provider). In the file the range from 1027 to 1051. So maybe you need to change them.
  • Save the xml and put it in Locus > mapsOnline > custom on your mobile
  • Restart or open Locus
  • Select a Strava heatmap as online map
  • When selecting a new custom map the first time, you need to agree with the terms of the map. After that, you can use the map also as an overlay on top of another map (in case of Strava very useful)
  • Good luck

P.S.: the attached file contains all currently available heatmaps with colors hot / blue / purple / gray / bluered as well as activities all / ride / run / winter / water

You can delete the ones you don't need or better, hide them within Locus. On some maps only a certain heatmap color works good as an overlay.

photo
2

Lopus - IT WORKS! LOVE YOU! Big thanks! I missed hetamaps in Locus.

photo
2

@LOPUS! You're the king! Was fighting with this for months now - and finally it's working again!

photo
1

Someone please make a video about it! Thanks!

photo
3

Thanks for this! I suggest changing zoomMin from 16 to 10 and zoomMax from 30 to 23 as those are the currently available tiles from Strava. This makes the heatmap show correctly on very high and very low zooms.

photo
1

Works for me. Thank you very much @Lopus

photo
2

Hello, sorry if I missed something but I think I followed all the above steps (update .XML with my cookies etc...) But still at the end after copy into the mapsOnline > custom and restarting the app, I can't find my strava custom map. Only the pre-defined one are displayed. In case somebody can help me...


EDIT: after I removed the app data /caches etc... When I restarted the app, I get a message telling me that my data was stored into a wrong folder. I accepted the proposed update and now I can get the custom heatmap ! ALL GOOD, thanks a lot.


PS, I didn't delete my previous message in case it can help somebody else...

photo
5

I am making a tasker script that does all these steps automatically in the background so that you will never have to type/renew the cookie.

photo
3

It will run entirely on your phone and you will only have to type in your/any strava login data once.
If anyone has a better idea on how to do that, please tell me (Tasker isn't very debug friendly).

photo
2

Thank you so much for your work Martin!

photo
2

Hello..do you have this script? Thank you..

photo
3

Thanks You!

photo
1

Hi, Do you have the Script? Thanks

photo
1

Today I have to renew the cokie..I think that is longer for 10 to 15 days..but thank you!!

photo
1

In the DevTools you can see the expiry dates of the cookies.

It seems that the "Cloudfront"-cookies are the relevant ones (deleting the other four cookies doesn't seem to affect the displaying and zoom). Deleting or changing the expiry date to now + letting the Cloudfront cookies expire causes the heatmap to not being displayed anymore.

Freshly set Cloudfront cookies have an expiry date of +1 week from now. I just changed the expiry date manually, so let's see what happens in more than a week...5ce70660938ac4fc33146701d7e4a135

photo
2

Thanks looks amazing and working at acceptable speed also on Galaxy watch 4

photo
2

Great job

photo
1

Does this work with Locus Map Classic (3.66.2) on Android 13?

I upgraded my phone that was running an older Android system to a new phone with Android 13 and now the Heatmap overlay is not showing up. I checked and upgraded my cookie xml file just in case, still nothing.

I have the strava.xml file located in: /Android/data/menion.android.locus.pro/mapsOnline/custom

photo
4

💡I use a Strava proxy instead. No hassle with cookies. Just add the proxy as a map provider.

- Proxy from nakarte.me with xml written by stuntzi/alpenzorro.

- Proxy from freemap.sk with extensive xml.

Note: You may have to change the provider ids if those ids already exist in your Locus app.

photo
1

I would like to try this, but I am unable to add an online custom .xml file into the Locus "..../MapsOnline/custom" folder

My device is connected to a PC but the file will not copy into the relevant folder.

Is this no longer possible? Or is there a way to copy a custom .xml file into the Locus "..../MapsOnline/custom" folder when using a PC attached to the mobile?

Any help appreciated.

photo
1

Should actually work fine the way you described. Did you allow to access your mobile when you connected it to your PC?
You can also try to email yourself the file or upload+download it from a cloud service to your mobile. Then you can move the file to the respective folder.

photo
1

Thanks Martin for the hint with the proxy services. Works great and saves a lot of hassle each time the strava cookie expired!

photo
1

Thanks for the advice.

I am still unable to copy the online mapsource xml file into the ".../onlinemaps/custom" folder.

It must be a permissions issue with android 13, unless I have not connected correctly. I connected my device to the laptop (Windows 11) - the mobile device is on Android 13. When I connect, the device is set to "USB controlled by this device" and "Transferring files". I can view the ".../onlinemaps/custom" folder, but still unable to copy files to the folder using windows explorer..

I then emailed the .XML file and downloaded on to my device using email client. But, I am still unable to move the file into the ".../onlinemaps/custom" folder - android states "due to android restrictions, the contents of this folder can only be shown on a computer.

Do you think I have connected incorrectly or is this more likely android is restricted write permissions to this folder? Does anyone have any ideas?




photo
1

Martin - works perfect! Thanks!!!

photo
1

@Peter Tennant Android 13+ locked the folders, so you can't use Android apps to copy, but have to use external tools. Yesterday I've had problems with USB and Windows Explorer too, maybe there's a bug. I couldn't copy directly between two Android devices and had to transfer the day on the PC first. My favorite copy software TeraCopy didn't work at all. Windows file transfer dialog sporadically didn't open, or unexpectedly closed. Finally I made it work, by transferring only small chunks at once. BUT, this has nothing to do with Locus, so let's not start a discussion here.

Replies have been locked on this page!