Strava heatmap

Started by rvb, November 21, 2017, 10:37:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CrAfTy

#30
Quote from: Camino_ancho on August 01, 2019, 02:59:10 PM
<r>No consigo hacer que funcione. Cuando sigo estos pasos, no encuentro el símbolo '

Gracias</r>

Se hacen los mismos pasos pero a la hora de copiar el cookie es diferente:


  • Create a Strava account (it's free)
  • Use Chrome to browse to the Strava Heatmap site (i.e. https://www.strava.com/heatmap#12.56/8. ... 9/hot/ride)
  • Login in Strava to be able to zoom on street level
  • Open open chrome developer tools -> network, filter for .png
  • Right click an entry in the column Name and do a "copy as cURL"
  • Paste that in an editor and copy the Cookie Part, everything after "Cookie:" up unto '<e>
  • Right click an entry in the column Name and select Save all as HAR with content
  • In file saved seach for cookie and paste the value in httpparam

En el fichero .har que has guardado se busca el value de la cookie (valor en rojo) y se pega en httpparam:


            },
            {
              "name": "accept-language",
              "value": "es-ES,es;q=0.9"
            },
            {
              "name": "cookie",
              "value": "_ga=GA1.2.130219886.1572709495; sp=1d23eec3-ce2e-4098-a8dc-1fc124d2950a; _strava4_session=79dituff63soed6KSSjFFCaYkciIRf7vzYRlcvWrxp1LsitYdZNk2NK0bl~T0FoJBRudFRodnysgnnF7vqgEN579P6OCGvE7iIdSrxXFBnFf9KtwvlKRb~M~kBpHvlmgrqz84BVelyt9zzk5zvZBirDDot3dCgACZ~qpeNRuteqVDCJ4lyu62cXDoyU497vxJQrkwj4Shr-QQwEiWg-CDI0L0tEU6teUcrkFr7dQrtjOt-9TQQR9FtMVBGNkzuwKTauuA__; _dc_gtm_UA-6309847-24=1"
            }
          ],







Pinod

#31
I've tried everything, unfortunately nothing has worked for me.

I'm using the Strava Heatmap layer (with the cookies method) in JOSM, OSM iD and other programs, but until now, no luck with orux.

Is it still working for anybody?


afgb1977

#32
Use the original Strava links, there are at least 40.
AnyGIS links have server problems, the only advantage is that it has 1-2 zoom levels more than the original ones.
I am sending you a small file that I use as a repository for Strava layers. They all work.
They are divided into 2:
① Tiles 256
② Tiles 512
PD. I attach XML file with all the Strava links that I have configured.
To get the dark background, make a composite map with MapBox or some other dark base map, Strava's website uses MapBox, you can also use the new SwissTopo Dark with shading that have global coverage.
Open this answer so you can view and download the XML file.

PS2. If you refer to obtaining more zoom through Strava cookies, you must repeat the process and configure everything again approximately once a week, the cookies expire and you will no longer be able to see the layers.
Felipe


Pinod

#33
Quote from: afgb1977 on April 23, 2021, 01:36:05 AM
Use the original Strava links, there are at least 40.
AnyGIS links have server problems, the only advantage is that it has 1-2 zoom levels more than the original ones.
I am sending you a small file that I use as a repository for Strava layers. They all work.

Thanks very much for the file, Felipe, all the links are working OK, with zoom limitation.

Quote
PS2. If you refer to obtaining more zoom through Strava cookies, you must repeat the process and configure everything again approximately once a week, the cookies expire and you will no longer be able to see the layers.
Yes, I know that, the problem is that I haven't been able to make it work and I'm not sure if I'm doing something wrong, or it's just that the process is not working anymore. Is it working for you?

LaurentG

Hi,

I just did a test.... and it doesn't work for me as well.
Whatever I set the cookie or not, I do not get anything above level 12
But maybe I'm wrong setting the
<httpparam name="Cookie"><![CDATA[_strava4_session=....]]></httpparam>

afgb1977

Quote from: Pinod on April 23, 2021, 08:48:54 AM
Quote from: afgb1977 on April 23, 2021, 01:36:05 AM
Use the original Strava links, there are at least 40.
AnyGIS links have server problems, the only advantage is that it has 1-2 zoom levels more than the original ones.
I am sending you a small file that I use as a repository for Strava layers. They all work.

Thanks very much for the file, Felipe, all the links are working OK, with zoom limitation.

Quote
PS2. If you refer to obtaining more zoom through Strava cookies, you must repeat the process and configure everything again approximately once a week, the cookies expire and you will no longer be able to see the layers.
Yes, I know that, the problem is that I haven't been able to make it work and I'm not sure if I'm doing something wrong, or it's just that the process is not working anymore. Is it working for you?

Hello. I had not seen the message originating from this thread. I think it is the third method that I have found.

I leave you a link to the OSM wiki where another method is described. In this, the cookie settings go directly to the URL.

https://wiki.openstreetmap.org/wiki/Strava

Seeks "Global Heatmap in High Resolution".
I'm going to look for the other description, I don't remember where I read it. Take this opportunity and leave you a link to the OruxMaps group on Telegram.

https://t.me/OruxMapsGPS

Pinod

#36
Quote from: afgb1977 on April 23, 2021, 12:39:14 PM

I leave you a link to the OSM wiki where another method is described. In this, the cookie settings go directly to the URL.

https://wiki.openstreetmap.org/wiki/Strava

Seeks "Global Heatmap in High Resolution".
I'm going to look for the other description, I don't remember where I read it. Take this opportunity and leave you a link to the OruxMaps group on Telegram.

https://t.me/OruxMapsGPS

Thanks for the link, I know Strava is working in high resolution in JOSM, Id and some other software, in fact, it was me who wrote that section of the OSM Wiki a few months ago, haha.  ;D

However, I still can't make it work in Orux.

The instructions on the wiki for JOSM / ID  are very clear, you  just have to replace the bolded text with the proper activity / colour /cookies values:
https://heatmap-external-{switch:a,b,c}.strava.com/tiles-auth/ACTIVITY/COLOR/{zoom}/{x}/{y}.png?Key-Pair-Id=MYVALUE&Policy=MYVALUE&Signature=MYVALUE
...and voilà, you have the strava heatmaop in high resolution availiable for one week in JOSM / ID

Now, let's go back in Orux. After reading all the preavious posts, once I get the cookies from the HAR file, it's still not clear what argument must I replace here:

<httpparam name="Cookie"><![CDATA[ajs_user_id=22***]]></httpparam>

I suppose is this one, but it's not working:
<httpparam name="Cookie"><![CDATA[ajs_user_id=22***]]></httpparam>

I've tried several other options, no luck.  :(










LaurentG

Quote from: afgb1977 on April 23, 2021, 12:39:14 PM

I leave you a link to the OSM wiki where another method is described. In this, the cookie settings go directly to the URL.

https://wiki.openstreetmap.org/wiki/Strava

Seeks "Global Heatmap in High Resolution".

I just tried with this method (in OruxMaps, not in JOSM) : doesn't work (at least for me....)   :'(

LaurentG

Quote from: Pinod on April 23, 2021, 06:14:36 PM
However, after reading all the preavious posts, once I get the cookies from the HAR file, it's still not clear what argument must I replace here:

<httpparam name="Cookie"><![CDATA[ajs_user_id=22***]]></httpparam>

I suppose is this one, but it's not working:
<httpparam name="Cookie"><![CDATA[ajs_user_id=22***]]></httpparam>

I've tried several other options, no luck.  :(

No, the value to replace is what is between [...] in ![CDATA[ajs_user_id=22***]]
ie. replace ajs_user_id=22*** by the list of all cookies, in the form xxx=...; zzz=... ; etc...

But I did the test.... and unfortunately, it doesn't work ...  :'(


Pinod

#39
Quote from: LaurentG on April 23, 2021, 08:18:02 PM

No, the value to replace is what is between [...] in ![CDATA[ajs_user_id=22***]]
ie. replace ajs_user_id=22*** by the list of all cookies, in the form xxx=...; zzz=... ; etc...

But I did the test.... and unfortunately, it doesn't work ...  :'(

I've just done it and... it worked!  ;D

This is what I did, I'll reorganize the info on the previous posts here as a reference:

  • Create a Strava account (it's free)
  • Use Chrome to browse to the Strava Heatmap site (https://www.strava.com/heatmap
  • Login in Strava to be able to zoom at max. level
  • Open Chrome Console:Command+Option+J (Mac) or Control+Shift+J (Windows, Linux, Chrome OS)]-> network, filter for .png
  • Right click an entry in the column Name and select Save all as HAR with content


Now, search for the cookie values in the .har file, and copy the bolded text:

      {
              "name": "cookie",
              "value": "ajs_anonymous_id=%22636dbaca-b61a-4ccc-8999-c40712dd_COPY_THIS_TEXT..."
            },


Now, paste that text here:

<onlinemapsource uid="716">
<name>Strava heatmap cycle hot (STRAVA)</name>
<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{$z}/{$x}/{$y}.png?px=256]]></url>
<minzoom>6</minzoom>
<maxzoom>23</maxzoom>
<projection>MERCATORESFERICA</projection>
<servers></servers>
<httpparam name="Cookie"><![CDATA[PASTE_TEXT_HERE]]></httpparam>
<cacheable>1</cacheable>
<downloadable>1</downloadable>
<maxtilesday>0</maxtilesday>
<maxthreads>0</maxthreads>
<xop></xop>
<yop></yop>
<zop></zop>
<qop></qop>
</onlinemapsource>

And finally, copy and paste the whole thing in your onlinemapsources.xml file (folder: \oruxmaps\mapfiles\customonlinemaps). Refresh your map list and the strava heat map should be availiable and working.



Note: If you want different activities / colour, you can replace this values:
<url><![CDATA[https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{$z}/{$x}/{$y}.png?px=256]]></url>

ACTIVITY:
run
ride
both
winter
water
all

COLOR:
blue
red
bluered
purple













LaurentG

Bingo, it works ! Thanks a lot !  :D

My problem was that the Url has to be slightly modified when used with authentication cookies as

https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{$z}/{$x}/{$y}.png?px=256

Many thanks to have published the full example that showed me what's wrong !

On the other hand, max zoom level is 16. At 17 and above, nothing.
So it's better to have

<maxzoom>16</maxzoom>

afgb1977

#41
Quote from: LaurentG on April 24, 2021, 09:30:54 AM
Bingo, it works ! Thanks a lot !  :D

My problem was that the Url has to be slightly modified when used with authentication cookies as

https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{$z}/{$x}/{$y}.png?px=256

Many thanks to have published the full example that showed me what's wrong !

On the other hand, max zoom level is 16. At 17 and above, nothing.
So it's better to have

<maxzoom>16</maxzoom>

Hello.
I just made a discovery that dropped cookies. I randomly found a Strava url that goes through the freemap.sk proxy, 256 zoom max = 16, 512 zoom max = 15, I made the usual changes in the url and I could to get all the STRAVA ALL in Blue, bluered, gray and hot. These are the variables that I use, so I assume without testing that the other Strava links are functional.
I think they are the best solution and alternative to the weekly configuration of Cookies and the AnyGIS links that do not work.
I leave the link to freemap.sk GitHub in case you want to read more about it, I am configuring a small file with ALL layers at 256 and 512 and I'll upload it to this post thread in a few moments.
Without finishing reading the documentation well, I see a User parameter on the GitHub page and I assume that the personal traces could be displayed.

https://github.com/FreemapSlovakia/strava-heatmap-proxy

afgb1977

#42
Quote from: afgb1977 on May 02, 2021, 05:21:59 PM
Quote from: LaurentG on April 24, 2021, 09:30:54 AM
Bingo, it works ! Thanks a lot !  :D

My problem was that the Url has to be slightly modified when used with authentication cookies as

https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{$z}/{$x}/{$y}.png?px=256

Many thanks to have published the full example that showed me what's wrong !

On the other hand, max zoom level is 16. At 17 and above, nothing.
So it's better to have

<maxzoom>16</maxzoom>

Hello.
I just made a discovery that will end the cookie problem. I randomly found a Strava url that goes through the freemap.sk proxy, 256 zoom max = 16, 512 zoom max = 15, I made the usual changes in the url and ask to get all the STRAVA ALL in Blue, bluered, gray and hot. These are the variables that I use, so I assume without testing that the other Strava links are functional.
I think they are the best solution and alternative to the weekly configuration of Cookies and the AnyGIS links that do not work.
I leave the link to freemap.sk GitHub in case you want to read more about it, I am configuring a small file with ALL layers at 256 and 512 and in I'll upload it to this post for a moment.
Without finishing reading the documentation well, I see a User parameter on the GitHub page and I assume that the personal traces could be displayed.

https://github.com/FreemapSlovakia/strava-heatmap-proxy

Strava freemap.sk

Contains 8 URLs.
Strava ALL Blue, BlueRed, Gray and Hot.
256= ZoomMax= 16
512= ZoomMax= 15
Folder = TEST

I assume, without testing it, that the other Strava layers can be configured by making the usual changes to the URL. (run / blue /, both / bluered / ...)

LaurentG

#43
Sounds good !
Thank you

Only drawback : server seems to be a little bit slower...

Pinod

Quote from: afgb1977 on May 02, 2021, 06:15:03 PM
Quote from: afgb1977 on May 02, 2021, 05:21:59 PM
Quote from: LaurentG on April 24, 2021, 09:30:54 AM
Bingo, it works ! Thanks a lot !  :D

My problem was that the Url has to be slightly modified when used with authentication cookies as

https://heatmap-external-a.strava.com/tiles-auth/ride/hot/{$z}/{$x}/{$y}.png?px=256

Many thanks to have published the full example that showed me what's wrong !

On the other hand, max zoom level is 16. At 17 and above, nothing.
So it's better to have

<maxzoom>16</maxzoom>

Hello.
I just made a discovery that will end the cookie problem. I randomly found a Strava url that goes through the freemap.sk proxy, 256 zoom max = 16, 512 zoom max = 15, I made the usual changes in the url and ask to get all the STRAVA ALL in Blue, bluered, gray and hot. These are the variables that I use, so I assume without testing that the other Strava links are functional.
I think they are the best solution and alternative to the weekly configuration of Cookies and the AnyGIS links that do not work.
I leave the link to freemap.sk GitHub in case you want to read more about it, I am configuring a small file with ALL layers at 256 and 512 and in I'll upload it to this post for a moment.
Without finishing reading the documentation well, I see a User parameter on the GitHub page and I assume that the personal traces could be displayed.

https://github.com/FreemapSlovakia/strava-heatmap-proxy

Strava freemap.sk

Contains 8 URLs.
Strava ALL Blue, BlueRed, Gray and Hot.
256= ZoomMax= 16
512= ZoomMax= 15
Folder = TEST

I assume, without testing it, that the other Strava layers can be configured by making the usual changes to the URL. (run / blue /, both / bluered / ...)

It works great, also for all other activities.

Thanks very much!  :)