You can use Backtrack in the Compass app to track your route and then help you retrace your steps in case you get lost.
Note: Backtrack is for use in remote settings—away from familiar places like your home or workplace—and outside densely populated areas with Wi-Fi. Backtrack does not account for external conditions, such as changes in elevation or objects in the environment.
Go to the Compass app appears on the screen. The initial location appears as a white dot at the beginning of the path.
Follow the path back to return to where you first turned on Backtrack.
When you’re finished, tap to return to the list of actions.
Press the Action button to start Backtrack. then tap Record Path.
Press the Action and Side buttons at the same time to switch between recording your path and retracing your steps.