Hello People,
My expectation is to fetch the current location of the user and calculate the distance between the current location and the destination location every 2 minutes.
I've already referred this Forum Link but doesn't help, Kindly help me with this issue.
Thanks in Advance,Nandhakumar S.
Hi,
You could do this using the Location plugin from OutSytems, This has a Watch function, and by checking if the last location and the new location are more than 2 minutes apart you could update the distance. See my OML for my version on how I did it
Hello,
Here's an example with one possible way of implementing this. It uses the Location Plugin from the Forge to calculate the distance between the device's position and the destination latitude/longitude every 10 seconds. I've used Amsterdam's Rijksmuseum's coordinates as the default destination.
You can, of course, change the destination coordinates and the time interval to suit your needs.
Hi
You can fetch the current location using location plugin. Now to fetch the distance you can use Google api. But it's paid on usage basis. But if you want to calculate direct distance ( displacement) between 2 points can use mathematical formula. But if you want to calculate the route distance then need to call an API for this.
Regards
Thankyou @Damian Fonville.