trafficonese / leaflet.extras

Extra functionality for leaflet R package.
https://trafficonese.github.io/leaflet.extras/
GNU General Public License v3.0
211 stars 74 forks source link

Why does EditLayers keep crashing my RStudio? #172

Closed zachasman closed 4 months ago

zachasman commented 4 years ago

I'm trying to edit the layer in this map, but it keeps crashing my computer when I select it. All the other toolbar functionalities seem to work fine. What's happening

library(sf)
library(leaflet)
library(leaflet.extras)
library(sp)
library(rmapshaper)
library(dplyr)
library(tigris)
library(rbgm)

nevada <- voting_districts("nevada")
nevada <- rmapshaper::ms_simplify(nevada)

leaflet() %>% addTiles %>%
  addPolygons(data = nevada, group = 'model') %>%
  addDrawToolbar(targetGroup = 'model',
                 editOptions = editToolbarOptions(
                   selectedPathOptions = selectedPathOptions())) %>%
  addLayersControl(overlayGroups = c('model'), options =
                     layersControlOptions(collapsed=FALSE)) %>%
  addStyleEditor()
trafficonese commented 4 months ago

I guess this has been resolved by now. It is working fine on my computer.