I'm working in a project where is needed to draw polygonal shape. To achive my goal I'm using Leaflet Draw, I already disabled all draw tools except polygon tool, now I need just to customize the tool's icon of the button, I searched a lot but I didn't understand how customize it.
Unless somebody comes with something clever, you have to provide an icon (26px) and change the button style.
<style>
.leaflet-draw-toolbar a.leaflet-draw-draw-polyline {
background-image: url('icon26.png');
background-size: 26px;
background-position: 0;
}
</style>
Here is an example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With