Mapbox has a static maps API, which means that all I really need to do is specify a centerpoint for the map and a zoom level, and it will return me an image for that location.Īn example static map downloaded from Mapbox. For a first pass I want to try something simple, like grabbing a static image of the relevant part of my route. I’ve ended up using Mapbox as my data source for the actual maps. To sanity check the data I’ve extracted from the TCX file, I’m going to combine it with an existing mapping tool and see what it looks like. Next I need to look at rendering that data in a meaningful way. From that file I can extract the geolocation coordinates from the run, one data point for each minute of the run. That TCX file is fairly easy to read with Javascript, it’s just an XML document ( example here) which can be loaded using the xml2js package. As it transpires that’s pretty easy because Fitbit allows you to export your own data as a TCX file. I’m already using my Fitbit to track my routes, so it makes sense to try and use that existing data. I’m not really interested in plotting a route manually. Obviously as a one-off poster it would be more efficient to have a tool like Illustrator to make something special, but I’m more interested in the coding and development side of things, so I’m going to build the whole project in Javascript. ![]() With an idea set, it’s time to start working on some code. ![]() The idea I have in mind is one that features the actual route data and statistics from my run much like an improved version of the route snapshots offered by the Fitbit or Strava apps, and combining that with overlaid graphics and the actual maps.Įarly early sketchbook ideas for the final output. Working on the assumption that I do actually manage to survive the half-marathon I thought it would be a great idea to create a poster - something individual and unique - to commemorate the occasion.Īs inspiration, here’s an example route from Fitbit and Strava Fast-forward a couple of months and I’ve signed myself up for my first half-marathon. I joined Deeson as a remote worker about six months ago, and to accompany this change in lifestyle I decided to take up running.
0 Comments
Leave a Reply. |