Navigation: Mapping directions with suitable coordinates

Greetings,
I have built a navigation app .
Would be glad if somebody can help me in ensuring the direction instructions are spoken at suitable points such as turns etc.
Thanks in advance.
Someshvar

What you do depends whether you use the Google Directions API or the MIT Map component to work with the OpenRouteService using the Navigate tool. If you use Navigate, the information you need to extract the turn informormation is in "directions"
navigationDirections

What you hope to do is not simple.

is not possible with App Inventor tools . They cannot provide information that will ENSURE this will happen. :cry: at an appropriate moment although they may provide a close approximation depending on how you code the activity.

  • the app needs to continuously monitor the device location and compare the location to the coordinates of the turn etc. coordinates supplied by the api or ORS. You might do this by continually determining the device's distance from the turn event or using the LocationSensor Distance Interval property.

  • The Accuracy of the satellite fix provided by the LocationSensor needs to be continually monitored (otherwise your user will be asked to do something inappropriate at an inappropriate time).

  • Achieving success will be influenced by the version of Android; the gps hardware of the device and its ability to resolve multiple gps constellations and whether the device is using data on a 3G,4G or 5G data network.

  • "suitable points" - you will need a way to determine what is suitable. Conditional statements might work to determine which instructions to vocalize.

  • How to extract the turn event coordinates is dependent on where the direction information is obtained and probably can be determined by parsing the json information.

Good luck; ensure your users will not inadvertently drive into a lake.

The simplest way to achieve your goal is to use an ActivityStarter to run Google's Navigate (and safer too).

1 Like