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