title: MapView Set Location
body: <p>Can anyone help me with a problem I have with a mapView application that is only displaying the default location and not the specific location I have specified. My code is as follows. I'm learning Xcode so have probably made a schoolboy error :-</p>
  
  <p>.H </p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;MapKit/MapKit.h&gt;
  
  
  @interface RavenMapViewController : UIViewController &lt;MKMapViewDelegate&gt; {
  MKMapView *mapView;
  }
  
  @property (nonatomic, retain) IBOutlet MKMapView *mapView;
  
  -(void) goLocation;
  @end
  </code></pre>
  
  <p>.M</p>
  
  <pre><code>#import "RavenMapViewController.h"
  
  
  @implementation RavenMapViewController
  
  @synthesize mapView;
  
  
  -(void) goLocation 
  
  {
  
      MKCoordinateRegion newRegion;
      newRegion.center.latitude = 39.278112;
      newRegion.center.longitude = -76.622772;
      newRegion.span.latitudeDelta = 0.008388;
      newRegion.span.longitudeDelta = 0.016243;
  
      [self.mapView setRegion:newRegion animated:YES];
  
  }
  
  - (void)viewDidLoad 
  {
      [self goLocation];
  }
  
  - (void)viewDidUnload 
  
  {
  
  
  }
  
  @end
  </code></pre>