You cannot rely on the value of UIWebView.CenterCoordinate
after setting UIWebView.SetCenterCoordinate
and I don't know of any event that is raised when it is finally set. To be more specific:
var map = new MKMapView();
var ctr = new CLLocationCoordinate2D(37.8, -122.4);
map.SetCenterCoordinate(ctr, false);
map.SetRegion(new MKCoordinateRegion(ctr, new MKCoordinateSpan(0.025, 0.025)), false);
Console.WriteLine("Center coordinate is still NaN: " + map.CenterCoordinate.Latitude.ToString());
/*
Error: NaN Lat & Long var
circle = MKCircle.Circle(map.CenterCoordinate, 100);
Must use explicit location instead, a la:
*/
var circle = MKCircle.Circle(ctr, 100);
map.AddOverlay(circle);
Lemme' get some SEO terms in here like MapKit
, MKOverlay
, and NaN