开发者

MKMapView returns bad userLocation

I checked the box in iterface builder t开发者_如何学JAVAo 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];


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜