Hello,
I am using the Mapkit in iOS6. I added the viewwillappear method and passed my current co-ordinates.
Inside the above "didUpdateLocations" method i am logging the co-ordinates and it is showing the co-ordinates pertaining to sanfransisco , CA. That is NOT my current location. Why is it showing that location. I set the location coordinates and still it shows different place.WHat am i doing wrong? I am new to iOS and objective c.What it shows on the simulator is the world map and a blue dot at sanfransisco,CA. Can someone explain me how it should be done to get my current location?
Also i have 3 screens on my app. Second screen has the mapkit at the bottom left about the size of rubik's cube (3X3). So when i click a button on second screen and move to third screen( do my work on 3rd screen and click back) and come back to second screen it shows the location correctly(2nd screen->3rd screen ->2nd Screen).But there is no blue dot on it.Why?IF more information is needed please let me know. Thanks...
I am using the Mapkit in iOS6. I added the viewwillappear method and passed my current co-ordinates.
Code:
#define METERS_PER_MILE 160.344
- (void)viewWillAppear:(BOOL)animated
{
CLLocationCoordinate2D zoomLocation;
zoomLocation.latitude = XX.657016;
zoomLocation.longitude = -XXX.369874;
MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(zoomLocation, 0.5 *METERS_PER_MILE, 0.5*METERS_PER_MILE);
[_mapView setRegion:viewRegion animated:YES];
_mapView.showsUserLocation = YES;
}
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
}
Also i have 3 screens on my app. Second screen has the mapkit at the bottom left about the size of rubik's cube (3X3). So when i click a button on second screen and move to third screen( do my work on 3rd screen and click back) and come back to second screen it shows the location correctly(2nd screen->3rd screen ->2nd Screen).But there is no blue dot on it.Why?IF more information is needed please let me know. Thanks...
Last edited by a moderator: