     c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
     place.distance = earth_radius * c
 
+    if places.closest == undefined || places.closest.distance > place.distance
+      places.closest = place
+
 
 infobox_options =
   #параметры отображения окна инфы при ховере поместу

    x * Math.PI / 180

  get_distance:(place) ->
    cur_loc_lat = map.current_location.lat()
    cur_loc_lng = map.current_location.lng()
    earth_radius = 6371

      navigator.geolocation.getCurrentPosition (position) ->
        current_location = new google.maps.LatLng(position.coords.latitude, position.coords.longitude)
        map.google_map.setCenter current_location
        map.current_location = current_location

        current_loc_marker_options =
          position: current_location
