I am new to windows phone app development and I am coming from an android background. So I have this app where I display the list of some places and on clicking on any place the user is to be shown the route from his/her current location to the location of the place. I am able to achieve this. However on going back and clicking another place, it shows both the the previous route to previous location and the current path too.

The code for the Map Page is 

```
 namespace MapApper
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        private double latitude, longitude;
        public MainPage()
        {
            this.InitializeComponent();

            this.NavigationCacheMode = NavigationCacheMode.Required;
        }
        private async void GetRouteAndDirections()
        {
            Geolocator geolocator = new Geolocator();
            Geoposition geoposition = null;

            geoposition = await geolocator.GetGeopositionAsync();

            // Start at Microsoft in Redmond, Washington.
            BasicGeoposition startLocation = new BasicGeoposition();
            startLocation.Latitude = geoposition.Coordinate.Latitude;
            startLocation.Longitude = geoposition.Coordinate.Longitude;
            Geopoint startPoint = new Geopoint(startLocation);

            // End at the city of Seattle, Washington.
            BasicGeoposition endLocation = new BasicGeoposition();
            endLocation.Latitude = latitude;
            endLocation.Longitude = longitude;
            Geopoint endPoint = new Geopoint(endLocation);

            // Get the route between the points.
            MapRouteFinderResult routeResult =
                await MapRouteFinder.GetDrivingRouteAsync(
                startPoint,
                endPoint,
                MapRouteOptimization.Time,
                MapRouteRestrictions.None);

            textblock.Text = routeResult.Status.ToString()+latitude+longitude;
            if (routeResult.Status == MapRouteFinderStatus.Success)
            {
                // Use the route to initialize a MapRouteView.
                MapRouteView viewOfRoute = new MapRouteView(routeResult.Route);
                viewOfRoute.RouteColor = Colors.Yellow;
                viewOfRoute.OutlineColor = Colors.Black;

                // Add the new MapRouteView to the Routes collection
                // of the MapControl.
                mapper.Routes.Add(viewOfRoute);

                // Fit the MapControl to the route.
                await mapper.TrySetViewBoundsAsync(
                    routeResult.Route.BoundingBox,
                    null,
                    Windows.UI.Xaml.Controls.Maps.MapAnimationKind.None);
            }
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            // TODO: Prepare page for display here.
            textblock.Text = "EnteringOn";
            show s = (show)e.Parameter;
            latitude = s.latitude;
            longitude = s.longitude;
            GetRouteAndDirections();
            Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
            // TODO: If your application contains multiple pages, ensure that you are
            // handling the hardware Back button by registering for the
            // Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
            // If you are using the NavigationHelper provided by some templates,
            // this event is handled for you.
        }
       private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
        {
            e.Handled = true;
            if (Frame.CanGoBack)
                Frame.GoBack();
        }

    }
}

```

This is how I am getting the path for previous request and the current request together.

![enter image description here](https://i.stack.imgur.com/qRJRd.png)

I am looking for something like `Activity.finish()` in android, I know both the technology are very different.