我有一个纬度和经度坐标,我想把我的地图集中在上面。它们存储为 NSStrings 并转换为以下位置:
NSString *placeLatitude = [elementCoords objectForKey:@"placeLatitude"];
NSString *placeLongitude = [elementCoords objectForKey:@"placeLongitude"];
CLLocationCoordinate2D location;
location.latitude = [placeLatitude doubleValue];
location.longitude = [placeLongitude doubleValue];
我将如何修改以下内容以不关注用户的当前位置,而是关注上面指定的纬度和经度?
MKCoordinateRegion mapRegion;
mapRegion.center = mapView.userLocation.coordinate;
mapRegion.span.latitudeDelta = 0.05;
mapRegion.span.longitudeDelta = 0.05;