1

I'm trying to place a marker Google Maps API V.3 by only specifiying its heading in degrees and it's distance away (in relation to another already-placed marker).

Haven't been able to find anything similar on SO, thanks in advance.

MRDJR97
  • 818
  • 2
  • 10
  • 27

1 Answers1

2

The easiest will be to write a function which takes the current marker and the heading-distance, and returns a new lat-long marker which you can pass to google maps.

You can have a look at the following question on SO (already answered) to get an idea of how the calculation should be performed: get-lat-long-given-current-point-distance-and-bearing

CJNaude
  • 112
  • 1
  • 1
  • 9