         warnings.innerHTML = "" + response.routes[0].warnings + ""
         self.displayArrow(response.routes[0].legs)
         self.directionsDisplay.setDirections(response)
+        #add directionsDisplay object to static array of links for hiding/showing layers
+        MapLinkView.viewLinks.push self.directionsDisplay
 
     )
 

    Math.floor(step.path.length / 2)
  
  #this uses google spherical geometry functions to calculate the heading if our arrow.
  getBearingOfArrow: (pos, towards) ->
    dir = google.maps.geometry.spherical.computeHeading(pos, towards).toFixed(1);
    #round it to a multiple of 3 and correct unusable numbers
    dir = Math.round(dir/3) * 3;

            ),
      map: window.map
    });
    #add marker to static array of arrows for hiding/showing layers
    MapLinkView.viewArrows.push marker
    marker

  #this moves through the steps array of the route to determine which step is about 
  #halfway through the leg
