diff --git a/lib/utils/geo.d.ts b/lib/utils/geo.d.ts index 8a5e7a6..9567e31 100644 --- a/lib/utils/geo.d.ts +++ b/lib/utils/geo.d.ts @@ -1,5 +1,5 @@ /** - * 计算地球上两点之间的球面距离 + * 计算地球上两点之间的球面距离(单位:cm) */ export declare function getDistanceBetweenPoints(lat1: number, lon1: number, lat2: number, lon2: number): number; /** diff --git a/lib/utils/geo.js b/lib/utils/geo.js index e4cbcc5..022e93d 100644 --- a/lib/utils/geo.js +++ b/lib/utils/geo.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.gcj02towgs84 = exports.wgs84togcj02 = exports.gcj02tobd09 = exports.bd09togcj02 = exports.getDistanceBetweenPoints = void 0; /** - * 计算地球上两点之间的球面距离 + * 计算地球上两点之间的球面距离(单位:cm) */ function getDistanceBetweenPoints(lat1, lon1, lat2, lon2) { // 转为弧度 diff --git a/src/utils/geo.ts b/src/utils/geo.ts index 17ead86..b1552cc 100644 --- a/src/utils/geo.ts +++ b/src/utils/geo.ts @@ -1,5 +1,5 @@ /** - * 计算地球上两点之间的球面距离 + * 计算地球上两点之间的球面距离(单位:cm) */ export function getDistanceBetweenPoints(lat1: number, lon1: number, lat2: number, lon2: number) { // 转为弧度