 
   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')


  # update the plan when markers are dragged
  update_plan: =>
    console.log "UPDATING PLAN..."
    # clean up the existing views when markers are dragged
    view.clean_up(true) for view in @views
    
    # set the model from/to locations from the marker positions
    @model.set
      from: @map.get('from').position.toHash()

class Transit.Views.Plan extends Backbone.View
  template: JST['templates/plan']
  
  className: 'plan'

  events:
