Paul Sullivan

Paul Sullivan

GO!

Journeys

How this works

Using OsmAnd [ http://osmand.net/ ] I send regular Co-ordinate updates to this webserver at a hidden URL.  These are saved in to a MySQL database and a live view of the "current" track (if there is one) is always available live.

Preamble:

  1. Plotting the lat/lon on a Google map seems to be a defacto choice. 
  2. My previous experience with jqPlot suggested a realtime rendered graph for the altitude profile would be a better choice than a server side .png

There were some challenges:

  1. Google maps' annotation system is not very good.  I used Garry Little's InfoBox library to show meta data at the route polyline points.  This worked where the points were sufficiently far apart, but using a more frequent plot I used the Haversine formula to ensure a minium distance between 2 labels, whilist keeping the increased route resolution.
  2. Once a Journey is finished the set of coordinates are updated with a groupId and an entry created for the group.  This allows a bunch of details to be set for the plot. 
  3. To share the group data with both GoogleMaps and JQPlot a configObj is JSON'd and base64'd and then embedded in a hidden DIV on the page so that the defaults are only queried from the DB once and are immediately available to the javascript.
  4. Walking / Hiking routes are different to driving routes so I added a selectot to the co-ordinate groups table to allow a specific google map type to be chosen.
  5. Server time is UTC, but the UI plots are shown with a set offset to ensure they reflect the local time when the journey was made.
  6. The "current" plot, which is available as soon as there are 2 ungrouped data points, was a further challenge.
    1. MapCenter
    2. TimeZone

 

Valid XHTML 1.1 Strict Valid CSS

Originally from East London in South Africa. I recently moved to Dorking, Surrey having previously lived in the London Borough of Sutton and Cape Town