Does anyone know how to get finish route map image after users post their activity on Strava. I have read Strava API document, but I haven't found it yet
I use https://strava.github.io/api/v3/activities/:id to get an activity, there is "map" field, but I still not find out this field description.
Thanks everyone.
Strava utilizes OpenStreetMap, an open-source project that distributes geographical data for the entire world, alongside our own heat/popularity and other unique data, to create both the visual experience for maps as well as to help inform routing decisions and points of interest shown on the map.
Changing your Strava route to be rainbow coloured is simple. All you need to do is add a rainbow emoji to the title of your route and voila!
Your device may have simply lost a connection to GPS satellites and did not record any data. Your Strava activity may be missing a map, show a straight line connecting your start and endpoints, or was automatically tagged as an indoor activity. Your device may have recorded GPS points that deviate from your true path.
It's pretty simple, first paste the Strava ride page link into http://cosmocatalano.com/strava-gpx-export/. It will generate a gpx file link out of the Strava ride page. Then paste that "download gpx file" link into the Google Maps search field, it will then create the map for it in Google Maps.
Strava takes the set of lat/longs recorded, and encodes them using the GOOGLE POLYLINE ENCODING algorithm. This is in order to reduce the data transmitted through the APP and the WEB SERVICE.
If you need to draw the route, you need to
I used the @mapbox/polyline npm module to decode the polyline in javascript.
Another, and a better way to do that is that you use the google maps static api. Where you will input a polyline, and get an image with a route drawn. The static api will look like
https://maps.googleapis.com/maps/api/staticmap?size=600x300&maptype=roadmap&path=enc:GIVE_YOUR_POLYLINE_DATA&key=GIVE_YOUR_API_KEY
The summary_polyline
can be decoded into a set of coordinates. The algorithm used for a polyline is described here and lots of libraries can handle it.
You can also use the Google Maps static API for example without decoding.
This Ruby code from a slack bot for Strava does it all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With