📅  最后修改于: 2022-03-11 15:01:27.108000             🧑  作者: Mango
//npm i geopoint
const GeoPoint = require('geopoint');
point1 = new GeoPoint(51.5103, 7.49347);
point2 = new GeoPoint(51.5200, 7.49347);
var distance = point1.distanceTo(point2, true)//output in kilometers
console.log(distance)
//$uj@y