Open Bonkles opened 3 months ago
Shout out to @emersonveenstra who built this cool browser extension to add the Strava heatmap to Rapid: https://github.com/emersonveenstra/rapid-power-user-extension
(I'm not sure how they are able to make it work, I would have expected CORS to be an issue)
Wait, what? How? I'm on vacation but have so many questions....
Wait, what? How? I'm on vacation but have so many questions....
Web Extensions let you overwrite/add HTTP response headers from a site, so I added the necessary CORS header to Strava requests to make it work https://github.com/emersonveenstra/rapid-power-user-extension/blob/dev/shared/static_rules.json#L82-L84
Relevant ELI ticket: https://github.com/osmlab/editor-layer-index/issues/294
Description
This feature request came to us by way of a community member at State of the Map US 2024. THe idea would be to integrate Strava's heatmap information in the 'Background Settings -> Overlays' menu.
We investigated a couple of possibilities on the convention floor- one is iD Strava Heatmap, which dynamically inserts the options into iD's background settings menu. We examined the API headers being sent back from the imagery server there and found that the
Access-Control-Allow-Origin
headers are being set as only allowing strava.com. Thus, it would be very difficult for us to use it in our webGL canvas as overlay imagery.We also took a quick look to see if perhaps there was a vector data endpoint for the same strava heatmap imagery, but there does not appear to be one.