rdictionaryleafletattribution

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?


Solution

  • I found an answer myself.

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

    map<- leaflet(
    options = leafletOptions(
                attributionControl=FALSE))