Now that we have created our ILocationService interface, as well as implemented the instance methods and EventHandlers within our LocationService class, we can now proceed and start updating the WalksEntryPageViewModel class so that it can use our LocationService to populate our Latitude and Longitude properties with the determined device's GPS coordinates.
Let's take a look at how we can achieve this by following these steps:
- Ensure that the WalkEntryPageViewModel.cs file is displayed within the code editor and enter the following highlighted code sections within the code snippet:
//
// WalkEntryPageViewModel.cs
// The ViewModel for our WalkEntryPage ContentPage
//
// Created by Steven F. Daniel on 5/06/2018.
// Copyright © 2018 GENIESOFT STUDIOS. All rights reserved.
//
...