I would like to get the user\'s current latitude and longitude for ios in xamarin.
I\'ve looked at other posts and as i understand it.
it\'s like:
CLLocationManger is async - it will fire events when the location is updated.
CLLocationManager lm = new CLLocationManager(); //changed the class name
... (Acurray)
... (Other Specs)
lm.LocationsUpdated += delegate(object sender, CLLocationsUpdatedEventArgs e) {
foreach(CLLocation l in e.Locations) {
Console.WriteLine(l.Coordinate.Latitude.ToString() + ", " +l.Coordinate.Longitude.ToString());
}
};
lm.StartUpdatingLocation();