Say I have a set or coordinates as markers in an array,
Array 1 = lat1, lat2, lat3, etc
Array 2 = lon1, lon2, lon3, etc
I want to show the distance and bearing of each point one at a time so say for example upon reaching say lat 2 and lon 2 I would like the array to show the distance and bearing to lat 3, lon3, disregarding the others you’ve already reached.
I have a rough idea of something like this
var n = 0;
if (n != array1.size -1) {
var nextObj = array1[n], array2[n];
if (nextObj = currLoc); (Give or take a few metres but not sure how to do that)
n = array1[n+1], array2[n+1];
until you reach the end of the array}
would this code work?