Measure distance on map (between user and a location using a distance that follows roads)

The straight line distance between two locations is easy using a Math algorithm or the Map component.

To get the navigate distance (following roads for instance), you need to use either

  • the MIT Navigate component to tell you the distance

  • or the Google Directions api to extract the distance

Use a Clock to constantly poll the distance using RequestDirections or using the Directions API.

Once you get the distance compare it to 300 m, when the distance is less than 300m, send your notification. :wink:

This method requires constant requests to be made using WIFI or data and in my opinion is not real practical; but go ahead an experiment and let us know what happens.

What have you tried?

This link contains advice that might be helpful for completing your Project Calculer la distance entre son domicile et un point donnée dans une textbox - #2 by SteveJG

2 Likes