#import <MAMapView.h>
◆ setUserTrackingMode:animated:
设置定位用户位置的模式
- Parameters
-
mode | 要设置的模式 |
animated | 是否动画设置 |
◆ updateUserLocationRepresentation:
设定UserLocationView样式。如果用户自定义了userlocation的annotationView,或者该annotationView还未添加到地图上,此方法将不起作用
- Parameters
-
◆ allowsBackgroundLocationUpdates
- (BOOL) allowsBackgroundLocationUpdates |
|
readwritenonatomicassign |
是否允许后台定位。默认为NO。只在iOS 9.0之后起作用。
设置为YES的时候必须保证 Background Modes 中的 Location updates处于选中状态,否则会抛出异常。
注意:定位必须在停止的状态下设置(showsUserLocation = NO),否则无效
◆ customizeUserLocationAccuracyCircleRepresentation
- (BOOL) customizeUserLocationAccuracyCircleRepresentation |
|
readwritenonatomicassign |
是否自定义用户位置精度圈(userLocationAccuracyCircle)对应的 view, 默认为 NO.
如果为YES: 会调用 - (MAOverlayRenderer *)mapView (MAMapView *)mapView rendererForOverlay:(id <MAOverlay>)overlay 若返回nil, 则不加载.
如果为NO : 会使用默认的样式.
◆ desiredAccuracy
- (CLLocationAccuracy) desiredAccuracy |
|
readwritenonatomicassign |
设定定位精度。默认为kCLLocationAccuracyBest
◆ distanceFilter
- (CLLocationDistance) distanceFilter |
|
readwritenonatomicassign |
设定定位的最小更新距离。默认为kCLDistanceFilterNone,会提示任何移动
◆ headingFilter
- (CLLocationDegrees) headingFilter |
|
readwritenonatomicassign |
设定最小更新角度。默认为1度,设定为kCLHeadingFilterNone会提示任何角度改变
◆ pausesLocationUpdatesAutomatically
- (BOOL) pausesLocationUpdatesAutomatically |
|
readwritenonatomicassign |
◆ showsUserLocation
- (BOOL) showsUserLocation |
|
readwritenonatomicassign |
◆ userLocation
◆ userLocationAccuracyCircle
- (MACircle*) userLocationAccuracyCircle |
|
readnonatomicassign |
◆ userLocationVisible
- (BOOL) userLocationVisible |
|
readnonatomicassign |
◆ userTrackingMode
定位用户位置的模式, 注意:在follow模式下,设置地图中心点、设置可见区域、滑动手势、选择annotation操作会取消follow模式,并触发 - (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated;
The documentation for this category was generated from the following file: