Map Doc  1.0
iOS-引擎SDK-开放平台
MBPoiSearchSession类 参考

新搜索业务模块类 更多...

#import <MBPoiSearchSession.h>

类 MBPoiSearchSession 继承关系图:

构造函数

(void) - setStartedBlock:
 设置搜索请求开始时的回调block 更多...
 
(void) - setEndedBlock:
 设置搜索请求结束时的回调block 更多...
 
(void) - setFailedBlock:
 设置搜索失败结果的回调block 更多...
 
(void) - setLoadedBlock:
 设置搜索成功结果的回调block 更多...
 
(void) - setCanceledBlock:
 设置搜索请求被取消时的回调block 更多...
 
(void) - queryByKeyword:
 
(void) - queryEnRouteWithKeyword:shapePoints:
 
(void) - cancel
 取消搜索请求 更多...
 
(BOOL) - hasMore
 是否可继续翻页 更多...
 
(void) - loadMore
 
(void) - goBack
 回退到上一次的搜索结果(?) 更多...
 
(MBPoiSearchError- querySelect:index:
 对指定关键词搜索类型执行选中索引的操作(?),不支持MBItemTypePoi 更多...
 
(MBAdminCode- adminCode
 设置行政区编码(可选)和cityname 可以二选一 更多...
 
(BOOL) - setAdminCode:
 
(BOOL) - onlySearchInCurrentRegion
 只在当前区域内搜索,没有跳转,特殊需求 更多...
 
(void) - setOnlySearchInCurrentRegion:
 
(int) - childrenPoiSearchDepth
 子POI深度 更多...
 
(void) - setChildrenPoiSearchDepth:
 
(int) - enrouteSearchWidth
 沿路搜相关 更多...
 
(void) - setEnrouteSearchWidth:
 
(BOOL) - enrouteSearchCompensationEnabled
 
(void) - enableEnrouteSearchCompensation:
 
(MBPoiSearchError- queryEnroute
 
(MBPoiSearchError- loadMoreEnroute
 
(BOOL) - sortingByDistanceEnforced
 搜索前设置,搜索结果是否按照距离排序 更多...
 
(void) - enforceSortingByDistance:
 
(MBPoiSearchError- sortByDistance
 搜索后设置,对搜索得到的结果进行排序 更多...
 
(MBPoiSearchError- sortByDefault
 
(int) - currentPageNumber
 当前的页 更多...
 
(void) - clearResult
 清空结果 更多...
 

属性

MBPoiSearchSession *_Nonnull defaultPoiSearchSession
 唯一实例 更多...
 
MBDataPreference preference
 搜索模式(在线/离线/在线优先/离线优先) 更多...
 
NSInteger range
 关键词搜索的搜索距离范围(在线搜索默认3公里,离线搜索默认10公里) 更多...
 
MBPoint center
 关键词搜索的搜索中心点坐标(必须设置) 更多...
 
NSString *_Nonnull cityName
 关键词搜索的搜索中心点城市(必须设置) 更多...
 
NSString *_Nullable keyword
 获取当前搜索关键词 更多...
 
NSInteger pageSize
 搜索结果分页大小(默认为10,最大值为15) 更多...
 
BOOL isNearBy
 关键词搜索是否周边搜 更多...
 
MBPoiTypeTree *_Nonnull typeTree
 
NSUInteger maxSearchDistance
 沿路搜的总距离范围(在线搜索默认3公里,离线搜索默认10公里) 更多...
 
NSUInteger maxSearchRadius
 沿路搜的路线周边范围(在线搜索默认3公里,离线搜索默认10公里) 更多...
 
NSString *_Nonnull urlBase
 搜索服务器地址 更多...
 
NSString *_Nonnull urlBaseForPoiServer
 搜索 " Poi 服务器" 地址(?) 更多...
 

详细描述

新搜索业务模块类

函数文档

◆ adminCode()

- (MBAdminCode) adminCode

设置行政区编码(可选)和cityname 可以二选一

◆ cancel()

- (void) cancel

取消搜索请求

◆ childrenPoiSearchDepth()

- (int) childrenPoiSearchDepth

子POI深度

◆ clearResult()

- (void) clearResult

清空结果

◆ currentPageNumber()

- (int) currentPageNumber

当前的页

◆ enableEnrouteSearchCompensation:()

- (void) enableEnrouteSearchCompensation: (BOOL)  comp

◆ enforceSortingByDistance:()

- (void) enforceSortingByDistance: (BOOL)  isSorted

◆ enrouteSearchCompensationEnabled()

- (BOOL) enrouteSearchCompensationEnabled

◆ enrouteSearchWidth()

- (int) enrouteSearchWidth

沿路搜相关

◆ goBack()

- (void) goBack

回退到上一次的搜索结果(?)

◆ hasMore()

- (BOOL) hasMore

是否可继续翻页

◆ loadMore()

- (void) loadMore

搜索结果翻页

每次从结果回调block返回的结果列表包含了翻页前已加载的全部结果。例如:分页大小为10,第一次搜索"西湖"返回10条数据,调用该方法后返回20条数据,其中前10条和第一次返回的结果一致。

◆ loadMoreEnroute()

- (MBPoiSearchError) loadMoreEnroute

◆ onlySearchInCurrentRegion()

- (BOOL) onlySearchInCurrentRegion

只在当前区域内搜索,没有跳转,特殊需求

◆ queryByKeyword:()

- (void) queryByKeyword: (query(keyword:))  NS_SWIFT_NAME

发起关键词搜索请求

参数
keywordNSString 搜索关键词

◆ queryEnroute()

- (MBPoiSearchError) queryEnroute

◆ queryEnRouteWithKeyword:shapePoints:()

- (void) queryEnRouteWithKeyword: (nonnull NSString *)  keyword
shapePoints: (query(keyword:shapePoints:))  NS_SWIFT_NAME 

发起沿路搜搜索请求

参数
shapePointsNSArray<NSValue> 路线上的点集合,每个点是装箱后的MBPoint

◆ querySelect:index:()

- (MBPoiSearchError) querySelect: (MBPoiItemType type
index: (NSInteger)  index 

对指定关键词搜索类型执行选中索引的操作(?),不支持MBItemTypePoi

◆ setAdminCode:()

- (BOOL) setAdminCode: (MBAdminCode code

◆ setCanceledBlock:()

- (void) setCanceledBlock: (nonnull MBPoiSearchSessionBasicBlock aCancelBlock

设置搜索请求被取消时的回调block

◆ setChildrenPoiSearchDepth:()

- (void) setChildrenPoiSearchDepth: (int)  depth

◆ setEndedBlock:()

- (void) setEndedBlock: (nonnull MBPoiSearchSessionBasicBlock aEndBlock

设置搜索请求结束时的回调block

◆ setEnrouteSearchWidth:()

- (void) setEnrouteSearchWidth: (int)  radius

◆ setFailedBlock:()

- (void) setFailedBlock: (nonnull MBPoiSearchSessionErrorBlock aFailedBlock

设置搜索失败结果的回调block

◆ setLoadedBlock:()

- (void) setLoadedBlock: (nonnull MBPoiSearchSessionDataBlock aLoadedBlock

设置搜索成功结果的回调block

◆ setOnlySearchInCurrentRegion:()

- (void) setOnlySearchInCurrentRegion: (BOOL)  forced

◆ setStartedBlock:()

- (void) setStartedBlock: (nonnull MBPoiSearchSessionBasicBlock aStartedBlock

设置搜索请求开始时的回调block

◆ sortByDefault()

- (MBPoiSearchError) sortByDefault

◆ sortByDistance()

- (MBPoiSearchError) sortByDistance

搜索后设置,对搜索得到的结果进行排序

◆ sortingByDistanceEnforced()

- (BOOL) sortingByDistanceEnforced

搜索前设置,搜索结果是否按照距离排序

属性说明

◆ center

- (MBPoint) center
readwritenonatomicassign

关键词搜索的搜索中心点坐标(必须设置)

◆ cityName

- (NSString* _Nonnull) cityName
readwritenonatomiccopy

关键词搜索的搜索中心点城市(必须设置)

◆ defaultPoiSearchSession

- (MBPoiSearchSession* _Nonnull) defaultPoiSearchSession
readnonatomicstrong

唯一实例

◆ isNearBy

- (BOOL) isNearBy
readwritenonatomicassign

关键词搜索是否周边搜

◆ keyword

- (NSString* _Nullable) keyword
readnonatomiccopy

获取当前搜索关键词

◆ maxSearchDistance

- (NSUInteger) maxSearchDistance
readwritenonatomicassign

沿路搜的总距离范围(在线搜索默认3公里,离线搜索默认10公里)

◆ maxSearchRadius

- (NSUInteger) maxSearchRadius
readwritenonatomicassign

沿路搜的路线周边范围(在线搜索默认3公里,离线搜索默认10公里)

◆ pageSize

- (NSInteger) pageSize
readwritenonatomicassign

搜索结果分页大小(默认为10,最大值为15)

◆ preference

- (MBDataPreference) preference
readwritenonatomicassign

搜索模式(在线/离线/在线优先/离线优先)

◆ range

- (NSInteger) range
readwritenonatomicassign

关键词搜索的搜索距离范围(在线搜索默认3公里,离线搜索默认10公里)

◆ typeTree

- (MBPoiTypeTree* _Nonnull) typeTree
readnonatomicassign

周边类型搜,类型树,获取周边搜类型

◆ urlBase

- (NSString* _Nonnull) urlBase
readwritenonatomiccopy

搜索服务器地址

◆ urlBaseForPoiServer

- (NSString* _Nonnull) urlBaseForPoiServer
readwritenonatomiccopy

搜索 " Poi 服务器" 地址(?)


该类的文档由以下文件生成: