From 1f2dd6464c64f9d5d9c3fa9966dafa022d7db084 Mon Sep 17 00:00:00 2001 From: Callum Morris Date: Thu, 23 Mar 2023 11:59:08 +1300 Subject: [PATCH] Change default unitFactor so that the distance is in kilometres, to match the unit in the label --- leaflet.measure/leaflet.measure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leaflet.measure/leaflet.measure.js b/leaflet.measure/leaflet.measure.js index 3e415f1..811d338 100644 --- a/leaflet.measure/leaflet.measure.js +++ b/leaflet.measure/leaflet.measure.js @@ -222,7 +222,7 @@ L.Control.Measure = L.Control.extend({ }, _round: function(val) { - const scale = this.options.measureOptions.unitFactor || 1; + const scale = this.options.measureOptions.unitFactor || 1000; return Math.round((val / scale) * 10) / 10; },