Do you know that you can launch the built-in navigation directly from your application to allow a user to be navigated to the target? You will learn how to do it in this recipe.
As an example, you will create a page with two text boxes (for the latitude and longitude of the destination) and a button. After clicking on the button, the values from the textboxes will be read and used for launching navigation to the target point.
To prepare an example that launches the GPS-based navigation to the given coordinates, perform the following steps:
Add two text boxes (where a user can type the latitude and longitude of the destination) and a button (starting navigation) to the page by modifying the content of the
MainPage.xaml
file, as follows:<Page (...)> <StackPanel (...)> <TextBox x:Name...