How to calculate a latlng on google map ceartain distance away from another?
- by Rene Saarsoo
To draw a circle on map I have a center GLatLng (A) and a radius (r) in meters.
Here's a diagram:
-----------
--/ \--
-/ \-
/ \
/ \
/ r \
| *-------------*
\ A / B
\ /
\ /
-\ /-
--\ /--
-----------
How to calculate the GLatLng at position B? Assuming that r is parallel to the equator.
Getting the radius when A and B is given is trivial using the GLatLng.distanceFrom() method - but doing it the other way around not so. Seems that I need to do some heavier math.