[英]How to zoom to current user location?
我想在中心顯示當前用戶位置,並且還想在當前位置的所有側面顯示15km
距離。 如何實現呢?
這是操作方法:
- (void)zoomToUserLocationAnimated:(BOOL)animated
{
CLLocationCoordinate2D locationCoordinate2D = _locationManager.location;
CLLocationDistance distance = 30000;
[self setRegion:MKCoordinateRegionMakeWithDistance(locationCoordinate2D, distance, distance)
animated:animated];
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.