-1

In mapview, how can I change it from A to B as in the picture?

And here is the code:

#define BE_Latitude 25.9444055
#define BE_longtitude -80.1229769

#define BEMSpan 0.100f;

Picture


EDITED

Code

#import "BEViewController.h"
#import "BENSObject.h"

@interface BEViewController ()

@end


#define BE_Latitude 25.9444055
#define BE_longtitude -80.1229769

#define BEMSpan 0.100f;

@implementation BEViewController
@synthesize BEMapView;

- (void)viewDidLoad {
    [super viewDidLoad];

    MKCoordinateRegion BERegion;

    //Center
    CLLocationCoordinate2D center;
    center.latitude = BE_Latitude;
    center.longitude = BE_longtitude;

    //Span
    MKCoordinateSpan span;
    span.latitudeDelta = BE_Latitude;
    span.longitudeDelta = BE_longtitude;

    BERegion.center = center;
    BERegion.span = span;

    //Set our map
    [BEMapView setRegion:BERegion animated:YES];


    CLLocationCoordinate2D BELocation;
    BELocation.latitude = BE_Latitude;
    BELocation.longitude = BE_longtitude;

    BENSObject * BEAnnitation = [[BENSObject alloc] init];
    BEAnnitation.coordinate = BELocation;
    BEAnnitation.title = @“C”;
    BEAnnitation.subtitle = @“D”;


    {[self.BEMapView addAnnotation:BEAnnitation];

    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
a77a77
  • 3
  • 2

1 Answers1

0

To change the zoom level you want to adjust your MKCoordinateSpan. Apple Docs on MapKit Data Types will help here.

You are currently using your location coordinates for the latitudeDelta and longitudeDelta.

darrenallen7
  • 821
  • 4
  • 9