         lat: lat
         lng: lng
         title: title
-      $.post '/points/', JSON.stringify(data), () ->
+      $.post '/points/', JSON.stringify(data), (resp) ->
         $("#input_lat").val ''
         $("#input_lng").val ''
         $("#input_title").val ''

    App.template.MarkerDetails App.points[id][0]
  )

load_points = () ->
  $.get "/points/", (resp) ->
    for p in resp.points
      do (p) ->
        loc = new google.maps.LatLng(p.lat, p.lng)
        marker = new google.maps.Marker {
         position: loc
         map: App.map
        }
        App.points[p.id] = [p, marker]
        google.maps.event.addListener marker, 'click', () ->
          show_marker_info p.id

$ () ->
  $.ajaxSetup

          App._current_marker.setMap null
          App._current_marker = null
        show_alert 'ok'
        data.id = resp.id
        add_point data
       ,
        'json'

