Open zachasman opened 5 years ago
What operating system? What version of RStudio? Does the same thing happen if you pop the map out into an external browser before editing?
What operating system? What version of RStudio? Does the same thing happen if you pop the map out into an external browser before editing?
@jcheng5
MacOs Mojave Version 1.3.443
Could you please try running it? I'm curious to know if this is just an issue with my computer, my RStudio or if there's something left out in the code causing it.
Wow, it's pretty bad--there's JS code spinning out of control. I repro'd this on Windows in RStudio, Firefox, and Chrome; hundreds of this deprecation warning in the JS console:
Deprecated use of _flat, please use L.LineUtil.isFlat instead.
This repros even without the addLayersControl
or addStyleEditor
calls; all that's necessary is to add the Draw toolbar, and click the little Edit icon, that immediately puts you into the bad state.
@jcheng5 FWIW, maybe I'm doing it incorrectly? I'm trying to follow the third example from this page. That seems to run so smoothly.
library(rbgm)
set.seed(2)
## pick one of the available model files
fs <- sample(bgmfiles::bgmfiles(), 1)
## read the model, and convert to Spatial (box for polygons, face for boundary lines)
model <- boxSpatial(bgmfile(fs))
## most of the BGM models will be in a local map projection
model <- spTransform(model, "+init=epsg:4326")
leaflet() %>% addTiles() %>%
addPolygons(data = model, group = 'model') %>%
addDrawToolbar(targetGroup = 'model',
editOptions = editToolbarOptions(
selectedPathOptions = selectedPathOptions())) %>%
addLayersControl(overlayGroups = c('model'), options =
layersControlOptions(collapsed=FALSE)) %>%
addStyleEditor()
Anything?
@jcheng5 Has there been any sort of update on this issue?
@alandipert Has there been any sort of update on this issue?
@alandipert @jcheng5 I will take that as a no
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