You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
554 B
26 lines
554 B
using Justice.Helpers;
|
|
using Microsoft;
|
|
namespace Justice.Views;
|
|
|
|
public partial class DashboardPage : ContentPage
|
|
{
|
|
public DashboardPage()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public async void OnGetLocationClicked(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
var (latitude, longitude) = await GeolocationHelper.GetCurrentLocationAsync();
|
|
string address = await GeolocationHelper.GetReadableAddressAsync(latitude, longitude);
|
|
LocationLabel.Text = $"{address}";
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
await DisplayAlert("Error", ex.Message,"OK");
|
|
}
|
|
}
|
|
|
|
} |