Skip to content

Commit 1314947

Browse files
Location unauthorized message (#1575)
1 parent 713ae6c commit 1314947

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/MAUI/Maui.Samples/Samples/Location/DisplayDeviceLocation/DisplayDeviceLocation.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ private async void StartStopButton_Clicked(object sender, EventArgs e)
104104
{
105105
await MyMapView.LocationDisplay.DataSource.StartAsync();
106106
}
107+
else
108+
{
109+
await Application.Current.Windows[0].Page.DisplayAlert("Location not authorized", "Please allow access to the device location.", "OK");
110+
}
107111
}
108112
}
109113
catch (Exception ex)

0 commit comments

Comments
 (0)