在 Xcode 的最后一个版本中,设置区域工作正常,现在在 3.2.3 中它不会捕捉到您指定的区域?
View 加载后...
[mapView setMapType:MKMapTypeHybrid];
[mapView setZoomEnabled:YES];
[mapView setScrollEnabled:YES];
MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } };
region.center.latitude = 41.902245099708516;
region.center.longitude = 12.457906007766724;
region.span.longitudeDelta = 0.04f;
region.span.latitudeDelta = 0.04f;
[mapView setRegion:region animated:YES];
[mapView setDelegate:self];
这是运行良好的代码,现在它不会捕捉到上面指出的位置,它只是显示世界地图。
非常感谢任何帮助。