Mapping from GPX file

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
syawillim's picture

I'm putting together a personal site to keep track of local trails; I want to render a map from an uploaded GPX file, no problem so far using FileField, Geocoder and Leaflet. To make it a bit more interesting I would like to add a little more information such as a table or list with Distance, Vertical Climb, Vertical Drop, Grade (average), Grade (max), Altitude (min), Altitude (max) and a chart plotting vertical over distance.

I've found two contributed modules that more or less do this; Trackfield (D6) and GPX field (D7 - beta). I went with GPX field as it will be a D7 site and managed to hack it to work with Leaflet but found that it throws a bunch of errors if the GPX file does not include elevation data and unfortunately I don't have the coding skills to build in some error handling. Development of GPX field also seems to have stalled.

After some consideration I think the best way to handle this is to stick with the FileField, Geocoder and Leaflet combination and make use of Computed Field or Custom Formatters modules for calculating distance etc, and I believe that it should also be possible to use High Charts (or similar) to render the chart.

So what I'm looking for is some feedback on the Computed Field/Custom Formatters approach. I also need someone to write the code and I’m more than happy to contribute it back to the community once completed.

Comments

I can't help with your

mv1st's picture

I can't help with your computed field question but have you looked at Trackfield https://drupal.org/project/trackfield. There is a 7.x version at github https://drupal.org/node/1016956. Though I wish the 7.x version would be moved to drupal it is all I have been able to find so far that will give me speed, elevation, distance, etc.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week