Hi I’m just wondering how do I get google api to calculate between 3 locations e.g. from point a to b to c.
I can currently get it to calculate between 2 points
var miledistance = glatlng1.distanceFrom(glatlng2, 3959).toFixed(1);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well sounds to me you are trying to calculate the total distance between a to c by passing through b, correct? If so, you can can get the distance from a to b then from b to c and add them. Like so:
Ryan