I am creating a map that the user will be able to draw lines on using the Leaflet.Draw toolbar. I would like the running distance of the line to be displayed in feet/miles instead of the default yards/miles. Looking at the project in GitHub, it seems to me the following code should do this:
var drawControl = new L.Control.Draw({
draw: {
polyline: {
shapeOptions: {
color: 'red',
},
metric: false,
feet: true,
}
}
});
But the length is still displayed in yards. Any insight into why this is would be helpful.
Which version of Leaflet.draw plugin are you using?
Note that:
feet
option yet.feet
option.leaflet-master
branch, for compatibility with Leaflet 1.0, is based on version 0.2.4 and does not have thefeet
option.