📜  android 获取两个位置之间的距离 kotlin - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:46.952000             🧑  作者: Mango

代码示例1
Location startPoint=new Location("locationA");
startPoint.setLatitude(17.372102);
startPoint.setLongitude(78.484196);

Location endPoint=new Location("locationA");
endPoint.setLatitude(17.375775);
endPoint.setLongitude(78.469218);

double distance=startPoint.distanceTo(endPoint);