I am creating a map in which the user can draw lines using the Leaflet.Draw toolbar. I would like the line mileage to be displayed in feet / miles instead of standard yards / miles. Looking at a project on GitHub, it seems to me that the following code should do the following:
var drawControl = new L.Control.Draw({
draw: {
polyline: {
shapeOptions: {
color: 'red',
},
metric: false,
feet: true,
}
}
});
But the length is still displayed in the yards. Any insight into why this would be helpful.
Matty source
share