Note that there are some explanatory texts on larger screens.

plurals
  1. POiphone simulator MapView does not load, instead shows grey tiles
    text
    copied!<p>i am using xcode 4.3.3.</p> <p>I am trying a sample mapview app. In which i just have 1 view controller with 1 mapview. I want to show a particular location whose coordiates i have set in my code. When i run without setting a region my map shows default America region, but when i set my region with coordinates it shows only grey tiles and nothing. Below is my code.</p> <pre><code> #import "BranchViewController.h" #import &lt;MapKit/MapKit.h&gt; #import "Annotation.h" @interface BranchViewController () @end #define CBB_LATITUDE 26.2167; #define CBB_LONGITUDE 50.5833; #define THE_SPAN 0.01f; @implementation BranchViewController @synthesize myMapView; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { NSLog(@"BranchViewController - viewDidLoad()"); [super viewDidLoad]; // Do any additional setup after loading the view. // CBB REGION MKCoordinateRegion cbbRegion; // CBB LATITUDE N LONGITUDE CLLocationCoordinate2D center; center.latitude = CBB_LATITUDE; center.longitude = CBB_LONGITUDE; // CBB SPAN MKCoordinateSpan span; span.latitudeDelta = THE_SPAN; span.longitudeDelta = THE_SPAN; cbbRegion.center = center; cbbRegion.span = span; // SETTING MAPVIEW [self.myMapView setRegion:cbbRegion animated:NO]; [self.myMapView setMapType:MKMapTypeStandard]; //[self.myMapView setZoomEnabled:YES]; self.myMapView.showsUserLocation = YES; } - (void)viewDidUnload { [self setMyMapView:nil]; [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } @end </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload