A sample xamarin forms app that can ask user to enable location services, obtain location permission and obtain coordinates such as latitude, longitude and altitude. The sample code works on Android and iOS.
More Details: https://dilpreet.dev/blog/xamarin-forms-location/