title: Delete Polygon from Leafletmap R/Shiny
body: <p>I draw a Polygon on a leafletmap which I use in a shiny app.
  Everytime an event is fired I want to delete the old polygon and draw the new one over it.
  That does not work - I assume I use <code>layerId</code> wrong?</p>
  
  <p>Any hints on this?</p>
  
  <pre><code># draw polygons
  observeEvent(da$ar, {
      # remove polygon
      removeShape(map, layerId = unique(10))
  
      leafletProxy("myMap") %&gt;% addPolygons(data = da$ar, stroke = TRUE, 
      fillOpacity = 0.5, smoothFactor = 0.5,
      layerId = unique(10)
      )
  })
  </code></pre>