Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove method changed for scalebar #547

Merged
merged 2 commits into from
May 15, 2018
Merged

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