improve english distance display : feet and miles
parent
3b27b2160d
commit
62f20971e4
|
@ -376,7 +376,6 @@
|
|||
metric = (unit === 'metric') ? true : false;
|
||||
feet = (unit === 'feet') ? true : false;
|
||||
nautic = (unit === 'nautic') ? true : false;
|
||||
console.log(metric + ' ' + feet + ' ' + nautic);
|
||||
|
||||
var options = {
|
||||
position: 'bottomleft',
|
||||
|
|
|
@ -2944,7 +2944,13 @@ L.GeometryUtil = L.extend(L.GeometryUtil || {}, {
|
|||
break;
|
||||
case 'feet':
|
||||
distance *= 1.09361 * 3;
|
||||
if (distance > 1000) {
|
||||
distance *= 0.00018939;
|
||||
distanceStr = distance.toFixed(2) + ' mi';
|
||||
}
|
||||
else {
|
||||
distanceStr = Math.ceil(distance) + ' ft';
|
||||
}
|
||||
|
||||
break;
|
||||
case 'nauticalMile':
|
||||
|
|
Loading…
Reference in New Issue