public class DistanceUtils extends Object
| Constructor and Description |
|---|
DistanceUtils() |
| Modifier and Type | Method and Description |
|---|---|
int |
getDistance(double startLatitude,
double startLongitude,
double endLatitude,
double endLongitude)
计算距离 (单位米)
|
String |
getDistanceWithSuffix(double startLatitude,
double startLongitude,
double endLatitude,
double endLongitude)
计算两点之间的距离 (带后缀)
|
String |
getDistanceWithSuffix(int meter)
在距离(单位米)后面加上单位
|
public final String getDistanceWithSuffix(int meter)
meter - 距离public final String getDistanceWithSuffix(double startLatitude, double startLongitude, double endLatitude, double endLongitude)
startLatitude - 起始经度startLongitude - 起始纬度endLatitude - 结束经度endLongitude - 结束纬度public final int getDistance(double startLatitude,
double startLongitude,
double endLatitude,
double endLongitude)
startLatitude - 起始经度startLongitude - 起始纬度endLatitude - 结束经度endLongitude - 结束纬度Copyright © 2021 Clouds Studio. All rights reserved.