Let's geek out for a minute. What we've done is probably good enough for most circumstances. We show a map and turn-by-turn directions, but let's take it a step further. The geolocation API does more than just determine your current location. It includes a timestamp (no biggie) and can allow you to continuously monitor the user's position using the navigator.geolocation.watchPosition
method (http://dev.w3.org/geo/api/spec-source.html#watch-position). This means that with only a little bit of effort, we can turn our previous direction page into a continuously-updating directions page. In the example code, this is all contained within the qrresponse2.php
file.
Updating the user's device too often could impact battery life. So we should really limit how often we redraw the map and directions. For each transportation mode, there is a difference in the amount of meaningful time needed between updates. While we're at it, let's re-do the buttons to contain these...