Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

find distance between two geo point with direction android

Tags:

android

gps

i am able to find distance between two geolocation by two Location objects

here is below

       mLoc.distanceTo(mLocTarget)

mLoc is current user Location and mLocTarget is target location of android

now i want to find direction also means like

16m. West or 16m. North is it possible?

like image 231
Siddhpura Amit Avatar asked Dec 08 '12 06:12

Siddhpura Amit


1 Answers

getBearing() returns the instantaneous bearing, but for between to points use:

public float bearingTo (Location dest)

like image 110
PeterJ Avatar answered Jan 26 '23 04:01

PeterJ