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

Add senseBox icon for leafletr #14

Open
nuest opened this issue Jan 9, 2018 · 2 comments
Open

Add senseBox icon for leafletr #14

nuest opened this issue Jan 9, 2018 · 2 comments
Labels

Comments

@nuest
Copy link
Contributor

nuest commented Jan 9, 2018

You can easily create an icon matching the openSenseMap with leafletr, it could be helpful for users to provide the icon with a function in this package.

sense_icon <- awesomeIcons(
  icon = 'cube',
  iconColor = '#ffffff',
  library = 'fa',
  markerColor = 'green'
)

leaflet() %>% 
  addTiles() %>%
  addAwesomeMarkers(data = osem_boxes(), # ms_boxes,
             popup = ~paste0("<b>Name:</b> ", name, "<br><b>Id:</b> ", 
                             "<a href='https://opensensemap.org/explore/", X_id, "' ",
                             "target='_blank'>", X_id, "</a>"),
             label = ~name,
             icon = sense_icon)

giving

image

@nuest
Copy link
Contributor Author

nuest commented Jan 14, 2018

If not a function, this could also go into a short vignette for creating a leaflet map, vignettes/osem-leaflet.Rmd - happy to create a PR if welcome.

@noerw
Copy link
Member

noerw commented Jan 15, 2018

👍 A leaflet / interactive visualization vignette sounds more reasonable than adding this to the base package.

@noerw noerw added the vignette label Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants