Display polyline length in feet using the Leaflet.Draw toolbar

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.

+3
source share
1 answer

What version of Leaflet.draw are you using?

Note that:

+2

All Articles