Question

I am using the raywanderliech tutorial for reference. It worked perfectly in a test project.Now in my actual project i have a View controller with many buttons and at the bottom left side, i have a mapkit. It is about the size of 3*3 rubik's cube. What i am trying to say is its small, not full screen/half screen. So i am trying out the example from the test project in this.But it is not showing me the location. It shows the world map. Not my location.

-(void)viewWillAppear:(BOOL)animated
{
CLLocationCoordinate2D zoomLocation;
zoomLocation.latitude = 39.281516;
zoomLocation.longitude = -76.580806;

MKCoordinateRegion viewRegion  = MKCoordinateRegionMakeWithDistance(zoomLocation, 0.5 *METERS_PER_MILE, 0.5*METERS_PER_MILE);

[_mapView setRegion:viewRegion animated:YES];
}

I changed the latitude and longitude to my current coordinates.I used a website to get my current coordinates.I am attaching a link here.The last pic in this link is the output i am ending up with. Can someone please tell me what i am doing wrong. If more info is needed please let me know..Thanks..Here is the link https://www.dropbox.com/sh/q9t3k1b01pbu1uq/rzI_2k_GlN

No correct solution

OTHER TIPS

You are missing

_mapView.showsUserLocation = YES;

in the above code. You should read that tutorial once again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top