Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

schloerke
Copy link
Contributor

@schloerke schloerke commented May 15, 2018

Fixes: #538 Scalebar not removed properly in v2.0.0

library(leaflet)                                                    
                                                                    
leaf <- leaflet() %>%                                               
  addTiles() %>%                                                      
  addScaleBar()                                                       
                                                                    
# displays scalebar in top right                                    
leaf                                                                

                                                                    
# no scalebar displayed in top right                                
leaf %>% removeScaleBar()                                           

# displays scalebar in top right with blue polygons over switzerland
leaflet() %>%                                                       
  addTiles() %>%                                                      
  addScaleBar() %>%                                                   
  addScaleBar() %>% # triggers remove scalebar internally             
  addPolygons(data = gadmCHE)                                         
#> Loading required package: sp

PR task list:

  • Update NEWS

@schloerke
Copy link
Contributor Author

@schloerke schloerke merged commit 6fdf2bd into rstudio:master May 15, 2018
@schloerke schloerke deleted the scalebar branch May 15, 2018 17:36
schloerke added a commit to schloerke/leaflet that referenced this pull request May 15, 2018
* master:
  remove method changed for scalebar (rstudio#547)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant