高德地图设置当前地图的经纬度范围

- (void)mapView:(MAMapView *)mapView didUpdateUserLocation:(MAUserLocation *)userLocation updatingLocation:(BOOL) updatingLocation
{
    if (updatingLocation)
    {
        CLLocationCoordinate2D location = CLLocationCoordinate2DMake(userLocation.coordinate.latitude, userLocation.coordinate.longitude);
        MACoordinateRegion region = MACoordinateRegionMakeWithDistance(location,5000 ,5000);
        MACoordinateRegion adjustedRegion = [_mapView regionThatFits:region];
        [_mapView setRegion:adjustedRegion animated:NO];
    }
}

你可能感兴趣的:(iOS)