次のような指示を表示する show アクションがあります。
= gmaps({"direction"   => { "data" => { "from" => "#{@ride.latitude},#{@ride.longitude}", "to" => "#{@ride.spot.latitude},#{@ride.spot.longitude}" } }})
ユーザーがモデルを編集し、javascript を介して方向を更新するようにします。だから私はこのように見えるコーヒースクリプトをここに持っています:
$('#ride_address').autocomplete {
    select: (event,ui) ->
      Gmaps.map.direction_conf.destination = "#{spot_lat},#{spot_lng}"
      Gmaps.map.direction_conf.origin = "#{ride_lat},#{ride_lng}" 
      Gmaps.map.create_direction()
}  
現在、新しいルート案内がマップ上にレンダリングされていますが、既存のルート案内の上に表示されています。
最初に以前のルートを削除するにはどうすればよいですか?