         timestamp: Date.now()
         hdop: -1
         web: true
+    socket.emit 'new geo', geoJson
     lastSentPosition = position
+    addGeoms geoJson
 
 getGeos = (query, callback) ->
   $.ajax

lineLayer = L.layerGroup()
pointLayer = L.layerGroup().addTo map

#geolocation (position) ->
#  {latitude:lat, longitude:lng} = position.coords
#  map.setView [lat, lng], 13

# Get all logged positions for the day
getFrom = new Date()
getFrom.setHours 0,0,0,0
getGeos {created: {$gt: getFrom}}, (geoJson) ->
  addGeoms geoJson.features
  map.fitBounds new L.LatLngBounds(line._point.getLatLng() for name, line of history)

$('#start-position').removeClass('nodisplay') if location.hash is '#tracking'

onPosition = (position) ->
  if loggedIn() and not comparePosition(lastSentPosition, position)
    {latitude:lat, longitude:lng} = position.coords
    geoJson =
      geometry:
        type: 'Point'
        coordinates: [lng, lat]
