BMKSuggestionSearch.h 1.8 KB

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