       view
     @fit_bounds()
 
+  # remove all itineraries from the map
+  remove_itineraries: =>
+    view?.clean_up(true) for view in @views if @views?
 
   fit_bounds: =>
     if @map.get('fit_bounds')

class Transit.Views.Plan extends Backbone.View
  template: JST['templates/plan']
  # el: "#navigation"
  # tagName: 'div'
  className: 'plan'

  events:


  fetch_plan: =>
    @render()
    # remove old itineraries from the map before fetching new ones
    @remove_itineraries()
    # move the from/to markers to geocoded locations
    Transit.map.moveMarker 'from', @model.get('from')
    Transit.map.moveMarker 'to', @model.get('to')
