Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.96k stars 992 forks source link

geometryUtil readableDistance expects first param to be number, wheraes here the string was passed #1069

Open obecny opened 4 months ago

obecny commented 4 months ago

geometryUtil readableDistance expects first param to be a number, wheraes here the string was passed.

Leaflet GeometryUtil 2024-04-25 11-57-03

https://github.com/makinacorpus/Leaflet.GeometryUtil/blob/master/src/leaflet.geometryutil.js#L67

This was causing an error

leaflet.geometryutil.js:70 Uncaught TypeError: distance.toFixed is not a function
2024-04-25 11-54-38

After this fix the error is gone