Stathunters tiles support in Web planner

skvedo shared this idea 8 months ago
Collecting votes

There is existing browser extension for showing tiles from https://www.statshunters.com/ on webplanners map. Currently are suported Strava, Komoot, Brouter, RWGPS, Garmin and Mapy.cz route builder. Ether add the functionality to route planner or check with stathunters author to add Locus to sites supported by extension.


https://addons.mozilla.org/cs/firefox/addon/statshunters/

Thanks

Replies (2)

photo
1

Somewhat related: for Locus Map app itself, https://github.com/liskin/liscopridge/blob/main/src/liscopridge/app/statshunters.md can be used.

Totally related: the StatsHunters author is very friendly and open, and has given me permission to analyze the source code of his extension and reuse his code in my own strava-map-switcher extension (to add Garmin support, but I haven't managed to find time for that yet), so I'm sure he'll be delighted if someone extracts the source for his extension, adds Locus Web Planner support and sends a patch.

I'm certainly qualified to do that, I'm just somewhat busy these days so I may need a nudge or two to get to it. A nudge that @skvedo will surely be happy to provide. But I certainly don't mind if anyone else takes initiative here, either. :-)

photo
1

I sent the following patch for the StatsHunters extension to Stan today: https://gist.github.com/liskin/86b6ab31a45fed2e276504760d0b62f7

As you can see (https://gist.github.com/liskin/86b6ab31a45fed2e276504760d0b62f7#file-0001-add-support-for-locus-map-web-patch-L49), the code for getting to the Leaflet map instance is a bit of a hack, so if someone from the Locus team could provide a better way by exposing the instance in a global variable somewhere, that would be wonderful and would ease maintenance (the hack can easily stop working with future Leaflet.js upgrades). As an inspiration, BRouter exposes this in window.BR.debug.map.

Leave a Comment
 
Attach a file