AMapSearchObj.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. //
  2. // AMapSearchObj.h
  3. // AMapSearchKit
  4. //
  5. // Created by xiaoming han on 15/7/22.
  6. // Copyright (c) 2015年 Amap. All rights reserved.
  7. //
  8. /* 该文件定义了搜索请求和返回对象。*/
  9. #import <Foundation/Foundation.h>
  10. #import "AMapCommonObj.h"
  11. ///沿途搜索类型
  12. typedef NS_ENUM(NSInteger, AMapRoutePOISearchType)
  13. {
  14. AMapRoutePOISearchTypeGasStation = 0, ///< 加油站
  15. AMapRoutePOISearchTypeMaintenanceStation = 1, ///< 维修站
  16. AMapRoutePOISearchTypeATM = 2, ///< ATM
  17. AMapRoutePOISearchTypeToilet = 3, ///< 厕所
  18. };
  19. ///天气查询类型
  20. typedef NS_ENUM(NSInteger, AMapWeatherType)
  21. {
  22. AMapWeatherTypeLive = 1, ///< 实时
  23. AMapWeatherTypeForecast ///< 预报
  24. };
  25. ///云图搜索结果排序
  26. typedef NS_ENUM(NSInteger, AMapCloudSortType)
  27. {
  28. AMapCloudSortTypeDESC = 0, ///< 降序
  29. AMapCloudSortTypeASC = 1 ///< 升序
  30. };
  31. ///附近搜索距离类型
  32. typedef NS_ENUM(NSInteger, AMapNearbySearchType)
  33. {
  34. AMapNearbySearchTypeLiner = 0, ///< 直线距离
  35. AMapNearbySearchTypeDriving = 1, ///< 驾车行驶距离
  36. };
  37. #pragma mark - AMapPOISearchBaseRequest
  38. ///POI搜索请求基类
  39. @interface AMapPOISearchBaseRequest : AMapSearchObject
  40. ///类型,多个类型用“|”分割 可选值:文本分类、分类代码
  41. @property (nonatomic, copy) NSString *types;
  42. ///排序规则, 0-距离排序;1-综合排序, 默认1
  43. @property (nonatomic, assign) NSInteger sortrule;
  44. ///每页记录数, 范围1-50, [default = 20]
  45. @property (nonatomic, assign) NSInteger offset;
  46. ///当前页数, 范围1-100, [default = 1]
  47. @property (nonatomic, assign) NSInteger page;
  48. ///建筑物POI编号,传入建筑物POI之后,则只在该建筑物之内进行搜索 since 4.5.0
  49. @property (nonatomic, copy) NSString *building;
  50. ///是否返回扩展信息,默认为 NO。
  51. @property (nonatomic, assign) BOOL requireExtension;
  52. ///是否返回子POI,默认为 NO。
  53. @property (nonatomic, assign) BOOL requireSubPOIs;
  54. @end
  55. ///POI ID搜索请求
  56. @interface AMapPOIIDSearchRequest : AMapPOISearchBaseRequest
  57. ///POI全局唯一ID
  58. @property (nonatomic, copy) NSString *uid;
  59. @end
  60. ///POI关键字搜索
  61. @interface AMapPOIKeywordsSearchRequest : AMapPOISearchBaseRequest
  62. ///查询关键字,多个关键字用“|”分割
  63. @property (nonatomic, copy) NSString *keywords;
  64. ///查询城市,可选值:cityname(中文或中文全拼)、citycode、adcode.(注:台湾地区一律设置为【台湾】,不具体到市。)
  65. @property (nonatomic, copy) NSString *city;
  66. ///强制城市限制功能 默认NO,例如:在上海搜索天安门,如果citylimit为true,将不返回北京的天安门相关的POI
  67. @property (nonatomic, assign) BOOL cityLimit;
  68. @end
  69. ///POI周边搜索
  70. @interface AMapPOIAroundSearchRequest : AMapPOISearchBaseRequest
  71. ///查询关键字,多个关键字用“|”分割
  72. @property (nonatomic, copy) NSString *keywords;
  73. ///中心点坐标
  74. @property (nonatomic, copy) AMapGeoPoint *location;
  75. ///查询半径,范围:0-50000,单位:米 [default = 3000]
  76. @property (nonatomic, assign) NSInteger radius;
  77. @end
  78. ///POI多边形搜索
  79. @interface AMapPOIPolygonSearchRequest : AMapPOISearchBaseRequest
  80. ///查询关键字,多个关键字用“|”分割
  81. @property (nonatomic, copy) NSString *keywords;
  82. ///多边形
  83. @property (nonatomic, copy) AMapGeoPolygon *polygon;
  84. @end
  85. ///POI搜索返回
  86. @interface AMapPOISearchResponse : AMapSearchObject
  87. ///返回的POI数目
  88. @property (nonatomic, assign) NSInteger count;
  89. ///关键字建议列表和城市建议列表
  90. @property (nonatomic, strong) AMapSuggestion *suggestion;
  91. ///POI结果,AMapPOI 数组
  92. @property (nonatomic, strong) NSArray<AMapPOI *> *pois;
  93. @end
  94. #pragma mark - AMapPOIRouteSearchRequest
  95. ///沿途搜索
  96. @interface AMapRoutePOISearchRequest : AMapSearchObject
  97. ///中心点坐标
  98. @property (nonatomic, copy) AMapGeoPoint *origin;
  99. ///目标点坐标
  100. @property (nonatomic, copy) AMapGeoPoint *destination;
  101. ///搜索类型
  102. @property (nonatomic, assign) AMapRoutePOISearchType searchType;
  103. ///驾车导航策略,同驾车路径规划请求的策略(5 多策略除外)
  104. @property (nonatomic, assign) NSInteger strategy;
  105. ///道路周围搜索范围,单位米,[0-500],默认250。
  106. @property (nonatomic, assign) NSInteger range;
  107. @end
  108. ///沿途搜索返回
  109. @interface AMapRoutePOISearchResponse : AMapSearchObject
  110. ///返回的POI数目
  111. @property (nonatomic, assign) NSInteger count;
  112. ///POI结果,AMapRoutePOI 数组
  113. @property (nonatomic, strong) NSArray<AMapRoutePOI *> *pois;
  114. @end
  115. #pragma mark - AMapInputTipsSearchRequest
  116. ///搜索提示请求
  117. @interface AMapInputTipsSearchRequest : AMapSearchObject
  118. ///查询关键字
  119. @property (nonatomic, copy) NSString *keywords;
  120. ///查询城市,可选值:cityname(中文或中文全拼)、citycode、adcode.
  121. @property (nonatomic, copy) NSString *city;
  122. ///类型,多个类型用“|”分割 可选值:文本分类、分类代码
  123. @property (nonatomic, copy) NSString *types;
  124. ///强制城市限制功能,例如:在上海搜索天安门,如果citylimit为true,将不返回北京的天安门相关的POI
  125. @property (nonatomic, assign) BOOL cityLimit;
  126. @end
  127. ///搜索提示返回
  128. @interface AMapInputTipsSearchResponse : AMapSearchObject
  129. ///返回数目
  130. @property (nonatomic, assign) NSInteger count;
  131. ///提示列表 AMapTip 数组
  132. @property (nonatomic, strong) NSArray<AMapTip *> *tips;
  133. @end
  134. #pragma mark - AMapGeocodeSearchRequest
  135. ///地理编码请求
  136. @interface AMapGeocodeSearchRequest : AMapSearchObject
  137. ///地址
  138. @property (nonatomic, copy) NSString *address;
  139. ///查询城市,可选值:cityname(中文或中文全拼)、citycode、adcode.
  140. @property (nonatomic, copy) NSString *city;
  141. @end
  142. ///地理编码请求
  143. @interface AMapGeocodeSearchResponse : AMapSearchObject
  144. ///返回数目
  145. @property (nonatomic, assign) NSInteger count;
  146. ///地理编码结果 AMapGeocode 数组
  147. @property (nonatomic, strong) NSArray<AMapGeocode *> *geocodes;
  148. @end
  149. #pragma mark - AMapReGeocodeSearchRequest
  150. ///逆地理编码请求
  151. @interface AMapReGeocodeSearchRequest : AMapSearchObject
  152. ///是否返回扩展信息,默认NO。
  153. @property (nonatomic, assign) BOOL requireExtension;
  154. ///中心点坐标。
  155. @property (nonatomic, copy) AMapGeoPoint *location;
  156. ///查询半径,单位米,范围0~3000,默认1000。
  157. @property (nonatomic, assign) NSInteger radius;
  158. @end
  159. ///逆地理编码返回
  160. @interface AMapReGeocodeSearchResponse : AMapSearchObject
  161. ///逆地理编码结果
  162. @property (nonatomic, strong) AMapReGeocode *regeocode;
  163. @end
  164. #pragma mark - AMapBusStopSearchRequest
  165. ///公交站点请求
  166. @interface AMapBusStopSearchRequest : AMapSearchObject
  167. ///查询关键字
  168. @property (nonatomic, copy) NSString *keywords;
  169. ///城市 可选值:cityname(中文或中文全拼)、citycode、adcode
  170. @property (nonatomic, copy) NSString *city;
  171. ///每页记录数,默认为20,取值为:1-50
  172. @property (nonatomic, assign) NSInteger offset;
  173. ///当前页数,默认值为1,取值为:1-100
  174. @property (nonatomic, assign) NSInteger page;
  175. @end
  176. ///公交站点返回
  177. @interface AMapBusStopSearchResponse : AMapSearchObject
  178. ///公交站数目
  179. @property (nonatomic, assign) NSInteger count;
  180. ///关键字建议列表和城市建议列表
  181. @property (nonatomic, strong) AMapSuggestion *suggestion;
  182. ///公交站点数组,数组中存放AMapBusStop对象
  183. @property (nonatomic, strong) NSArray<AMapBusStop *> *busstops;
  184. @end
  185. #pragma mark - AMapBusLineSearchRequest
  186. ///公交线路查询请求基类,不可直接调用
  187. @interface AMapBusLineBaseSearchRequest : AMapSearchObject
  188. ///城市 可选值:cityname(中文或中文全拼)、citycode、adcode
  189. @property (nonatomic, copy) NSString *city;
  190. ///是否返回扩展信息,默认为NO
  191. @property (nonatomic, assign) BOOL requireExtension;
  192. ///每页记录数,默认为20,取值为1-50
  193. @property (nonatomic, assign) NSInteger offset;
  194. ///当前页数,默认为1,取值为1-100
  195. @property (nonatomic, assign) NSInteger page;
  196. @end
  197. ///公交站线路根据名字请求
  198. @interface AMapBusLineNameSearchRequest : AMapBusLineBaseSearchRequest
  199. ///查询关键字
  200. @property (nonatomic, copy) NSString *keywords;
  201. @end
  202. ///公交站线路根据ID请求
  203. @interface AMapBusLineIDSearchRequest : AMapBusLineBaseSearchRequest
  204. ///唯一标识
  205. @property (nonatomic, copy) NSString *uid;
  206. @end
  207. ///公交站线路返回
  208. @interface AMapBusLineSearchResponse : AMapSearchObject
  209. ///返回公交站数目
  210. @property (nonatomic, assign) NSInteger count;
  211. ///关键字建议列表和城市建议列表
  212. @property (nonatomic, strong) AMapSuggestion *suggestion;
  213. ///公交线路数组,数组中存放 AMapBusLine 对象
  214. @property (nonatomic, strong) NSArray<AMapBusLine *> *buslines;
  215. @end
  216. #pragma mark - AMapDistrictSearchRequest
  217. ///行政区划查询请求
  218. @interface AMapDistrictSearchRequest : AMapSearchObject
  219. ///查询关键字,只支持单关键字搜索,全国范围
  220. @property (nonatomic, copy) NSString *keywords;
  221. ///是否返回边界坐标,默认NO
  222. @property (nonatomic, assign) BOOL requireExtension;
  223. ///是否显示商圈信息,默认NO。
  224. @property (nonatomic, assign) BOOL showBusinessArea;
  225. @end
  226. ///行政区划响应
  227. @interface AMapDistrictSearchResponse : AMapSearchObject
  228. ///返回数目
  229. @property (nonatomic, assign) NSInteger count;
  230. ///行政区域 AMapDistrict 数组
  231. @property (nonatomic, strong) NSArray<AMapDistrict *> *districts;
  232. @end
  233. #pragma mark - AMapRouteSearchBaseRequest
  234. ///路径规划基础类,不可直接调用
  235. @interface AMapRouteSearchBaseRequest : AMapSearchObject
  236. ///出发点
  237. @property (nonatomic, copy) AMapGeoPoint *origin;
  238. ///目的地
  239. @property (nonatomic, copy) AMapGeoPoint *destination;
  240. @end
  241. #pragma mark - AMapDrivingRouteSearchRequest
  242. ///驾车路径规划
  243. @interface AMapDrivingRouteSearchRequest : AMapRouteSearchBaseRequest
  244. ///驾车导航策略([default = 0])\n 0速度优先(时间)\n 1费用优先(不走收费路段的最快道路)\n 2距离优先\n 3不走快速路\n 4躲避拥堵\n 5多策略(同时使用速度优先、费用优先、距离优先三个策略计算路径)。其中必须说明,就算使用三个策略算路,会根据路况不固定的返回一~三条路径规划信息\n 6不走高速\n 7不走高速且避免收费\n 8躲避收费和拥堵\n 9不走高速且躲避收费和拥堵\n 10多备选,时间最短,距离最短,躲避拥堵(考虑路况)\n 11多备选,时间最短,距离最短\n 12多备选,躲避拥堵(考虑路况)\n 13多备选,不走高速\n 14多备选,费用优先\n 15多备选,躲避拥堵,不走高速(考虑路况)\n 16多备选,费用有限,不走高速\n 17多备选,躲避拥堵,费用优先(考虑路况)\n 18多备选,躲避拥堵,不走高速,费用优先(考虑路况)\n 19多备选,高速优先\n 20多备选,高速优先,躲避拥堵(考虑路况)
  245. @property (nonatomic, assign) NSInteger strategy;
  246. ///途经点 AMapGeoPoint 数组,最多支持16个途经点
  247. @property (nonatomic, copy) NSArray<AMapGeoPoint *> *waypoints;
  248. ///避让区域 AMapGeoPolygon 数组,最多支持100个避让区域,每个区域16个点
  249. @property (nonatomic, copy) NSArray<AMapGeoPolygon *> *avoidpolygons;
  250. ///避让道路名
  251. @property (nonatomic, copy) NSString *avoidroad;
  252. ///出发点 POI ID
  253. @property (nonatomic, copy) NSString *originId;
  254. ///目的地 POI ID
  255. @property (nonatomic, copy) NSString *destinationId;
  256. ///出发点POI类型编码
  257. @property (nonatomic, copy) NSString *origintype;
  258. ///目的地POI类型编码
  259. @property (nonatomic, copy) NSString *destinationtype;
  260. ///是否返回扩展信息,默认为 NO
  261. @property (nonatomic, assign) BOOL requireExtension;
  262. @end
  263. #pragma mark - AMapWalkingRouteSearchRequest
  264. ///步行路径规划
  265. @interface AMapWalkingRouteSearchRequest : AMapRouteSearchBaseRequest
  266. ///是否提供备选步行方案([default = 0])0-只提供一条步行方案; 1-提供备选步行方案(有可能无备选方案)
  267. @property (nonatomic, assign) NSInteger multipath;
  268. @end
  269. #pragma mark - AMapTransitRouteSearchRequest
  270. ///公交路径规划
  271. @interface AMapTransitRouteSearchRequest : AMapRouteSearchBaseRequest
  272. ///公交换乘策略([default = 0])\n 0-最快捷模式;\n 1-最经济模式;\n 2-最少换乘模式;\n 3-最少步行模式;\n 4-最舒适模式;\n 5-不乘地铁模式
  273. @property (nonatomic, assign) NSInteger strategy;
  274. ///城市, 必填
  275. @property (nonatomic, copy) NSString *city;
  276. ///目的城市, 跨城时需要填写,否则会出错
  277. @property (nonatomic, copy) NSString *destinationCity;
  278. ///是否包含夜班车,默认为 NO
  279. @property (nonatomic, assign) BOOL nightflag;
  280. ///是否返回扩展信息,默认为 NO
  281. @property (nonatomic, assign) BOOL requireExtension;
  282. @end
  283. #pragma mark - AMapRidingRouteSearchRequest
  284. ///骑行路径规划
  285. @interface AMapRidingRouteSearchRequest : AMapRouteSearchBaseRequest
  286. ///路径方案类型([default = 0])\n 0-推荐路线及最快路线综合\n 1-推荐路线\n 2-最快路线
  287. @property (nonatomic, assign) NSInteger type;
  288. @end
  289. ///路径规划返回
  290. @interface AMapRouteSearchResponse : AMapSearchObject
  291. ///路径规划信息数目
  292. @property (nonatomic, assign) NSInteger count;
  293. ///路径规划信息
  294. @property (nonatomic, strong) AMapRoute *route;
  295. @end
  296. #pragma mark - AMapWeatherSearchWeather
  297. ///天气查询请求
  298. @interface AMapWeatherSearchRequest : AMapSearchObject
  299. ///城市名称,支持cityname及adcode
  300. @property (nonatomic, copy) NSString *city;
  301. ///气象类型,Live为实时天气,Forecast为后三天预报天气,默认为Live
  302. @property (nonatomic, assign) AMapWeatherType type;
  303. @end
  304. ///天气查询返回
  305. @interface AMapWeatherSearchResponse : AMapSearchObject
  306. ///实时天气数据信息 AMapLocalWeatherLive 数组,仅在请求实时天气时有返回。
  307. @property (nonatomic, strong) NSArray<AMapLocalWeatherLive *> *lives;
  308. ///预报天气数据信息 AMapLocalWeatherForecast 数组,仅在请求预报天气时有返回
  309. @property (nonatomic, strong) NSArray<AMapLocalWeatherForecast *> *forecasts;
  310. @end
  311. #pragma mark - AMapNearbySearchRequest
  312. ///附近搜索请求
  313. @interface AMapNearbySearchRequest : AMapSearchObject
  314. ///中心点坐标
  315. @property (nonatomic, copy) AMapGeoPoint *center;
  316. ///查询半径,范围:[0, 10000],单位:米 [default = 1000]
  317. @property (nonatomic, assign) NSInteger radius;
  318. ///搜索距离类型,默认为直线距离
  319. @property (nonatomic, assign) AMapNearbySearchType searchType;
  320. ///检索时间范围,超过24小时的数据无法返回,范围[5, 24*60*60] 单位:秒 [default = 1800]
  321. @property (nonatomic, assign) NSInteger timeRange;
  322. ///返回条数,范围[1, 100], 默认30
  323. @property (nonatomic, assign) NSInteger limit;
  324. @end
  325. ///附近搜索返回
  326. @interface AMapNearbySearchResponse : AMapSearchObject
  327. ///结果总条数
  328. @property (nonatomic, assign) NSInteger count;
  329. ///周边用户信息 AMapNearbyUserInfo 数组
  330. @property (nonatomic, strong) NSArray<AMapNearbyUserInfo *> *infos;
  331. @end
  332. #pragma mark - AMapCloudSearchBaseRequest
  333. ///云图搜索请求基类
  334. @interface AMapCloudSearchBaseRequest : AMapSearchObject
  335. ///要查询的表格ID, 必选
  336. @property (nonatomic, copy) NSString *tableID;
  337. ///筛选条件数组, 可选, 对建立了排序筛选索引的字段进行筛选(系统默认为:_id,_name,_address,_updatetime,_createtime建立排序筛选索引).\n 说明:\n 1.支持对文本字段的精确匹配;支持对整数和小数字段的连续区间筛选;\n 2.示例:数组{"type:酒店", "star:[3,5]"}的含义,等同于SQL语句:WHERE type = "酒店" AND star BETWEEN 3 AND 5\n 注意: 所设置的过滤条件中不能含有&、#、%等URL的特殊符号。
  338. @property (nonatomic, strong) NSArray<NSString *> *filter;
  339. ///排序字段名, 可选.\n 说明:\n 1.支持按建立了排序筛选索引的整数或小数字段进行排序:sortFields = "字段名";\n 2.系统预设的字段(忽略sortType):_distance:坐标与中心点距离升序排序,仅在周边检索时有效;_weight:权重降序排序,当存在keywords时有效;\n 3.默认值:当keywords存在时:默认按预设字段_weight排序;当keywords不存在时,默认按预设字段_distance排序;按建立了排序筛选索引的整数或小数字段进行排序时,若不填升降序,则默认按升序排列;
  340. @property (nonatomic, copy) NSString *sortFields;
  341. ///可选, 排序方式(默认升序)
  342. @property (nonatomic, assign) AMapCloudSortType sortType;
  343. ///可选, 每页记录数(每页最大记录数100, 默认20)
  344. @property (nonatomic, assign) NSInteger offset;
  345. ///可选, 当前页数(>=1, 默认1)
  346. @property (nonatomic, assign) NSInteger page;
  347. @end
  348. #pragma mark - AMapCloudPlaceAroundSearchRequest
  349. ///云图周边搜请求
  350. @interface AMapCloudPOIAroundSearchRequest : AMapCloudSearchBaseRequest
  351. ///必填,中心点坐标。
  352. @property (nonatomic, copy) AMapGeoPoint *center;
  353. ///可选,查询半径(默认值为3000),单位:米。详细信息请参考:http://lbs.amap.com/yuntu/reference/cloudsearch/#t2
  354. @property (nonatomic, assign) NSInteger radius;
  355. ///可选,搜索关键词。\n 说明:\n 1. 请先在云图数据管理台添加或删除文本索引字段,系统默认为 _name 和 _address 建立文本索引;\n 2.支持关键字模糊检索,即对建立【文本索引字段】对应列内容进行模糊检索;如 keywords = “工商银行”,检索返回已建立文本索引列值中包含"工商"或者"银行"或者"工商银行"关键字的POI结果集。 \n 3. 支持关键字“或”精准检索,即对建立【文本索引字段】对应列内容进行多关键字检索;如 keywords = "招商银行|华夏银行|工商银行",检索返回已建立索引列值中包含“招商银行”或者“华夏银行”或者“工商银行”的POI结果集,不会返回检索词切分后,如仅包含“招商”或者“银行”的POI集。 \n 4. 可赋值为空值,即 keywords = " " 表示空值; \n 5. 若 city = "城市名",keywords = " " 或者 keywords = "关键字",返回对应城市的全部数据或对应关键字的数据; \n 6. 一次请求最多返回2000条数据。\n 注意: 所设置的keywords中不能含有&、#、%等URL的特殊符号。
  356. @property (nonatomic, copy) NSString *keywords;
  357. @end
  358. ///云图polygon区域查询请求
  359. @interface AMapCloudPOIPolygonSearchRequest : AMapCloudSearchBaseRequest
  360. ///必填,多边形。
  361. @property (nonatomic, copy) AMapGeoPolygon *polygon;
  362. ///可选,搜索关键词。\n 说明:\n 1. 请先在云图数据管理台添加或删除文本索引字段,系统默认为 _name 和 _address 建立文本索引;\n 2.支持关键字模糊检索,即对建立【文本索引字段】对应列内容进行模糊检索;如 keywords = “工商银行”,检索返回已建立文本索引列值中包含“工商”或者“银行”或者“工商银行”关键字的POI结果集。\n 3. 支持关键字“或”精准检索,即对建立【文本索引字段】对应列内容进行多关键字检索;如 keywords = "招商银行|华夏银行|工商银行",检索返回已建立索引列值中包含“招商银行”或者“华夏银行”或者“工商银行”的POI结果集,不会返回检索词切分后,如仅包含“招商”或者“银行”的POI集。\n 4. 可赋值为空值,即 keywords = " " 表示空值;\n 5. 若 city = "城市名",keywords = " " 或者 keywords = "关键字",返回对应城市的全部数据或对应关键字的数据;\n 6. 一次请求最多返回2000条数据。\n 注意: 所设置的keywords中不能含有&、#、%等URL的特殊符号。
  363. @property (nonatomic, copy) NSString *keywords;
  364. @end
  365. ///云图ID查询请求
  366. @interface AMapCloudPOIIDSearchRequest : AMapCloudSearchBaseRequest
  367. ///必填,POI的ID
  368. @property (nonatomic, assign) NSInteger uid;
  369. @end
  370. ///云图本地查询请求
  371. @interface AMapCloudPOILocalSearchRequest : AMapCloudSearchBaseRequest
  372. ///必填,搜索关键词。\n 说明:\n 1. 请先在云图数据管理台添加或删除文本索引字段,系统默认为 _name 和 _address 建立文本索引;\n 2.支持关键字模糊检索,即对建立【文本索引字段】对应列内容进行模糊检索;如 keywords = "工商银行",检索返回已建立文本索引列值中包含“工商”或者“银行”或者“工商银行”关键字的POI结果集。\n 3. 支持关键字“或”精准检索,即对建立【文本索引字段】对应列内容进行多关键字检索;如 keywords = "招商银行|华夏银行|工商银行",检索返回已建立索引列值中包含“招商银行”或者“华夏银行”或者“工商银行”的POI结果集,不会返回检索词切分后,如仅包含“招商”或者“银行”的POI集。\n 4. 可赋值为空值,即 keywords = " " 表示空值;\n 5. 若 city = "城市名",keywords = " " 或者 keywords = "关键字",返回对应城市的全部数据或对应关键字的数据;\n 6. 一次请求最多返回2000条数据。 注意: 所设置的keywords中不能含有&、#、%等URL的特殊符号。
  373. @property (nonatomic, copy) NSString *keywords;
  374. ///必填,城市名称\n 说明:\n 1. 支持全国/省/市/区县行政区划范围的检索;\n 2. city = "全国",即对用户全表搜索;\n 3. 当city值设置非法或不正确时,按照 city = "全国"返回。
  375. @property (nonatomic, copy) NSString *city;
  376. @end
  377. ///云图搜索返回
  378. @interface AMapCloudPOISearchResponse : AMapSearchObject
  379. ///返回结果总数目
  380. @property (nonatomic, assign) NSInteger count;
  381. ///返回的结果, AMapCloudPOI 数组
  382. @property (nonatomic, strong) NSArray<AMapCloudPOI *> *POIs;
  383. @end
  384. #pragma mark - AMapShareSearchBaseRequest
  385. ///短串分享搜索请求基类, 请使用具体的子类。
  386. @interface AMapShareSearchBaseRequest : AMapSearchObject
  387. @end
  388. ///位置短串分享请求
  389. @interface AMapLocationShareSearchRequest : AMapShareSearchBaseRequest
  390. ///必填, 位置坐标
  391. @property (nonatomic, copy) AMapGeoPoint *location;
  392. ///位置名称,请不要包含【,%&@#】等特殊符号
  393. @property (nonatomic, copy) NSString *name;
  394. @end
  395. ///兴趣点短串分享请求
  396. @interface AMapPOIShareSearchRequest : AMapShareSearchBaseRequest
  397. ///POI的ID,如果有ID则指定POI,否则按name查询。
  398. @property (nonatomic, copy) NSString *uid;
  399. ///坐标
  400. @property (nonatomic, copy) AMapGeoPoint *location;
  401. ///名称,请不要包含【,%&@#】等特殊符号。
  402. @property (nonatomic, copy) NSString *name;
  403. ///地址,请不要包含【,%&@#】等特殊符号。
  404. @property (nonatomic, copy) NSString *address;
  405. @end
  406. ///路径规划短串分享请求
  407. @interface AMapRouteShareSearchRequest : AMapShareSearchBaseRequest
  408. ///默认为0\n 驾车:0-速度最快(时间);\n 1-避免收费(不走收费路段的最快道路);\n 2-距离优先;\n 3-不走高速;\n 4-结合实时交通(躲避拥堵);\n 5-不走高速且避免收费;\n 6-不走高速且躲避拥堵;\n 7-躲避收费和拥堵;\n 8-不走高速且躲避收费和拥堵\n\n 公交:0-最快捷;\n 1-最经济;\n 2-最少换乘;\n 3-最少步行;\n 4-最舒适;\n 5-不乘地铁;\n\n 步行,无策略,均一样
  409. @property (nonatomic, assign) NSInteger strategy;
  410. ///Route的type,默认为0,超出范围为0.\n 0为驾车,\n 1为公交,\n 2为步行
  411. @property (nonatomic, assign) NSInteger type;
  412. ///起点坐标
  413. @property (nonatomic, copy) AMapGeoPoint *startCoordinate;
  414. ///终点坐标
  415. @property (nonatomic, copy) AMapGeoPoint *destinationCoordinate;
  416. ///起点名称,默认为“已选择的位置”,请不要包含【,%&@#】等特殊符号
  417. @property (nonatomic, copy) NSString *startName;
  418. ///终点名称,默认为“已选择的位置”,请不要包含【,%&@#】等特殊符号
  419. @property (nonatomic, copy) NSString *destinationName;
  420. @end
  421. ///导航短串分享请求
  422. @interface AMapNavigationShareSearchRequest : AMapShareSearchBaseRequest
  423. ///默认为0,超出范围为0\n 驾车:0-速度最快(时间);\n 1-避免收费(不走收费路段的最快道路);\n 2-距离优先;\n 3-不走高速;\n 4-结合实时交通(躲避拥堵);\n 5-不走高速且避免收费;\n 6-不走高速且躲避拥堵;\n 7-躲避收费和拥堵;\n 8-不走高速且躲避收费和拥堵
  424. @property (nonatomic, assign) NSInteger strategy;
  425. ///起点坐标,若跳转到高德地图,默认更换为定位坐标
  426. @property (nonatomic, copy) AMapGeoPoint *startCoordinate;
  427. ///终点坐标
  428. @property (nonatomic, copy) AMapGeoPoint *destinationCoordinate;
  429. @end
  430. ///导航短串分享响应
  431. @interface AMapShareSearchResponse : AMapSearchObject
  432. ///转换后的短串
  433. @property (nonatomic, copy) NSString *shareURL;
  434. @end