0
votes

Say I have two points: Point1 and Point2

I am currently using Google Maps, but this can be applicable to any language. So my points are defined as: google.maps.LatLng(..)

The two points form a line. Now if I travel X meters along the line from Point1, how can I get the latitude/longitude of this new point.

(The distance between Point1 and Point2 would only ever be a some km)

Any help would be greatly appreciated.

1

1 Answers

2
votes

You need to compute the bearing between the two points. Then, with the distance, you can calculate the destination point (lat/lon) based on distance and bearing. See here for formulas: http://www.movable-type.co.uk/scripts/latlong.html