Guest User

Untitled

a guest
Aug 15th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  3. x:Class="LoginApp.Droid.Views.LocationPage"
  4. NavigationPage.HasNavigationBar="False"
  5. BackgroundColor="#E5FFC4"
  6. Loaded="LocationPage_Loaded">
  7.  
  8. private async void LocationPage_Loaded(object sender, EventArgs e)
  9. {
  10. var locator = CrossGeolocator.Current;
  11. locator.DesiredAccuracy = 50;
  12.  
  13. var position = await locator.GetPositionAsync(TimeSpan.FromMinutes(3), includeHeading: true);
  14.  
  15. Entry_Longitude.Text = position.Longitude.ToString();
  16.  
  17. Entry_Latitude.Text = position.Latitude.ToString();
  18.  
  19. }
Add Comment
Please, Sign In to add comment