Hi guys, suppose we set the Navigator component to give us the directions to a destination address from our actual position and suppose we want to stop (or pause navigation): is there a way to do it properly? Actually I put mine actual position coordinates into destination coordinates but it is just a workaround because I did not find anything better.
HOW TO: Use the Navigate control shows one way to get directions from a single location to another location using the Navigate control The developer must provide the start location and the end location and then call RequestDirections and wait for the ORS to determine a path.
When you request directions, you use ORS to generate a list of directions and a path showing the route on the Map component. Unless you provide additional coding, this happens one time.
If you continually change the start location (perhaps using a LocationSensor.LocationChanged Block), but maintain the same end location, a developer can provide continuously changing directions based on new coordinates when her or his code sets the 'start location' to the current location and calls the RequestDirections.
Are you doing something like this and need to stop it? You did not share your code so no one knows how to recommend a solution for your issue.
If you are constantly calling RequestDirections, you could prevent or pause the navigation requests if you:
- provide a Switch plus appropriate code to temporarily bypass the RequestDirections call
- or use a Button to toggle use of the RequestDirections
- or do something appropriate for the code you wrote.
- Navigation does not have a way to stop navigation once requested.
No, my question is simpler. I am doing a simple navigator, it is part of a multi screen app, the navigation is not the main use of this app. There there are 3 fixed possible destinations, the user can select only one of these three destinations clicking on their respective marker (3 markers, the selected destination marker is blue, the other 2 red) and then you can click the start navigation button if you want to use the navigator. One of the three is always blue (the default destination) when you open the screen of the navigator.I would like to stop the navigation if already started and came back to the default destination selected. This second part is already working, I hide also the line connecting the actual position to the destination, but I do not believe that changing the destination coordinates to the user position is the correct way to stop the navigator also.
Your original question was answered.
Perhaps someone else can advise you on your new question. You might wish to share your Blocks with them.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.