-
Notifications
You must be signed in to change notification settings - Fork 123
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
tm_minimap() not working unless leaflet is loaded #231
Comments
Nope for both. Minimap is neat but doesn't really add any value for quick layer inspection. Regarding providers, I call |
I think it's a nice feature, especially in unfamiliar areas. I made a pull request in leaflet, as you can see above. For now, a message "please load leaflet" is shown when |
* to make it accessible within other packages (see https://github.com/mtennekes/tmap/issues/231) * add minimap fix to NEWS * update news item
Just before going to submit tmap(tools) 2.0 to CRAN, I found this bug:
throws this error, while
works.
The call traceback of the error is:
The list object
providers
is not exported byleaflet
(i.e. it is not in its NAMESPACE), but made accessible with this dirty (but working) hack:See https://github.com/rstudio/leaflet/blob/master/R/plugin-minimap.R#L1. Therefore, the
providers
object can be accessed withleaflet::providers
.Does anyone has a clue how to use
addMinimap
inside a package? It is called here: https://github.com/mtennekes/tmap/blob/master/R/view_tmap.R#L653 @tim-salabim : do you use minimaps or theproviders
object inmapview
?The text was updated successfully, but these errors were encountered: