Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove attribution in leaflet map in R

I am working on a shiny application in R which involves maps generated with the leaflet package. I would like to remove the attribution from the map, or at least reduce the visible text.

I tried to modify the attribution value as explained in this topic, setting it to NA,FALSE or '', but none of the options worked for me.

I know there is the option to remove the attribution when working with leaflet in Java, (see here). Do you know if it possible to import this functionality in the R code or if there exists another solution to tackle this?

like image 594
francimilano Avatar asked Dec 23 '22 22:12

francimilano


1 Answers

I found an answer myself.

It is enough to set the attributionControl option to FALSE in the leafletOptions.

map<- leaflet(
options = leafletOptions(
            attributionControl=FALSE))
like image 160
francimilano Avatar answered Dec 25 '22 12:12

francimilano