Struggling to display the Strava heat map with leaflet

652 views
Skip to first unread message

Michael

unread,
Sep 23, 2015, 4:55:41 PM9/23/15
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
});

    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery &copy; <a href="http://mapbox.com">Mapbox</a>',
    accessToken: xxx,
    maxZoom: 17,
    minZoom: 9
}).addTo(map);

    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> under <a href="http://www.openstreetmap.org/copyright">ODbL</a>, elevation data by Imagery &copy; <a href="http://cycling.waymarkedtrails.org/en/help/acknowledgements">SRTM/ASTER</a>',
    maxZoom: 17,
    minZoom: 9
}).addTo(map);

    maxZoom: 17,
    minZoom: 9
}).addTo(map);


Michael

unread,
Sep 23, 2015, 5:08:49 PM9/23/15
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