leafletjs on scale change code example
Example: leaflet add scale
addScaleBar(map, position = c("topright", "bottomright", "bottomleft",
"topleft"), options = scaleBarOptions())
scaleBarOptions(maxWidth = 100, metric = TRUE, imperial = TRUE,
updateWhenIdle = TRUE)
removeScaleBar(map)