Closed zimmertr closed 2 years ago
I was able to get it to work by doing the following:
tms[3,15]:
bit is specific to JOSM, so you don't want anything in your URL before https://
{switch:a,b,c}
part with a
, b
, or c
{zoom}
in the URL with {z}
My hero :)
You have no idea how life changing this is going to be for route planning.
Well, actually, if anyone does it's probably you and Zeke.
THANK YOU SO MUCH!!!!!!
Have ya'll had any luck using this with GaiaGPS? Looks like they have a 250 character limit for the URL field... My full heatmap URL with my authentication tokens is 708 characters.
Can't say I have. I've only ever tried using it for JOSM and iD. Should work in any application that can deal with a TMS server (and that doesn't have a character limit), though.
You could proxy it to omit the parameters from the URL.
~¶ cat Caddyfile
http://:8080 {
rewrite * /tiles-auth{uri}?Key-Pair-Id=…&Policy=…&Signature=…
reverse_proxy https://heatmap-external-c.strava.com {
header_up Host {upstream_hostport}
}
}
~¶ caddy run
Then configure http://localhost:8080/all/hot/{z}/{x}/{y}.png
That is a good idea. I tried using a URL shortener but Gaia rejected it because it failed a regular expression looking for {z}/{x}/{y}
. I'll try that next. In the interim, I've sent an email to their support team asking them about it. Maybe they'll boost the limit.
One last question and then I promise I'll stop bothering you people. Do you know why the resolution is so much lower when imported on Caltopo as opposed to being shown natively on Strava? I assume Caltopo is just not capable of displaying the data at the same resolution?
I found that I also had to set it to Type: Tile in the Custom Map Source dialog box.
Adding ?px=256&
appears to solve the resolution issue.
Also here is a Python program to generate the URL for Caltopo using the StravaCookies package.
First of all I apologize for filing this as an issue as it is likely your extension is working properly. I am just unable to find a different method to contact you. And if I were to ask on /r/strava or something people probably wouldn't have any idea what I'm talking about. This is a last resort sorta thing ;).
I've successfully generated a heatmap URL using both your extension as well as retrieving the cookies from my browser after signing into Strava as per the instructions here.
The resultant URL looks like this:
tms[3,15]:https://heatmap-external-{switch:a,b,c}.strava.com/tiles-auth/all/hot/{zoom}/{X}/{Y}.png?Key-Pair-Id=REDACTED&Policy=REDACTED&Signature=REDACTED
In Caltopo, if I
Add -> Custom Source
and set the following options:It returns "Template URL is invalid" when I click save. If I then update the URL and replace
{switch:a,b,c}
witha
,b
, orc
, it will successfully save. However, when I enable the Custom Layer, no data is shown.It works perfectly with OpenStreetMap. For example, if I use your extension to generate a URL and click
Open in iD
, a new tab opens and I can successfully see OpenStreetMap showing Strava Heatmap data as a Custom Background.Do you know why this is? Is Strava's API rejecting the request from Caltopo for the data or something?