Closed trafficonese closed 1 year ago
Sorry for my ignorance, I'm really new to github... Are these fixes ready to use with the package, or going to be merged with the main branch soon? When that happens will I only need to update the package to be able to use them?
Thanks so much for all your work on this!
Unfortunately the package is not well maintained at the moment. Please read the comments of #188.
As soon as the PR is merged, you can install the new version with remotes::install_github("bhaskarvk/leaflet.extras")
and once it is published to CRAN, you can run install.packages("leaflet.extras")
.
If you want to try the PR already, you can install it with remotes::install_github("bhaskarvk/leaflet.extras", ref = remotes::github_pull("184"))
I'm trying the PR and so far so good, this is exactly what I was looking for. Thanks!
Hi, I have installed the PRs above - I tried both rsion with remotes::install_github("bhaskarvk/leaflet.extras") and remotes::install_github("bhaskarvk/leaflet.extras", ref = remotes::github_pull("184"))
however neither of them fixed the removeDrawToolbar , with or without clearfeatures =T.
do I understand correctly that using this PR it should be possible to remove the toolbar and the drawn polyong featrue using the following?
leafletProxy('mymap')%>% removeDrawToolbar(clearFeatures = T)
Yes, using this PR it should be possible to remove the draw-toolbar and the drawn shapes. This example works for me:
library(shiny)
library(leaflet)
library(leaflet.extras)
ui <- fluidPage(
leafletOutput("map"),
actionButton("rm", "Remove Draw Toolbar")
)
server <- function(input, output, session) {
output$map <- renderLeaflet({
leaflet() %>%
addTiles() %>%
addDrawToolbar()
})
observeEvent(input$rm, {
leafletProxy('map')%>%
removeDrawToolbar(clearFeatures = T)
})
}
shinyApp(ui, server)
Adds
handlersOptions
andtoolbarOptions
foraddDrawToolbar
which let you customize the drawing toolbar / tooltips.This should close #174
This should also close #148, close #156 and close #165 . The function
removeFrom
did not exist and was changed toremove
and the typodrawToobar
was corrected todrawToolbar