- Android
-
2014-08-11 - 更新:2014-08-19
LocationクラスのdistanceBetweenメソッドを使って、2点間の距離を取得することができます。
書式
1 | Location.distanceBetween( |
2 | double startLatitude, |
3 | double startLongitude, |
4 | double endLatitude, |
5 | double endLongitude, |
6 | float [] results); |
startLatitude | 開始地点の緯度 |
---|---|
startLongitude | 開始地点の経度 |
endLatitude | 終了地点の緯度 |
endLongitude | 終了地点の経度 |
results | 結果を格納する変数 |
