iOS高德地图SDK(3D) V10.0.600
Loading...
Searching...
No Matches
MAMapView(UserLocation) Category Reference

#import <MAMapView.h>

Instance Methods

(void) - setUserTrackingMode:animated:
 设置定位用户位置的模式
 
(void) - updateUserLocationRepresentation:
 设定UserLocationView样式。如果用户自定义了userlocation的annotationView,或者该annotationView还未添加到地图上,此方法将不起作用
 

Properties

BOOL showsUserLocation
 是否显示用户位置
 
MAUserLocationuserLocation
 当前的位置数据
 
BOOL customizeUserLocationAccuracyCircleRepresentation
 是否自定义用户位置精度圈(userLocationAccuracyCircle)对应的 view, 默认为 NO.
如果为YES: 会调用 - (MAOverlayRenderer *)mapView (MAMapView *)mapView rendererForOverlay:(id <MAOverlay>)overlay 若返回nil, 则不加载.
如果为NO : 会使用默认的样式.
 
MACircleuserLocationAccuracyCircle
 用户位置精度圈 对应的overlay
 
MAUserTrackingMode userTrackingMode
 定位用户位置的模式, 注意:在follow模式下,设置地图中心点、设置可见区域、滑动手势、选择annotation操作会取消follow模式,并触发 - (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated;
 
BOOL userLocationVisible
 当前位置再地图中是否可见
 
CLLocationDistance distanceFilter
 设定定位的最小更新距离。默认为kCLDistanceFilterNone,会提示任何移动
 
CLLocationAccuracy desiredAccuracy
 设定定位精度。默认为kCLLocationAccuracyBest
 
CLLocationDegrees headingFilter
 设定最小更新角度。默认为1度,设定为kCLHeadingFilterNone会提示任何角度改变
 
BOOL pausesLocationUpdatesAutomatically
 指定定位是否会被系统自动暂停
 
BOOL allowsBackgroundLocationUpdates
 是否允许后台定位。默认为NO。只在iOS 9.0之后起作用。
设置为YES的时候必须保证 Background Modes 中的 Location updates处于选中状态,否则会抛出异常。
注意:定位必须在停止的状态下设置(showsUserLocation = NO),否则无效
 

Method Documentation

◆ setUserTrackingMode:animated:

- (void) setUserTrackingMode: (MAUserTrackingMode mode
animated: (BOOL)  animated 

设置定位用户位置的模式

Parameters
mode要设置的模式
animated是否动画设置

◆ updateUserLocationRepresentation:

- (void) updateUserLocationRepresentation: (MAUserLocationRepresentation *)  representation

设定UserLocationView样式。如果用户自定义了userlocation的annotationView,或者该annotationView还未添加到地图上,此方法将不起作用

Parameters
representation样式信息对象

Property Documentation

◆ 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

- (MAUserLocation*) userLocation
readnonatomicassign

当前的位置数据

◆ userLocationAccuracyCircle

- (MACircle*) userLocationAccuracyCircle
readnonatomicassign

用户位置精度圈 对应的overlay

◆ userLocationVisible

- (BOOL) userLocationVisible
readnonatomicassign

当前位置再地图中是否可见

◆ userTrackingMode

- (MAUserTrackingMode) userTrackingMode
readwritenonatomicassign

定位用户位置的模式, 注意:在follow模式下,设置地图中心点、设置可见区域、滑动手势、选择annotation操作会取消follow模式,并触发 - (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated;


The documentation for this category was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。