Is it possible to add a scale bar to a map?
I was hoping for something 'built in' like:
map.addControl(new mapboxgl.Scale({position: 'bottom-right'}));
Seems it was possible via a leaflet control in the classic js
L.control.scale().addTo(map);
map.addControl(new mapboxgl.ScaleControl({maxWidth:100}));
position
property to change the position of the scale. It is located bottom-left custom , but I need it to have bottom-right so I had to change the css properties.