FMKTextNavigation Class Reference

Inherits from NSObject
Declared in FMKTextNavigation.h

Overview

文字导航分析类

使用路径规划结果生成对应的文字描述和对应的路段对象集合,支持中英文切换

  textNavigationDescriptions

文字导航描述,目前支持简体中文和英文,可通过- setTextNavigationLanguage:方法改变生成语言类型

@property (nonatomic, strong, readonly) NSArray<NSString*> *textNavigationDescriptions

Declared In

FMKTextNavigation.h

  textNavigationSegments

文字导航路段生成

@property (nonatomic, strong, readonly) NSArray<FMKTextNavigationSegment*> *textNavigationSegments

Discussion

Warning: 该路段是过滤了路径规划结果的点集构成的线段

Declared In

FMKTextNavigation.h

  naviResults

初始化时传入的路径规划结果

@property (nonatomic, readonly) NSArray<FMKNaviResult*> *naviResults

Declared In

FMKTextNavigation.h

+ textaNavigationWithNaviResuls:mapPath:

构造方法

+ (instancetype)textaNavigationWithNaviResuls:(NSArray<FMKNaviResult*> *)naviResults mapPath:(NSString *)mapPath

Parameters

naviResults

路径规划结果,若数组内容为空,初始化失败

mapPath

对应地图数据路径,若路径下文件不存在,初始化失败

Return Value

文字导航生成器

Declared In

FMKTextNavigation.h

– initWithNaviResults:mapPath:

构造方法

- (instancetype)initWithNaviResults:(NSArray *)naviResults mapPath:(NSString *)mapPath

Parameters

naviResults

路径规划结果 若数组内容为空,初始化失败

mapPath

对应地图数据路径,若路径下文件不存在,初始化失败

Return Value

文字导航生成器

Declared In

FMKTextNavigation.h

– setTextNavigationLanguage:

设置生成的文字语言,目前支持支持简体中文和英文,语言类型 FMKTextNavigationLanguage,默认为FMKTextNavigationLanguageChinese简体中文 调用该方法会触发导航文字生成逻辑,修改已经生成的文字内容为设定语言,更新内容在textNavigationDescriptions属性和textNavigationSegments属性

- (BOOL)setTextNavigationLanguage:(FMKTextNavigationLanguage)language

Parameters

language

语言类型

Return Value

语言类型是否设置成功 若语言不匹配或与上次

Declared In

FMKTextNavigation.h

– generateTextNavigationDescriptions

生成相应的文字导航,文字导航结果可在 textNavigationDescriptions 属性中查看 同时会生成相应的路段信息,路段信息可在 textNavigationSegments 属性中查看

- (void)generateTextNavigationDescriptions

Declared In

FMKTextNavigation.h