高德地图SDK(Track)  V1.4.2
AMapTrackManager Class Reference

#import <AMapTrackManager.h>

Inheritance diagram for AMapTrackManager:

Instance Methods

(instancetype) - initWithOptions:
 初始化方法 More...
 
(void) - changeGatherAndPackTimeInterval:packTimeInterval:
 设定定位信息的采集周期和上传周期,注意:上传周期必须为采集周期的整数倍 More...
 
(void) - startServiceWithOptions:
 开始Service,结果会通过onStartService:回调返回 More...
 
(void) - stopService
 停止Service,结果会通过onStopService:回调返回 More...
 
(void) - startGatherAndPack
 开始采集和上传,结果会通过onStartGatherAndPack:返回 More...
 
(void) - stopGaterAndPack
 停止采集和上传,结果会通过onStopGatherAndPack:返回 More...
 
(BOOL) - setLocalCacheMaxSize:
 设定允许的本地缓存最大值 More...
 
(void) - cancelAllRequests
 取消所有未回调的请求,触发错误回调didFailWithError:associatedRequest:。 More...
 
(void) - AMapTrackAddTerminal:
 增加Terminal接口 More...
 
(void) - AMapTrackQueryTerminal:
 查询Terminal接口 More...
 
(void) - AMapTrackAddTrack:
 增加Track接口 More...
 
(void) - AMapTrackDeleteTrack:
 删除Track接口 More...
 
(void) - AMapTrackQueryLastPoint:
 查询终端位置接口 More...
 
(void) - AMapTrackQueryTrackDistance:
 查询轨迹行驶距离接口 More...
 
(void) - AMapTrackQueryTrackHistoryAndDistance:
 查询轨迹历史数据和行驶距离接口 More...
 
(void) - AMapTrackQueryTrackInfo:
 查询轨迹历史数据 More...
 

Properties

id< AMapTrackManagerDelegatedelegate
 AMapTrackManager的delegate. More...
 
CLActivityType activityType
 设定定位的活跃类型。默认为 CLActivityTypeAutomotiveNavigation 。 More...
 
CLLocationDistance distanceFilter
 设定定位的最小更新距离。单位米,默认为 kCLDistanceFilterNone,表示只要检测到设备位置发生变化就会更新位置信息。 More...
 
CLLocationAccuracy desiredAccuracy
 
BOOL pausesLocationUpdatesAutomatically
 指定定位是否会被系统自动暂停。默认为NO。 More...
 
BOOL allowsBackgroundLocationUpdates
 是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。由于iOS系统限制,需要在定位未开始之前或定位停止之后,修改该属性的值才会有效果。 More...
 
NSUInteger gatherInterval
 定位信息的采集周期,单位秒,默认2s,有效值范围[1, 60]。 More...
 
NSUInteger packInterval
 定位信息的上传周期,单位秒,默认20s,有效值范围[5, 3000]。 More...
 
NSString * serviceID
 当前的serviceID,初始化时指定。 More...
 
NSString * terminalID
 当前的terminalID,startService时指定。 More...
 
NSString * trackID
 当前的trackID。 More...
 
NSUInteger cacheMaxSize
 本地缓存最大值 More...
 
NSInteger timeout
 网络超时时间,单位秒,默认为30。 More...
 

Method Documentation

◆ AMapTrackAddTerminal:

- (void) AMapTrackAddTerminal: (AMapTrackAddTerminalRequest *)  request

增加Terminal接口

Parameters
request查询选项。具体属性字段请参考 AMapTrackAddTerminalRequest 类。

◆ AMapTrackAddTrack:

- (void) AMapTrackAddTrack: (AMapTrackAddTrackRequest *)  request

增加Track接口

Parameters
request查询选项。具体属性字段请参考 AMapTrackAddTrackRequest 类。

◆ AMapTrackDeleteTrack:

- (void) AMapTrackDeleteTrack: (AMapTrackDeleteTrackRequest *)  request

删除Track接口

Parameters
request查询选项。具体属性字段请参考 AMapTrackDeleteTrackRequest 类。

◆ AMapTrackQueryLastPoint:

- (void) AMapTrackQueryLastPoint: (AMapTrackQueryLastPointRequest *)  request

查询终端位置接口

Parameters
request查询选项。具体属性字段请参考 AMapTrackQueryLastPointRequest 类。

◆ AMapTrackQueryTerminal:

- (void) AMapTrackQueryTerminal: (AMapTrackQueryTerminalRequest *)  request

查询Terminal接口

Parameters
request查询选项。具体属性字段请参考 AMapTrackQueryTerminalRequest 类。

◆ AMapTrackQueryTrackDistance:

- (void) AMapTrackQueryTrackDistance: (AMapTrackQueryTrackDistanceRequest *)  request

查询轨迹行驶距离接口

Parameters
request查询选项。具体属性字段请参考 AMapTrackQueryTrackDistanceRequest 类。

◆ AMapTrackQueryTrackHistoryAndDistance:

- (void) AMapTrackQueryTrackHistoryAndDistance: (AMapTrackQueryTrackHistoryAndDistanceRequest *)  request

查询轨迹历史数据和行驶距离接口

Parameters
request查询选项。具体属性字段请参考 AMapTrackQueryTrackHistoryAndDistanceRequest 类。

◆ AMapTrackQueryTrackInfo:

- (void) AMapTrackQueryTrackInfo: (AMapTrackQueryTrackInfoRequest *)  request

查询轨迹历史数据

Parameters
request查询选项。具体属性字段请参考 AMapTrackQueryTrackInfoRequest 类。

◆ cancelAllRequests

- (void) cancelAllRequests

取消所有未回调的请求,触发错误回调didFailWithError:associatedRequest:。

◆ changeGatherAndPackTimeInterval:packTimeInterval:

- (void) changeGatherAndPackTimeInterval: (NSInteger)  gatherTimeInterval
packTimeInterval: (NSInteger)  packTimeInterval 

设定定位信息的采集周期和上传周期,注意:上传周期必须为采集周期的整数倍

Parameters
gatherTimeInterval定位信息的采集周期,单位秒,有效值范围[1, 60]
packTimeInterval定位信息的上传周期,单位秒,有效值范围[5, 3000]

◆ initWithOptions:

- (instancetype) initWithOptions: (AMapTrackManagerOptions *)  NS_DESIGNATED_INITIALIZER

初始化方法

◆ setLocalCacheMaxSize:

- (BOOL) setLocalCacheMaxSize: (NSInteger)  cacheMaxSize

设定允许的本地缓存最大值

Parameters
cacheMaxSize本地缓存最大值,单位MB,默认+∞,有效值范围[50,+∞)。
Returns
是否设定成功

◆ startGatherAndPack

- (void) startGatherAndPack

开始采集和上传,结果会通过onStartGatherAndPack:返回

◆ startServiceWithOptions:

- (void) startServiceWithOptions: (AMapTrackManagerServiceOption *)  options

开始Service,结果会通过onStartService:回调返回

Parameters
optionsAMapTrackManagerServiceOption类实例

◆ stopGaterAndPack

- (void) stopGaterAndPack

停止采集和上传,结果会通过onStopGatherAndPack:返回

◆ stopService

- (void) stopService

停止Service,结果会通过onStopService:回调返回

Property Documentation

◆ activityType

- (CLActivityType) activityType
readwritenonatomicassign

设定定位的活跃类型。默认为 CLActivityTypeAutomotiveNavigation 。

◆ allowsBackgroundLocationUpdates

- (BOOL) allowsBackgroundLocationUpdates
readwritenonatomicassign

是否允许后台定位。默认为NO。只在iOS 9.0及之后起作用。设置为YES的时候必须保证 Background Modes 中的 Location updates 处于选中状态,否则会抛出异常。由于iOS系统限制,需要在定位未开始之前或定位停止之后,修改该属性的值才会有效果。

◆ cacheMaxSize

- (NSUInteger) cacheMaxSize
readnonatomicassign

本地缓存最大值

◆ delegate

- (id<AMapTrackManagerDelegate>) delegate
readwritenonatomicweak

AMapTrackManager的delegate.

◆ desiredAccuracy

- (CLLocationAccuracy) desiredAccuracy
readwritenonatomicassign

设定期望的定位精度。单位米,默认为 kCLLocationAccuracyBest。定位服务会尽可能去获取满足desiredAccuracy的定位结果,但不保证一定会得到满足期望的结果。 注意:iOS14及以上版本,轨迹服务需要在精确定位权限下使用,如果该参数设置kCLLocationAccuracyReduced无效。

◆ distanceFilter

- (CLLocationDistance) distanceFilter
readwritenonatomicassign

设定定位的最小更新距离。单位米,默认为 kCLDistanceFilterNone,表示只要检测到设备位置发生变化就会更新位置信息。

◆ gatherInterval

- (NSUInteger) gatherInterval
readnonatomicassign

定位信息的采集周期,单位秒,默认2s,有效值范围[1, 60]。

◆ packInterval

- (NSUInteger) packInterval
readnonatomicassign

定位信息的上传周期,单位秒,默认20s,有效值范围[5, 3000]。

◆ pausesLocationUpdatesAutomatically

- (BOOL) pausesLocationUpdatesAutomatically
readwritenonatomicassign

指定定位是否会被系统自动暂停。默认为NO。

◆ serviceID

- (NSString*) serviceID
readnonatomicassign

当前的serviceID,初始化时指定。

◆ terminalID

- (NSString*) terminalID
readnonatomicassign

当前的terminalID,startService时指定。

◆ timeout

- (NSInteger) timeout
readwritenonatomicassign

网络超时时间,单位秒,默认为30。

◆ trackID

- (NSString*) trackID
readwritenonatomiccopy

当前的trackID。


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