How to create Marker without coordinate but with distance and bearing from an existing marker ?

Topics: Help, Windows Forms
Nov 5, 2012 at 7:41 AM
Edited Nov 5, 2012 at 9:00 AM

Hi there,

As it discribes in the subject, I would like to know if there is an existing function to create a marker without coordinates but only with distance and bearing from an existing marker?

If not, can someone explains me how to manage to do it please ?

Thanks in advance for the help.

Kemanke

Nov 5, 2012 at 9:19 AM

I found a formula with my friend Google ;):

(Note: lat and lon should be in radians)

var lat2 = Math.asin( Math.sin(lat1)*Math.cos(d/R) + 
              Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng) );
var lon2 = lon1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1), 
                     Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));