I'm wondering if there is a way to replace the symbol of addLayersControl
in leaflet
to something else more customized or even a title.
Asked
Active
Viewed 458 times
5

Marie-Eve
- 565
- 4
- 15
-
To add a title you can have a look at [this question](https://stackoverflow.com/questions/49072510/r-add-title-to-leaflet-map/49083681#49083681) – MLavoie May 11 '18 at 10:57
1 Answers
1
I'm not sure you can do it with r language but with CSS you can overide leaflet style like this :
https://jsfiddle.net/84a0uhL1/
.leaflet-control-layers-toggle {
background-image: url(https://image.flaticon.com/icons/png/512/126/126472.png) !important;
background-size: 26px;
}
You may not need !important tag if you edit the original css. You can also use :after
property and content:"Your text"
if you can't use Javascript
Hope it will help you.

Baptiste
- 1,688
- 1
- 15
- 25