Groups
Groups
Sign in
Groups
Groups
Strava API
Conversations
About
Send feedback
Help
Struggling to display the Strava heat map with leaflet
652 views
Skip to first unread message
Michael
unread,
Sep 23, 2015, 4:55:41 PM
9/23/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Strava API
I am desperately trying to get the Strava heat map as an overlay with Leaflet but I cannot get the Strava map to display.
Below is my code:
// initialize the map
var map = L.map('map', {
center: [40.759, -73.952],
zoom: 13
});
streets = L.tileLayer('
https://api.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token={accessToken}
', {
attribution: 'Map data © <a href="
http://openstreetmap.org
">OpenStreetMap</a> contributors, <a href="
http://creativecommons.org/licenses/by-sa/2.0/
">CC-BY-SA</a>, Imagery © <a href="
http://mapbox.com
">Mapbox</a>',
accessToken: xxx,
maxZoom: 17,
minZoom: 9
}).addTo(map);
cycling_lanes = L.tileLayer('
http://tile.waymarkedtrails.org/cycling/{z}/{x}/{y}.png
', {
attribution: 'Map data © <a href="
http://openstreetmap.org
">OpenStreetMap</a> under <a href="
http://www.openstreetmap.org/copyright
">ODbL</a>, elevation data by Imagery © <a href="
http://cycling.waymarkedtrails.org/en/help/acknowledgements
">SRTM/ASTER</a>',
maxZoom: 17,
minZoom: 9
}).addTo(map);
running_heat = L.tileLayer('http:
globalheat.strava.com/tiles/running/color3/{z}/{x}/{y}.png
', {
maxZoom: 17,
minZoom: 9
}).addTo(map);
Michael
unread,
Sep 23, 2015, 5:08:49 PM
9/23/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Strava API
Ok i solved my issue: path should be changed to
http://
globalheat.strava.com/tiles/running/color3/{z}/{x}/{y}.png
Can't believe i spent hours on two missing slashes...
Reply all
Reply to author
Forward
0 new messages