0

I aim to draw simple rectangle on a leaflet map in R using the mapview and mapedit package. However, does someone has an idea how to directly add a specific numeric value to each geometry just after drawing the geometry? thanks in advance

I already tried to use mapedit but it seems it is only possible to update oralter the geometry.

r2d2
  • 3
  • 2
  • The dev version of mapedit on github has this functionality called `editAttributes()`. See https://github.com/r-spatial/mapedit/blob/master/R/editAttributes.R – TimSalabim Mar 15 '23 at 18:55
  • Thanks for your hint. I was able to run the `editAttributes()` function. I tried to modify the code of the function to fit my idea. However i get an error could not find function "st_as_sfc.geolist()". Any hint where this functions comes from? – r2d2 Apr 11 '23 at 16:30
  • I think it's an unexported function from mapedit so you need to call it using triple-dots `mapedit:::st_as_sfc.geolist()` – TimSalabim Apr 12 '23 at 06:20
  • Such a little thing thank you so much it works now. – r2d2 Apr 12 '23 at 09:22

0 Answers0