         socket.on 'message', (raw) ->
             msg = JSON.parse raw
             console.log msg
+
+            # A message from the server.
             if msg.message
                 $('div[data-role="content"]')
                     .append $('<p>').text "#{msg.message.text}"
+
+            # A result from the server based on current position.
             if msg.currentPosition
+                # Show sensible units for accuracy.  Feet if under a half
+                # mile, miles if over.
+                if msg.currentPosition.position.coords.accuracy > 2640
+                    accuracy = "#{(parseFloat(msg.currentPosition.position.coords.accuracy, 10) / 5280).toFixed 2} miles"
+                else
+                    accuracy = "#{msg.currentPosition.position.coords.accuracy} feet"
+
                 $('p#stats').text """It looks like you're at
-(#{msg.currentPosition.position.coords.latitude}, #{msg.currentPosition.position.coords.longitude}), give or take #{msg.currentPosition.position.coords.accuracy} feet and that there's at least #{msg.currentPosition.cameras.length} cameras nearby."""
+(#{msg.currentPosition.position.coords.latitude}, #{msg.currentPosition.position.coords.longitude}), within an accuracy of #{accuracy} and that there's at least #{msg.currentPosition.cameras.results.length} cameras within a distance of #{msg.currentPosition.cameras.maxDistance} miles at #{new Date(msg.currentPosition.position.timestamp)}."""
 
-                for camera in msg.currentPosition.cameras
+                for camera in msg.currentPosition.cameras.results
                     $('ul#cam-list').append($('script#cam-item').tmpl(camera))
                 $('ul#cam-list').listview 'refresh'
 

                div class: 'ui-btn-inner ui-li', ->
                    div class: 'ui-btn-text', ->
                        a class: 'ui-link-inherit', ->
                            img class: 'ui-li-thumb', src: '${url}', alt: 'M.I.A.'
                            h3 class: 'ui-li-heading', '${name}'


# Can't figure out how else to use project-local module with Zappa.
def mongoose: require "#{process.cwd()}/node_modules/mongoose"

# Used for spherical calculations.  According to WolframAlpha.
def radiusOfEarthMiles: 3956.6
def feetInAMile: 5280

get '/': ->
    # Define the mongoose schema.
