<span style="font-family: Arial, Helvetica, sans-serif;">this.mapView.MapType = MonoTouch.MapKit.MKMapType.Standard;</span>
this.mapView.ShowsUserLocation = true; locationManager = new CLLocationManager (); int deviceVersion=Convert.ToInt32(UIDevice.CurrentDevice.SystemVersion.Split('.')[0]); if (deviceVersion < 8) { } else { locationManager.RequestWhenInUseAuthorization (); } locationManager.StartUpdatingLocation (); locationManager.LocationsUpdated += LocationManagerUpdate;
<pre name="code" class="csharp"> void LocationManagerUpdate (object sender, CLLocationsUpdatedEventArgs e) { locationManager.StopUpdatingLocation (); MKCoordinateSpan theSpan = new MKCoordinateSpan (0.2,0.2); MKCoordinateRegion theRegion = new MKCoordinateRegion (locationManager.Location.Coordinate,theSpan); this.mapView.SetRegion (theRegion,true); }