 
   drawFeatureId: (feature, id) =>
     if @drawnFeatures[id]
-      @constructor.drawnItems.removeLayer @drawnFeatures[id]
+      @drawnItems.removeLayer @drawnFeatures[id]
       @drawnLayerChanged()
     if feature
       feature = L.geoJson(feature).getLayers()[0]

    $('.edit-undo').click (evt) ->
      evt.preventDefault()
      evt.stopPropagation()
      if drawnItems.getLayers().slice(-1)[0]?.editing?._enabled
        drawnItems.removeLayer(drawnItems.getLayers()[-1..][0])
      else
        $('ul.leaflet-draw-actions a[title^="Delete"]')[0].click()


    $('.edit-clear').click (evt) =>
      evt.preventDefault()
      evt.stopPropagation()
      @drawnItems.clearLayers()
      $('ul.leaflet-draw-actions a[title^="Cancel"]')[0]?.click()
      $('.tabs').children('li.area, li.route, li.point').css(opacity: 1).prop('disabled', false)
      @geoInput.changeVal(null)
