Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to calculate distance using longitude and latitude between two points on a custom googlemap?

Hi Jackson,

In JavaScript, there is the toFixed() method converts a number into a string, keeping a specified number of decimals.

codevar value = 85.08850817788226;
var v = value.toFixed(2);
The result of v is: 85.09/code

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

how to calculate distance using longitude and latitude between two points on a custom googlemap?

Please note this is for output only cause further calculations can be broken.

JACKSON LIANG
Posts: 0
Joined: Fri Aug 02, 2013 5:12 am

how to calculate distance using longitude and latitude between two points on a custom googlemap?

oh cause my current position changes every time so my value would also change. Is there a way to convert it using that code on the link above.

https://getsatisfaction.com/apperyio/...

Return to “Issues”