0
votes

I checked the box in iterface builder to show user location on map and it works fine. I want to zoom the mapView to User location with using the regions and user location, but users latitude and longitude are 0.000, and app is zooming to region with center 0 and 0. Why is this?

CLLocation *location = [[[CLLocation alloc] initWithLatitude:mapView.userLocation.location.coordinate.latitude longitude:mapView.userLocation.location.coordinate.longitude] autorelease];
1

1 Answers

1
votes

Use CoreLocation to get user location, and not the map.