单军华
2018-07-11 7b02207537d35bfa1714bf8beafc921f717d100a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 *  BMKSuggestionSearch.h
 *  BMapKit
 *
 *  Copyright 2014 Baidu Inc. All rights reserved.
 *
 */
 
#import "BMKSuggestionSearchOption.h"
#import <BaiduMapAPI_Base/BMKTypes.h>
#import "BMKSearchBase.h"
 
///Suggestion结果类
@interface BMKSuggestionResult : BMKSearchBase
{
    NSArray* _keyList;
    NSArray* _cityList;
    NSArray* _districtList;
}
///key列表,成员是NSString
@property (nonatomic, strong) NSArray* keyList;
///city列表,成员是NSString
@property (nonatomic, strong) NSArray* cityList;
///district列表,成员是NSString
@property (nonatomic, strong) NSArray* districtList;
///poiId列表,成员是NSString
@property (nonatomic, strong) NSArray* poiIdList;
///pt列表,成员是:封装成NSValue的CLLocationCoordinate2D
@property (nonatomic, strong) NSArray* ptList;
//tag列表,成员是NSString
@property (nonatomic, copy) NSArray *tagList;
//address列表, 成员是NSString
@property (nonatomic, copy) NSArray *addressList;
 
 
@end
 
@protocol BMKSuggestionSearchDelegate;
///sug搜索服务
@interface BMKSuggestionSearch : BMKSearchBase
/// 检索模块的Delegate,此处记得不用的时候需要置nil,否则影响内存的释放
@property (nonatomic, weak) id<BMKSuggestionSearchDelegate> delegate;
 
/**
 *搜索建议检索
 *@param suggestionSearchOption       sug检索信息类
 *异步函数,返回结果在BMKSuggestionSearchDelegate的onGetSuggestionResult通知
 *@return 成功返回YES,否则返回NO
 */
- (BOOL)suggestionSearch:(BMKSuggestionSearchOption*)suggestionSearchOption;
 
@end
 
///搜索delegate,用于获取搜索结果
@protocol BMKSuggestionSearchDelegate<NSObject>
@optional
/**
 *返回suggestion搜索结果
 *@param searcher 搜索对象
 *@param result 搜索结果
 *@param error 错误号,@see BMKSearchErrorCode
 */
- (void)onGetSuggestionResult:(BMKSuggestionSearch*)searcher result:(BMKSuggestionResult*)result errorCode:(BMKSearchErrorCode)error;
 
 
@end