|
@@ -68,13 +68,13 @@ export const numberSplice = (val: number) => {
|
|
|
};
|
|
|
|
|
|
//经纬度转度°分′秒″
|
|
|
-export const toDegrees = (val: number, retain = 2) => {
|
|
|
+export const toDegrees = (val: number, retain = 4) => {
|
|
|
let temps = numberSplice(val);
|
|
|
const d = temps[0];
|
|
|
temps = numberSplice(temps[1] * 60);
|
|
|
const m = temps[0];
|
|
|
const s = round(temps[1] * 60, retain);
|
|
|
- return `${d}°${m}′${s.toFixed(2)}″`;
|
|
|
+ return `${d}°${m}′${s.toFixed(retain)}″`;
|
|
|
};
|
|
|
|
|
|
export const copyText = async (
|