anchor.diff:        search_params.widget = 'direction'
   
         if printAction?
  +        SORTED_RELICS = {}
           do printClearRelics
   
           loadRelics = (search_params) ->
  
positive.code: ROUTE = null
  POLYGON = null
  SEARCH_PARAMS = null
  
  print_has_prompted = false
  ready_to_print = false
  
negative.code:   $('#relics-container').html ''
    $('#relics-loading-info').show()
  
  closestRoutePoint = (relic) ->
    a = Infinity
    position = 0
    distance = google.maps.geometry.spherical.computeDistanceBetween
    relicPoint = new google.maps.LatLng(relic.latitude, relic.longitude)
    ROUTE.overview_path.each (point, index) ->
      if a > (b = distance(point, relicPoint))
        position = index
        a = b
    {position, distance: a}
  
  addRelicsToSort = (relics) ->
    relics.each (relic) ->
      closest = closestRoutePoint(relic)
      SORTED_RELICS[closest.position] ||= []
      SORTED_RELICS[closest.position].add({distance: closest.distance, relic})
  
  getSortedRelics = ->
    sorted = []
    compare = (a, b) ->
      return a.distance - b.distance
    Object.keys(SORTED_RELICS).each (key) ->
      sorted.add SORTED_RELICS[key].sort(compare).map (a) -> a.relic
    sorted
  
  printRenderRelics = (relics, last) ->
    addRelicsToSort(relics)
  
    if last
      getSortedRelics().each (relic) ->
        printAppendRelic(relic)
      $('#relics-loading-info').hide()
      do windowPrint
  
  