AMapSearchObj.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  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. AMapRoutePOISearchTypeGasAirStation = 4, ///< 加气站
  19. AMapRoutePOISearchTypeParkStation = 5, ///< 服务区
  20. };
  21. ///天气查询类型
  22. typedef NS_ENUM(NSInteger, AMapWeatherType)
  23. {
  24. AMapWeatherTypeLive = 1, ///< 实时
  25. AMapWeatherTypeForecast ///< 预报
  26. };
  27. ///企业地图搜索结果排序
  28. typedef NS_ENUM(NSInteger, AMapCloudSortType)
  29. {
  30. AMapCloudSortTypeDESC = 0, ///< 降序
  31. AMapCloudSortTypeASC = 1 ///< 升序
  32. };
  33. ///附近搜索距离类型
  34. typedef NS_ENUM(NSInteger, AMapNearbySearchType)
  35. {
  36. AMapNearbySearchTypeLiner = 0, ///< 直线距离
  37. AMapNearbySearchTypeDriving = 1, ///< 驾车行驶距离
  38. };
  39. ///货车类型
  40. typedef NS_ENUM(NSInteger, AMapTruckSizeType)
  41. {
  42. AMapTruckSizeTypeMini = 1, ///< 微型车
  43. AMapTruckSizeTypeLight = 2, ///< 轻型车
  44. AMapTruckSizeTypeMedium = 3, ///< 中型车
  45. AMapTruckSizeTypeHeavy = 4, ///< 重型车
  46. };
  47. ///规避道路类型
  48. typedef NS_ENUM(NSInteger, AMapDrivingRouteExcludeType)
  49. {
  50. AMapDrivingRouteExcludeTypeNone = 0, ///< 不规避
  51. AMapDrivingRouteExcludeTypeToll = 1, ///< 收费道路
  52. AMapDrivingRouteExcludeTypeMotorway = 2, ///< 高速路
  53. AMapDrivingRouteExcludeTypeFerry = 3, ///< 渡船
  54. };
  55. ///距离测量类型 @since 7.7.0
  56. typedef NS_ENUM(NSInteger, AMapDistanceSearchType)
  57. {
  58. AMapDistanceSearchTypeStraight = 0, ///< 直线距离
  59. AMapDistanceSearchTypeDrive = 1, ///< 驾车导航距离
  60. AMapDistanceSearchTypeWalk = 3, ///< 步行导航距离
  61. };
  62. #pragma mark - AMapPOISearchBaseRequest
  63. ///POI搜索请求基类
  64. @interface AMapPOISearchBaseRequest : AMapSearchObject
  65. ///类型,多个类型用“|”分割 可选值:文本分类、分类代码
  66. @property (nonatomic, copy) NSString *types;
  67. ///排序规则, 0-距离排序;1-综合排序, 默认0
  68. @property (nonatomic, assign) NSInteger sortrule;
  69. ///每页记录数, 范围1-25, [default = 20]
  70. @property (nonatomic, assign) NSInteger offset;
  71. ///当前页数, 范围1-100, [default = 1]
  72. @property (nonatomic, assign) NSInteger page;
  73. ///建筑物POI编号,传入建筑物POI之后,则只在该建筑物之内进行搜索(since 4.5.0)
  74. @property (nonatomic, copy) NSString *building;
  75. ///是否返回扩展信息,默认为 NO。
  76. @property (nonatomic, assign) BOOL requireExtension;
  77. ///是否返回子POI,默认为 NO。
  78. @property (nonatomic, assign) BOOL requireSubPOIs;
  79. @end
  80. ///POI ID搜索请求
  81. @interface AMapPOIIDSearchRequest : AMapPOISearchBaseRequest
  82. ///POI全局唯一ID
  83. @property (nonatomic, copy) NSString *uid;
  84. @end
  85. ///POI关键字搜索
  86. @interface AMapPOIKeywordsSearchRequest : AMapPOISearchBaseRequest
  87. ///查询关键字,多个关键字用“|”分割
  88. @property (nonatomic, copy) NSString *keywords;
  89. ///查询城市,可选值:cityname(中文或中文全拼)、citycode、adcode.(注:台湾省的城市一律设置为【台湾】,不具体到市。)
  90. @property (nonatomic, copy) NSString *city;
  91. ///强制城市限制功能 默认NO,例如:在上海搜索天安门,如果citylimit为true,将不返回北京的天安门相关的POI
  92. @property (nonatomic, assign) BOOL cityLimit;
  93. ///设置后,如果sortrule==0,则返回结果会按照距离此点的远近来排序,since 5.2.1
  94. @property (nonatomic, strong) AMapGeoPoint *location;
  95. @end
  96. ///POI周边搜索
  97. @interface AMapPOIAroundSearchRequest : AMapPOISearchBaseRequest
  98. ///查询关键字,多个关键字用“|”分割
  99. @property (nonatomic, copy) NSString *keywords;
  100. ///中心点坐标
  101. @property (nonatomic, copy) AMapGeoPoint *location;
  102. ///查询半径,范围:0-50000,单位:米 [default = 1500]
  103. @property (nonatomic, assign) NSInteger radius;
  104. ///查询城市,可选值:cityname(中文或中文全拼)、citycode、adcode。注:当用户指定的经纬度和city出现冲突,若范围内有用户指定city的数据,则返回相关数据,否则返回为空。(since 5.7.0)
  105. @property (nonatomic, copy) NSString *city;
  106. ///是否对结果进行人工干预,如火车站,原因为poi较为特殊,结果存在人工干预,干预结果优先,所以距离优先的排序未生效,默认为YES (since 7.4.0)
  107. @property (nonatomic, assign) BOOL special;
  108. @end
  109. ///POI多边形搜索
  110. @interface AMapPOIPolygonSearchRequest : AMapPOISearchBaseRequest
  111. ///查询关键字,多个关键字用“|”分割
  112. @property (nonatomic, copy) NSString *keywords;
  113. ///多边形
  114. @property (nonatomic, copy) AMapGeoPolygon *polygon;
  115. @end
  116. ///POI搜索返回
  117. @interface AMapPOISearchResponse : AMapSearchObject
  118. ///返回的POI数目
  119. @property (nonatomic, assign) NSInteger count;
  120. ///关键字建议列表和城市建议列表
  121. @property (nonatomic, strong) AMapSuggestion *suggestion;
  122. ///POI结果,AMapPOI 数组
  123. @property (nonatomic, strong) NSArray<AMapPOI *> *pois;
  124. @end
  125. #pragma mark - AMapPOIRouteSearchRequest
  126. ///沿途搜索, 注意起点和终点不能相距太远(大概70公里),否则可能搜索结果为空
  127. @interface AMapRoutePOISearchRequest : AMapSearchObject
  128. ///中心点坐标
  129. @property (nonatomic, copy) AMapGeoPoint *origin;
  130. ///目标点坐标
  131. @property (nonatomic, copy) AMapGeoPoint *destination;
  132. ///搜索类型
  133. @property (nonatomic, assign) AMapRoutePOISearchType searchType;
  134. ///驾车导航策略,同驾车路径规划请求的策略(5 多策略除外)
  135. @property (nonatomic, assign) NSInteger strategy;
  136. ///道路周围搜索范围,单位米,[0-500],默认250。
  137. @property (nonatomic, assign) NSInteger range;
  138. ///用户自己规划的路线,在origine、destination未填入时为必填.格式为:"经度,维度;经度,维度;...". 目前限制个数最多为100个点
  139. @property (nonatomic, strong) NSString *polylineStr;
  140. ///用户自己规划的路线,在origine、destination未填入且polylineStr未填入时为必填. 目前限制个数最多为100个点
  141. @property (nonatomic, strong) NSArray<AMapGeoPoint*> *polyline;
  142. @end
  143. ///沿途搜索返回
  144. @interface AMapRoutePOISearchResponse : AMapSearchObject
  145. ///返回的POI数目
  146. @property (nonatomic, assign) NSInteger count;
  147. ///POI结果,AMapRoutePOI 数组
  148. @property (nonatomic, strong) NSArray<AMapRoutePOI *> *pois;
  149. @end
  150. #pragma mark - AMapInputTipsSearchRequest
  151. ///搜索提示请求
  152. @interface AMapInputTipsSearchRequest : AMapSearchObject
  153. ///查询关键字
  154. @property (nonatomic, copy) NSString *keywords;
  155. ///查询城市,可选值:cityname(中文或中文全拼)、citycode、adcode.
  156. @property (nonatomic, copy) NSString *city;
  157. ///类型,多个类型用“|”分割 可选值:文本分类、分类代码
  158. @property (nonatomic, copy) NSString *types;
  159. ///强制城市限制功能,例如:在上海搜索天安门,如果citylimit为true,将不返回北京的天安门相关的POI
  160. @property (nonatomic, assign) BOOL cityLimit;
  161. ///格式形如:@"116.481488,39.990464",(经度,纬度),不可以包含空格。如果设置,在此location附近优先返回搜索关键词信息, since 5.0.0
  162. @property (nonatomic, copy) NSString *location;
  163. @end
  164. ///搜索提示返回
  165. @interface AMapInputTipsSearchResponse : AMapSearchObject
  166. ///返回数目
  167. @property (nonatomic, assign) NSInteger count;
  168. ///提示列表 AMapTip 数组, AMapTip 有多种属性,可根据该对象的返回信息,配合其他搜索服务使用,完善您应用的功能。如:\n 1)uid为空,location为空,该提示语为品牌词,可根据该品牌词进行POI关键词搜索。\n 2)uid不为空,location为空,为公交线路,根据uid进行公交线路查询。\n 3)uid不为空,location也不为空,是一个真实存在的POI,可直接显示在地图上。
  169. @property (nonatomic, strong) NSArray<AMapTip *> *tips;
  170. @end
  171. #pragma mark - AMapGeocodeSearchRequest
  172. ///地理编码请求
  173. @interface AMapGeocodeSearchRequest : AMapSearchObject
  174. ///地址
  175. @property (nonatomic, copy) NSString *address;
  176. ///查询城市,可选值:cityname(中文或中文全拼)、citycode、adcode.
  177. @property (nonatomic, copy) NSString *city;
  178. ///指定查询国家,支持多个国家,用“|”分隔,可选值:国家代码ISO 3166 或 global,仅海外生效(since 7.4.0)
  179. @property (nonatomic, copy) NSString *country;
  180. @end
  181. ///地理编码返回
  182. @interface AMapGeocodeSearchResponse : AMapSearchObject
  183. ///返回数目
  184. @property (nonatomic, assign) NSInteger count;
  185. ///地理编码结果 AMapGeocode 数组
  186. @property (nonatomic, strong) NSArray<AMapGeocode *> *geocodes;
  187. @end
  188. #pragma mark - AMapReGeocodeSearchRequest
  189. ///逆地理编码请求
  190. @interface AMapReGeocodeSearchRequest : AMapSearchObject
  191. ///是否返回扩展信息,默认NO。
  192. @property (nonatomic, assign) BOOL requireExtension;
  193. ///中心点坐标。
  194. @property (nonatomic, copy) AMapGeoPoint *location;
  195. ///查询半径,单位米,范围0~3000,默认1000。
  196. @property (nonatomic, assign) NSInteger radius;
  197. ///指定返回结果poi数组中的POI类型,在requireExtension=YES时生效。输入为typecode, 支持传入多个typecode, 多值时用“|”分割
  198. @property (nonatomic, copy) NSString *poitype;
  199. ///distance 按距离返回,score 按权重返回,仅海外生效(since 7.4.0)
  200. @property (nonatomic, copy) NSString *mode;
  201. @end
  202. ///逆地理编码返回
  203. @interface AMapReGeocodeSearchResponse : AMapSearchObject
  204. ///逆地理编码结果
  205. @property (nonatomic, strong) AMapReGeocode *regeocode;
  206. @end
  207. #pragma mark - AMapBusStopSearchRequest
  208. ///公交站点请求
  209. @interface AMapBusStopSearchRequest : AMapSearchObject
  210. ///查询关键字
  211. @property (nonatomic, copy) NSString *keywords;
  212. ///城市 可选值:cityname(中文或中文全拼)、citycode、adcode
  213. @property (nonatomic, copy) NSString *city;
  214. ///每页记录数,默认为20,取值为:1-50
  215. @property (nonatomic, assign) NSInteger offset;
  216. ///当前页数,默认值为1,取值为:1-100
  217. @property (nonatomic, assign) NSInteger page;
  218. @end
  219. ///公交站点返回
  220. @interface AMapBusStopSearchResponse : AMapSearchObject
  221. ///公交站数目
  222. @property (nonatomic, assign) NSInteger count;
  223. ///关键字建议列表和城市建议列表
  224. @property (nonatomic, strong) AMapSuggestion *suggestion;
  225. ///公交站点数组,数组中存放AMapBusStop对象
  226. @property (nonatomic, strong) NSArray<AMapBusStop *> *busstops;
  227. @end
  228. #pragma mark - AMapBusLineSearchRequest
  229. ///公交线路查询请求基类,不可直接调用
  230. @interface AMapBusLineBaseSearchRequest : AMapSearchObject
  231. ///城市 可选值:cityname(中文或中文全拼)、citycode、adcode
  232. @property (nonatomic, copy) NSString *city;
  233. ///是否返回扩展信息,默认为NO
  234. @property (nonatomic, assign) BOOL requireExtension;
  235. ///每页记录数,默认为20,取值为1-50
  236. @property (nonatomic, assign) NSInteger offset;
  237. ///当前页数,默认为1,取值为1-100
  238. @property (nonatomic, assign) NSInteger page;
  239. @end
  240. ///公交站线路根据名字请求
  241. @interface AMapBusLineNameSearchRequest : AMapBusLineBaseSearchRequest
  242. ///查询关键字
  243. @property (nonatomic, copy) NSString *keywords;
  244. @end
  245. ///公交站线路根据ID请求
  246. @interface AMapBusLineIDSearchRequest : AMapBusLineBaseSearchRequest
  247. ///唯一标识
  248. @property (nonatomic, copy) NSString *uid;
  249. @end
  250. ///公交站线路返回
  251. @interface AMapBusLineSearchResponse : AMapSearchObject
  252. ///返回公交站数目
  253. @property (nonatomic, assign) NSInteger count;
  254. ///关键字建议列表和城市建议列表
  255. @property (nonatomic, strong) AMapSuggestion *suggestion;
  256. ///公交线路数组,数组中存放 AMapBusLine 对象
  257. @property (nonatomic, strong) NSArray<AMapBusLine *> *buslines;
  258. @end
  259. #pragma mark - AMapDistrictSearchRequest
  260. ///行政区划查询请求
  261. @interface AMapDistrictSearchRequest : AMapSearchObject
  262. ///查询关键字,只支持单关键字搜索,全国范围
  263. @property (nonatomic, copy) NSString *keywords;
  264. ///是否返回边界坐标,默认NO
  265. @property (nonatomic, assign) BOOL requireExtension;
  266. ///是否显示商圈信息,默认NO。注:已废弃,行政区划搜索无商圈信息。
  267. @property (nonatomic, assign) BOOL showBusinessArea __attribute__((deprecated("已废弃, from 5.3.0")));;
  268. ///每页记录数, 范围1-50, [default = 20]
  269. @property (nonatomic, assign) NSInteger offset;
  270. ///当前页数, 范围1-100, [default = 1]
  271. @property (nonatomic, assign) NSInteger page;
  272. ///子区域层级,默认1。规则:设置显示下级行政区级数(行政区级别包括:国家、省/直辖市、市、区/县、乡镇/街道多级数据)可选值:0、1、2、3等数字,0-不返回下级行政区;1-返回下一级行政区;2-返回下两级行政区;3-返回下三级行政区
  273. @property (nonatomic, assign) NSInteger subdistrict;
  274. @end
  275. ///行政区划响应
  276. @interface AMapDistrictSearchResponse : AMapSearchObject
  277. ///返回数目
  278. @property (nonatomic, assign) NSInteger count;
  279. ///行政区域 AMapDistrict 数组
  280. @property (nonatomic, strong) NSArray<AMapDistrict *> *districts;
  281. @end
  282. #pragma mark - AMapRouteSearchBaseRequest
  283. ///路径规划基础类,不可直接调用
  284. @interface AMapRouteSearchBaseRequest : AMapSearchObject
  285. ///出发点
  286. @property (nonatomic, copy) AMapGeoPoint *origin;
  287. ///目的地
  288. @property (nonatomic, copy) AMapGeoPoint *destination;
  289. @end
  290. #pragma mark - AMapDrivingRouteSearchRequest
  291. ///驾车路径规划
  292. @interface AMapDrivingRouteSearchRequest : AMapRouteSearchBaseRequest
  293. /**
  294. 驾车导航策略,默认策略为0。
  295. 0,速度优先(时间);1,费用优先(不走收费路段的最快道路);2,距离优先;3,不走快速路;4,躲避拥堵;
  296. 5,多策略(同时使用速度优先、费用优先、距离优先三个策略计算路径),其中必须说明,就算使用三个策略算路,会根据路况不固定的返回一至三条路径规划信息;
  297. 6,不走高速;7,不走高速且避免收费;8,躲避收费和拥堵;9,不走高速且躲避收费和拥堵;
  298. 10,多备选,时间最短,距离最短,躲避拥堵(考虑路况);
  299. 11,多备选,时间最短,距离最短;
  300. 12,多备选,躲避拥堵(考虑路况);
  301. 13,多备选,不走高速;
  302. 14,多备选,费用优先;
  303. 15,多备选,躲避拥堵,不走高速(考虑路况);
  304. 16,多备选,费用有限,不走高速;
  305. 17,多备选,躲避拥堵,费用优先(考虑路况);
  306. 18,多备选,躲避拥堵,不走高速,费用优先(考虑路况);
  307. 19,多备选,高速优先;
  308. 20,多备选,高速优先,躲避拥堵(考虑路况)
  309. */
  310. @property (nonatomic, assign) NSInteger strategy;
  311. ///途经点 AMapGeoPoint 数组,最多支持16个途经点
  312. @property (nonatomic, copy) NSArray<AMapGeoPoint *> *waypoints;
  313. ///避让区域 AMapGeoPolygon 数组,最多支持100个避让区域,每个区域16个点
  314. @property (nonatomic, copy) NSArray<AMapGeoPolygon *> *avoidpolygons;
  315. ///避让道路名
  316. @property (nonatomic, copy) NSString *avoidroad;
  317. ///出发点 POI ID
  318. @property (nonatomic, copy) NSString *originId;
  319. ///目的地 POI ID
  320. @property (nonatomic, copy) NSString *destinationId;
  321. ///出发点POI类型编码
  322. @property (nonatomic, copy) NSString *origintype;
  323. ///目的地POI类型编码
  324. @property (nonatomic, copy) NSString *destinationtype;
  325. ///是否返回扩展信息,默认为 NO
  326. @property (nonatomic, assign) BOOL requireExtension;
  327. ///车牌省份,用汉字填入车牌省份缩写。用于判断是否限行
  328. @property (nonatomic, copy) NSString *plateProvince;
  329. ///车牌详情,填入除省份及标点之外的字母和数字(需大写)。用于判断是否限行。
  330. @property (nonatomic, copy) NSString *plateNumber;
  331. ///使用轮渡,0使用1不使用,默认为0使用
  332. @property (nonatomic, assign) NSInteger ferry;
  333. /**
  334. 驾车路径规划车辆类型,默认策略为0。
  335. 0:普通汽车(默认值);
  336. 1:纯电动车;
  337. 2:插电混动车
  338. */
  339. @property (nonatomic, assign) NSInteger cartype;
  340. ///规避道路类型,默认为AMapDrivingRouteExcludeTypeNone,仅海外生效
  341. @property (nonatomic, assign) AMapDrivingRouteExcludeType exclude;
  342. @end
  343. #pragma mark - AMapWalkingRouteSearchRequest
  344. ///步行路径规划
  345. @interface AMapWalkingRouteSearchRequest : AMapRouteSearchBaseRequest
  346. ///是否提供备选步行方案([default = 0])0-只提供一条步行方案; 1-提供备选步行方案(有可能无备选方案)
  347. @property (nonatomic, assign) NSInteger multipath __attribute__((deprecated("已废弃, from 5.0.0")));
  348. @end
  349. #pragma mark - AMapTransitRouteSearchRequest
  350. ///公交路径规划
  351. @interface AMapTransitRouteSearchRequest : AMapRouteSearchBaseRequest
  352. ///公交换乘策略([default = 0])\n 0-最快捷模式;\n 1-最经济模式;\n 2-最少换乘模式;\n 3-最少步行模式;\n 4-最舒适模式;\n 5-不乘地铁模式
  353. @property (nonatomic, assign) NSInteger strategy;
  354. ///城市, 必填
  355. @property (nonatomic, copy) NSString *city;
  356. ///目的城市, 跨城时需要填写,否则会出错
  357. @property (nonatomic, copy) NSString *destinationCity;
  358. ///是否包含夜班车,默认为 NO
  359. @property (nonatomic, assign) BOOL nightflag;
  360. ///是否返回扩展信息,默认为 NO
  361. @property (nonatomic, assign) BOOL requireExtension;
  362. @end
  363. #pragma mark - AMapRidingRouteSearchRequest
  364. ///骑行路径规划
  365. @interface AMapRidingRouteSearchRequest : AMapRouteSearchBaseRequest
  366. ///路径方案类型([default = 0])\n 0-推荐路线及最快路线综合\n 1-推荐路线\n 2-最快路线
  367. @property (nonatomic, assign) NSInteger type __attribute__((deprecated("已废弃, from 5.0.0")));
  368. ///是否返回扩展信息,默认为 NO (since 7.6.0)
  369. @property (nonatomic, assign) BOOL requireExtension;
  370. @end
  371. ///路径规划返回
  372. @interface AMapRouteSearchResponse : AMapSearchObject
  373. ///路径规划信息数目
  374. @property (nonatomic, assign) NSInteger count;
  375. ///路径规划信息
  376. @property (nonatomic, strong) AMapRoute *route;
  377. @end
  378. ///骑行路径规划返回
  379. @interface AMapRidingRouteSearchResponse : AMapRouteSearchResponse
  380. @end
  381. #pragma mark - AMapTruckRouteSearchRequest
  382. ///货车路径规划(since 6.1.0)
  383. @interface AMapTruckRouteSearchRequest : AMapRouteSearchBaseRequest
  384. /**
  385. 驾车导航策略,默认为策略1。
  386. 1,返回的结果考虑路况,尽量躲避拥堵而规划路径,与高德地图的“躲避拥堵”策略一致;
  387. 2,返回的结果不走高速,与高德地图“不走高速”策略一致;
  388. 3,返回的结果尽可能规划收费较低甚至免费的路径,与高德地图“避免收费”策略一致;
  389. 4,返回的结果考虑路况,尽量躲避拥堵而规划路径,并且不走高速,与高德地图的“躲避拥堵&不走高速”策略一致;
  390. 5,返回的结果尽量不走高速,并且尽量规划收费较低甚至免费的路径结果,与高德地图的“避免收费&不走高速”策略一致;
  391. 6,返回路径规划结果会尽量的躲避拥堵,并且规划收费较低甚至免费的路径结果,与高德地图的“躲避拥堵&避免收费”策略一致;
  392. 7,返回的结果尽量躲避拥堵,规划收费较低甚至免费的路径结果,并且尽量不走高速路,与高德地图的“避免拥堵&避免收费&不走高速”策略一致;
  393. 8,返回的结果会优先选择高速路,与高德地图的“高速优先”策略一致;
  394. 9,返回的结果会优先考虑高速路,并且会考虑路况躲避拥堵,与高德地图的“躲避拥堵&高速优先”策略一致。
  395. */
  396. @property (nonatomic, assign) NSInteger strategy;
  397. ///途经点 AMapGeoPoint 数组,最多支持16个途经点
  398. @property (nonatomic, copy) NSArray<AMapGeoPoint *> *waypoints;
  399. ///出发点 POI ID
  400. @property (nonatomic, copy) NSString *originId;
  401. ///目的地 POI ID
  402. @property (nonatomic, copy) NSString *destinationId;
  403. ///出发点POI类型编码
  404. @property (nonatomic, copy) NSString *origintype;
  405. ///目的地POI类型编码
  406. @property (nonatomic, copy) NSString *destinationtype;
  407. ///车牌省份,用汉字填入车牌省份缩写。用于判断是否限行
  408. @property (nonatomic, copy) NSString *plateProvince;
  409. ///车牌详情,填入除省份及标点之外的字母和数字(需大写)。用于判断是否限行。
  410. @property (nonatomic, copy) NSString *plateNumber;
  411. ///货车大小,默认为 轻型车(AMapTruckSizeTypeLight)
  412. @property (nonatomic, assign) AMapTruckSizeType size;
  413. ///车辆高度,单位米,取值[0 – 25.5]米,默认 1.6 米
  414. @property (nonatomic, assign) CGFloat height;
  415. ///车辆宽度,单位米,取值[0 – 25.5]米,默认 2.5 米
  416. @property (nonatomic, assign) CGFloat width;
  417. ///车辆总重,单位吨,取值[0 – 6553.5]吨,默认 0.9 吨
  418. @property (nonatomic, assign) CGFloat load;
  419. ///货车核定载重,单位吨,取值[0 – 6553.5]吨,默认 10 吨
  420. @property (nonatomic, assign) CGFloat weight;
  421. ///车辆轴数,单位个,取值[0 –255]个,默认 2个轴
  422. @property (nonatomic, assign) NSInteger axis;
  423. ///是否返回扩展信息,默认为 NO (since 7.6.0)
  424. @property (nonatomic, assign) BOOL requireExtension;
  425. @end
  426. #pragma mark - AMapDistanceSearchRequest
  427. ///距离查询请求(since 6.1.0)
  428. @interface AMapDistanceSearchRequest : AMapSearchObject
  429. ///起点坐标数组,最多支持100个点。
  430. @property (nonatomic, strong) NSArray<AMapGeoPoint *> *origins;
  431. ///终点坐标
  432. @property (nonatomic, strong) AMapGeoPoint *destination;
  433. ///路径计算的类型,当type为导航距离时,会考虑路况,故在不同时间请求返回结果可能不同;
  434. @property (nonatomic, assign) AMapDistanceSearchType type;
  435. ///驾车距离测量策略,参考驾车路径规划。仅当type为AMapDistanceSearchTypeDrive时有效,默认4
  436. @property (nonatomic, assign) NSInteger strategy;
  437. ///是否返回扩展信息,默认为 NO (since 7.6.0)
  438. @property (nonatomic, assign) BOOL requireExtension;
  439. @end
  440. ///距离查询结果(since 6.1.0)
  441. @interface AMapDistanceSearchResponse : AMapSearchObject
  442. ///距离查询结果 AMapDistanceResult 数组。
  443. @property (nonatomic, strong) NSArray<AMapDistanceResult *> *results;
  444. @end
  445. #pragma mark - AMapWeatherSearchRequest
  446. ///天气查询请求
  447. @interface AMapWeatherSearchRequest : AMapSearchObject
  448. ///城市名称,支持cityname及adcode
  449. @property (nonatomic, copy) NSString *city;
  450. ///气象类型,Live为实时天气,Forecast为后三天预报天气,默认为Live
  451. @property (nonatomic, assign) AMapWeatherType type;
  452. @end
  453. ///天气查询返回
  454. @interface AMapWeatherSearchResponse : AMapSearchObject
  455. ///实时天气数据信息 AMapLocalWeatherLive 数组,仅在请求实时天气时有返回。
  456. @property (nonatomic, strong) NSArray<AMapLocalWeatherLive *> *lives;
  457. ///预报天气数据信息 AMapLocalWeatherForecast 数组,仅在请求预报天气时有返回
  458. @property (nonatomic, strong) NSArray<AMapLocalWeatherForecast *> *forecasts;
  459. @end
  460. #pragma mark - AMapNearbySearchRequest
  461. ///附近搜索请求
  462. @interface AMapNearbySearchRequest : AMapSearchObject
  463. ///中心点坐标
  464. @property (nonatomic, copy) AMapGeoPoint *center;
  465. ///查询半径,范围:[0, 10000],单位:米 [default = 1000]
  466. @property (nonatomic, assign) NSInteger radius;
  467. ///搜索距离类型,默认为直线距离
  468. @property (nonatomic, assign) AMapNearbySearchType searchType;
  469. ///检索时间范围,超过24小时的数据无法返回,范围[5, 24*60*60] 单位:秒 [default = 1800]
  470. @property (nonatomic, assign) NSInteger timeRange;
  471. ///返回条数,范围[1, 100], 默认30
  472. @property (nonatomic, assign) NSInteger limit;
  473. @end
  474. ///附近搜索返回
  475. @interface AMapNearbySearchResponse : AMapSearchObject
  476. ///结果总条数
  477. @property (nonatomic, assign) NSInteger count;
  478. ///周边用户信息 AMapNearbyUserInfo 数组
  479. @property (nonatomic, strong) NSArray<AMapNearbyUserInfo *> *infos;
  480. @end
  481. #pragma mark - AMapCloudSearchBaseRequest
  482. ///企业地图搜索请求基类
  483. @interface AMapCloudSearchBaseRequest : AMapSearchObject
  484. ///要查询的表格ID, 必选
  485. @property (nonatomic, copy) NSString *tableID;
  486. ///筛选条件数组, 可选, 说明:\n 1.支持建立索引的字段根据多个条件筛选,多个条件用双&符号连接;\n 2.判断符合支持:>= 大于等于,<= 小于等于,>大于,<小于,= 精确匹配(text索引不可用);\n 3.示例规则:key1=value1&&key2=value2&&lastloctime>=1469817532,示例:"name=王师傅|张师傅&&lastloctime>=1469817532
  487. @property (nonatomic, strong) NSArray<NSString *> *filter;
  488. ///排序字段名, 可选.\n 说明:\n 1.支持按建立了排序筛选索引的整数或小数字段进行排序:sortFields = "字段名";\n 2.系统预设的字段(忽略sortType):_distance:坐标与中心点距离升序排序,仅在周边检索时有效(若其它请求使用会异常返回);_weight:权重降序排序,当存在keywords时有效;\n;
  489. @property (nonatomic, copy) NSString *sortFields;
  490. ///可选, 排序方式(默认升序)
  491. @property (nonatomic, assign) AMapCloudSortType sortType;
  492. ///可选, 每页记录数(每页最大记录数100, 默认20)
  493. @property (nonatomic, assign) NSInteger offset;
  494. ///可选, 当前页数(>=1, 默认1)
  495. @property (nonatomic, assign) NSInteger page;
  496. @end
  497. #pragma mark - AMapCloudPlaceAroundSearchRequest
  498. ///企业地图周边搜请求
  499. @interface AMapCloudPOIAroundSearchRequest : AMapCloudSearchBaseRequest
  500. ///必填,中心点坐标。
  501. @property (nonatomic, copy) AMapGeoPoint *center;
  502. ///可选,查询半径(默认值为3000),单位:米
  503. @property (nonatomic, assign) NSInteger radius;
  504. ///可选,搜索关键词。\n 说明:1. 只支持建立过文本索引的字段查询/n 2.支持关键字模糊检索,即对建立【文本索引字段】对应列内容进行模糊检索;如keywords=工商银行,检索返回已建立文本索引列值中包含“工商”或者“银行”或者“工商银行”关键字的POI结果集。/n 3.支持关键字多值模糊检索;如keywords=招商银行&&华夏银行&&工商银行,检索返回已建立索引列值中包含“招商银行”或者“华夏银行”或者“工商银行”的POI结果集,不会返回检索词切分后,如仅包含“招商”或者“银行”的POI集
  505. @property (nonatomic, copy) NSString *keywords;
  506. @end
  507. ///企业地图polygon区域查询请求
  508. @interface AMapCloudPOIPolygonSearchRequest : AMapCloudSearchBaseRequest
  509. ///必填,多边形。
  510. @property (nonatomic, copy) AMapGeoPolygon *polygon;
  511. ///可选,搜索关键词。\n 说明:1. 只支持建立过文本索引的字段查询/n 2.支持关键字模糊检索,即对建立【文本索引字段】对应列内容进行模糊检索;如keywords=工商银行,检索返回已建立文本索引列值中包含“工商”或者“银行”或者“工商银行”关键字的POI结果集。/n 3.支持关键字多值模糊检索;如keywords=招商银行&&华夏银行&&工商银行,检索返回已建立索引列值中包含“招商银行”或者“华夏银行”或者“工商银行”的POI结果集,不会返回检索词切分后,如仅包含“招商”或者“银行”的POI集
  512. @property (nonatomic, copy) NSString *keywords;
  513. @end
  514. ///企业地图ID查询请求
  515. @interface AMapCloudPOIIDSearchRequest : AMapCloudSearchBaseRequest
  516. ///必填,POI的ID
  517. @property (nonatomic, assign) NSInteger uid;
  518. @end
  519. ///企业地图本地查询请求
  520. @interface AMapCloudPOILocalSearchRequest : AMapCloudSearchBaseRequest
  521. ///可选,搜索关键词。\n 说明:1. 只支持建立过文本索引的字段查询/n 2.支持关键字模糊检索,即对建立【文本索引字段】对应列内容进行模糊检索;如keywords=工商银行,检索返回已建立文本索引列值中包含“工商”或者“银行”或者“工商银行”关键字的POI结果集。/n 3.支持关键字多值模糊检索;如keywords=招商银行&&华夏银行&&工商银行,检索返回已建立索引列值中包含“招商银行”或者“华夏银行”或者“工商银行”的POI结果集,不会返回检索词切分后,如仅包含“招商”或者“银行”的POI集
  522. @property (nonatomic, copy) NSString *keywords;
  523. ///必填,城市名称\n 说明:\n 1. 支持全国/省/市/区县行政区划范围的检索;\n 2. city = "全国",即对用户全表搜索;\n 3. 当city值设置非法或不正确时,按照 city = "全国"返回。
  524. @property (nonatomic, copy) NSString *city;
  525. @end
  526. ///企业地图搜索返回
  527. @interface AMapCloudPOISearchResponse : AMapSearchObject
  528. ///返回结果总数目
  529. @property (nonatomic, assign) NSInteger count;
  530. ///返回的结果, AMapCloudPOI 数组
  531. @property (nonatomic, strong) NSArray<AMapCloudPOI *> *POIs;
  532. @end
  533. #pragma mark - AMapShareSearchBaseRequest
  534. ///短串分享搜索请求基类, 请使用具体的子类。
  535. @interface AMapShareSearchBaseRequest : AMapSearchObject
  536. @end
  537. ///位置短串分享请求
  538. @interface AMapLocationShareSearchRequest : AMapShareSearchBaseRequest
  539. ///必填, 位置坐标
  540. @property (nonatomic, copy) AMapGeoPoint *location;
  541. ///位置名称,请不要包含【,%&@#】等特殊符号
  542. @property (nonatomic, copy) NSString *name;
  543. @end
  544. ///兴趣点短串分享请求
  545. @interface AMapPOIShareSearchRequest : AMapShareSearchBaseRequest
  546. ///POI的ID,如果有ID则指定POI,否则按name查询。
  547. @property (nonatomic, copy) NSString *uid;
  548. ///坐标
  549. @property (nonatomic, copy) AMapGeoPoint *location;
  550. ///名称,请不要包含【,%&@#】等特殊符号。
  551. @property (nonatomic, copy) NSString *name;
  552. ///地址,请不要包含【,%&@#】等特殊符号。
  553. @property (nonatomic, copy) NSString *address;
  554. @end
  555. ///路径规划短串分享请求
  556. @interface AMapRouteShareSearchRequest : AMapShareSearchBaseRequest
  557. ///默认为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 步行,无策略,均一样
  558. @property (nonatomic, assign) NSInteger strategy;
  559. ///Route的type,默认为0,超出范围为0.\n 0为驾车,\n 1为公交,\n 2为步行
  560. @property (nonatomic, assign) NSInteger type;
  561. ///起点坐标
  562. @property (nonatomic, copy) AMapGeoPoint *startCoordinate;
  563. ///终点坐标
  564. @property (nonatomic, copy) AMapGeoPoint *destinationCoordinate;
  565. ///起点名称,默认为“已选择的位置”,请不要包含【,%&@#】等特殊符号
  566. @property (nonatomic, copy) NSString *startName;
  567. ///终点名称,默认为“已选择的位置”,请不要包含【,%&@#】等特殊符号
  568. @property (nonatomic, copy) NSString *destinationName;
  569. @end
  570. ///导航短串分享请求
  571. @interface AMapNavigationShareSearchRequest : AMapShareSearchBaseRequest
  572. ///默认为0,超出范围为0\n 驾车:0-速度最快(时间);\n 1-避免收费(不走收费路段的最快道路);\n 2-距离优先;\n 3-不走高速;\n 4-结合实时交通(躲避拥堵);\n 5-不走高速且避免收费;\n 6-不走高速且躲避拥堵;\n 7-躲避收费和拥堵;\n 8-不走高速且躲避收费和拥堵
  573. @property (nonatomic, assign) NSInteger strategy;
  574. ///起点坐标,若跳转到高德地图,默认更换为定位坐标
  575. @property (nonatomic, copy) AMapGeoPoint *startCoordinate;
  576. ///终点坐标
  577. @property (nonatomic, copy) AMapGeoPoint *destinationCoordinate;
  578. @end
  579. ///导航短串分享响应
  580. @interface AMapShareSearchResponse : AMapSearchObject
  581. ///转换后的短串
  582. @property (nonatomic, copy) NSString *shareURL;
  583. @end
  584. ///未来路线规划(since 6.9.0)
  585. @interface AMapFutureRouteSearchRequest : AMapRouteSearchBaseRequest
  586. ///出发时间 单位为秒
  587. @property (nonatomic, copy) NSString *beginTime;
  588. ///时间间隔 单位为秒
  589. @property (nonatomic, assign) NSInteger interval;
  590. ///时间点个数,最多48个
  591. @property (nonatomic, assign) NSInteger timeCount;
  592. /**
  593. 未来路线规划策略,默认策略为0。
  594. 1,返回的结果考虑路况,尽量躲避拥堵而规划路径,与高德地图的“躲避拥堵”策略一致
  595. 2,返回的结果不走高速,与高德地图“不走高速”策略一致
  596. 3,返回的结果尽可能规划收费较低甚至免费的路径,与高德地图“避免收费”策略一致
  597. 4,返回的结果考虑路况,尽量躲避拥堵而规划路径,并且不走高速,与高德地图的“躲避拥堵&不走高速”策略一致
  598. 5,返回的结果尽量不走高速,并且尽量规划收费较低甚至免费的路径结果,与高德地图的“避免收费&不走高速”策略一致
  599. 6,返回路径规划结果会尽量的躲避拥堵,并且规划收费较低甚至免费的路径结果,与高德地图的“躲避拥堵&避免收费”策略一致
  600. 7,返回的结果尽量躲避拥堵,规划收费较低甚至免费的路径结果,并且尽量不走高速路,与高德地图的“避免拥堵&避免收费&不走高速”策略一致
  601. 8,返回的结果会优先选择高速路,与高德地图的“高速优先”策略一致
  602. 9,返回的结果会优先考虑高速路,并且会考虑路况躲避拥堵,与高德地图的“躲避拥堵&高速优先”策略一致
  603. 10,不考虑路况,返回速度最优、耗时最短的路线,但是此路线不一定距离最短
  604. 11,避让拥堵&速度优先&避免收费
  605. */
  606. @property (nonatomic, assign) NSInteger strategy;
  607. ///出发点 POI ID
  608. @property (nonatomic, copy) NSString *originId;
  609. ///目的地 POI ID
  610. @property (nonatomic, copy) NSString *destinationId;
  611. ///出发点POI类型编码
  612. @property (nonatomic, copy) NSString *origintype;
  613. ///目的地POI类型编码
  614. @property (nonatomic, copy) NSString *destinationtype;
  615. ///终点的父POI ID
  616. @property (nonatomic, copy) NSString *parentId;
  617. /////是否返回扩展信息,默认为 NO
  618. //@property (nonatomic, assign) BOOL requireExtension;
  619. ///车牌省份,用汉字填入车牌省份缩写。用于判断是否限行
  620. @property (nonatomic, copy) NSString *plateProvince;
  621. ///车牌详情,填入除省份及标点之外的字母和数字(需大写)。用于判断是否限行。
  622. @property (nonatomic, copy) NSString *plateNumber;
  623. /**
  624. 驾车路径规划车辆类型,默认策略为0。
  625. 0:普通汽车(默认值);
  626. 1:纯电动车;
  627. 2:插电混动车
  628. */
  629. @property (nonatomic, assign) NSInteger cartype;
  630. @end
  631. ///未来路线规划(since 6.9.0)
  632. @interface AMapFutureRouteSearchResponse : AMapSearchObject
  633. ///路径规划方案,只会返回AMapPath中的distance、totalTrafficLights、steps
  634. @property (nonatomic, strong) NSArray<AMapPath *> *paths;
  635. ///不同时间的规划以及信息列表
  636. @property (nonatomic, strong) NSArray<AMapFutureTimeInfo *> *timeInfos;
  637. @end