AMapCommonObj.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. //
  2. // AMapCommonObj.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 <UIKit/UIKit.h>
  11. #pragma mark - AMapSearchObject
  12. ///搜索SDK基础类, 通用数据结构和response支持copy和coding(since 4.4.1)。
  13. @interface AMapSearchObject : NSObject<NSCopying, NSCoding>
  14. /**
  15. * @brief 返回格式化的描述信息。通用数据结构和response类型有效。
  16. */
  17. - (NSString *)formattedDescription;
  18. @end
  19. #pragma mark - 通用数据结构
  20. ///经纬度, description中格式为 <经度,纬度>
  21. @interface AMapGeoPoint : AMapSearchObject
  22. ///纬度(垂直方向)
  23. @property (nonatomic, assign) CGFloat latitude;
  24. ///经度(水平方向)
  25. @property (nonatomic, assign) CGFloat longitude;
  26. /**
  27. * @brief 实例化一个AMapGeoPoint对象
  28. * @param lat 纬度
  29. * @param lon 经度
  30. */
  31. + (AMapGeoPoint *)locationWithLatitude:(CGFloat)lat longitude:(CGFloat)lon;
  32. @end
  33. ///多边形, 当传入两个点的时候,当做矩形处理:左下-右上两个顶点;其他情况视为多边形,几个点即为几边型。
  34. @interface AMapGeoPolygon : AMapSearchObject
  35. ///坐标集, AMapGeoPoint 数组
  36. @property (nonatomic, strong) NSArray<AMapGeoPoint *> *points;
  37. /**
  38. * @brief 实例化一个多边形对象
  39. * @param points 坐标集, AMapGeoPoint 数组
  40. */
  41. + (AMapGeoPolygon *)polygonWithPoints:(NSArray *)points;
  42. @end
  43. @class AMapDistrict;
  44. ///城市
  45. @interface AMapCity : AMapSearchObject
  46. ///城市名称
  47. @property (nonatomic, copy) NSString *city;
  48. ///城市编码
  49. @property (nonatomic, copy) NSString *citycode;
  50. ///城市区域编码
  51. @property (nonatomic, copy) NSString *adcode;
  52. ///此区域的建议结果数目, AMapSuggestion 中使用
  53. @property (nonatomic, assign) NSInteger num;
  54. ///途径区域 AMapDistrict 数组,AMepStep中使用,只有name和adcode。
  55. @property (nonatomic, strong) NSArray<AMapDistrict *> *districts;
  56. @end
  57. ///建议信息
  58. @interface AMapSuggestion : AMapSearchObject
  59. ///NSString 数组
  60. @property (nonatomic, strong) NSArray<NSString *> *keywords;
  61. ///AMapCity 数组
  62. @property (nonatomic, strong) NSArray<AMapCity *> *cities;
  63. @end
  64. #pragma mark - 输入提示
  65. ///输入提示
  66. @interface AMapTip : AMapSearchObject
  67. ///poi的id
  68. @property (nonatomic, copy) NSString *uid;
  69. ///名称
  70. @property (nonatomic, copy) NSString *name;
  71. ///区域编码
  72. @property (nonatomic, copy) NSString *adcode;
  73. ///所属区域
  74. @property (nonatomic, copy) NSString *district;
  75. ///地址
  76. @property (nonatomic, copy) NSString *address;
  77. ///位置
  78. @property (nonatomic, copy) AMapGeoPoint *location;
  79. ///类型码, since 4.5.0. 对应描述可下载参考官网文档 http://a.amap.com/lbs/static/zip/AMap_API_Table.zip。
  80. @property (nonatomic, copy) NSString *typecode;
  81. @end
  82. #pragma mark - POI
  83. ///POI图片信息
  84. @interface AMapImage : AMapSearchObject
  85. ///标题
  86. @property (nonatomic, copy) NSString *title;
  87. ///url
  88. @property (nonatomic, copy) NSString *url;
  89. @end
  90. ///POI扩展信息
  91. @interface AMapPOIExtension : AMapSearchObject
  92. ///评分
  93. @property (nonatomic, assign) CGFloat rating;
  94. ///人均消费
  95. @property (nonatomic, assign) CGFloat cost;
  96. ///营业时间
  97. @property (nonatomic, copy) NSString *openTime;
  98. @end
  99. ///POI室内地图信息
  100. @interface AMapIndoorData : AMapSearchObject
  101. ///楼层,为0时为POI本身
  102. @property (nonatomic, assign) NSInteger floor;
  103. ///楼层名称
  104. @property (nonatomic, copy) NSString *floorName;
  105. ///建筑物ID
  106. @property (nonatomic, copy) NSString *pid;
  107. @end
  108. ///子POI
  109. @interface AMapSubPOI : AMapSearchObject
  110. ///POI全局唯一ID
  111. @property (nonatomic, copy) NSString *uid;
  112. ///名称
  113. @property (nonatomic, copy) NSString *name;
  114. ///名称简写
  115. @property (nonatomic, copy) NSString *sname;
  116. ///经纬度
  117. @property (nonatomic, copy) AMapGeoPoint *location;
  118. ///地址
  119. @property (nonatomic, copy) NSString *address;
  120. ///距中心点距离
  121. @property (nonatomic, assign) NSInteger distance;
  122. ///子POI类型
  123. @property (nonatomic, copy) NSString *subtype;
  124. @end
  125. ///沿途POI
  126. @interface AMapRoutePOI : AMapSearchObject
  127. ///POI全局唯一ID
  128. @property (nonatomic, copy) NSString *uid;
  129. ///名称
  130. @property (nonatomic, copy) NSString *name;
  131. ///经纬度
  132. @property (nonatomic, copy) AMapGeoPoint *location;
  133. ///用户起点经过途经点再到终点的距离,单位是米
  134. @property (nonatomic, assign) NSInteger distance;
  135. ///用户起点经过途经点再到终点的时间,单位为秒
  136. @property (nonatomic, assign) NSInteger duration;
  137. @end
  138. ///POI
  139. @interface AMapPOI : AMapSearchObject
  140. ///POI全局唯一ID
  141. @property (nonatomic, copy) NSString *uid;
  142. ///名称
  143. @property (nonatomic, copy) NSString *name;
  144. ///兴趣点类型
  145. @property (nonatomic, copy) NSString *type;
  146. ///类型编码
  147. @property (nonatomic, copy) NSString *typecode;
  148. ///经纬度
  149. @property (nonatomic, copy) AMapGeoPoint *location;
  150. ///地址
  151. @property (nonatomic, copy) NSString *address;
  152. ///电话
  153. @property (nonatomic, copy) NSString *tel;
  154. ///距中心点的距离,单位米。在周边搜索时有效
  155. @property (nonatomic, assign) NSInteger distance;
  156. ///停车场类型,地上、地下、路边
  157. @property (nonatomic, copy) NSString *parkingType;
  158. ///商铺id
  159. @property (nonatomic, copy) NSString *shopID;
  160. ///邮编
  161. @property (nonatomic, copy) NSString *postcode;
  162. ///网址
  163. @property (nonatomic, copy) NSString *website;
  164. ///电子邮件
  165. @property (nonatomic, copy) NSString *email;
  166. ///省
  167. @property (nonatomic, copy) NSString *province;
  168. ///省编码
  169. @property (nonatomic, copy) NSString *pcode;
  170. ///城市名称
  171. @property (nonatomic, copy) NSString *city;
  172. ///城市编码
  173. @property (nonatomic, copy) NSString *citycode;
  174. ///区域名称
  175. @property (nonatomic, copy) NSString *district;
  176. ///区域编码
  177. @property (nonatomic, copy) NSString *adcode;
  178. ///地理格ID
  179. @property (nonatomic, copy) NSString *gridcode;
  180. ///入口经纬度
  181. @property (nonatomic, copy) AMapGeoPoint *enterLocation;
  182. ///出口经纬度
  183. @property (nonatomic, copy) AMapGeoPoint *exitLocation;
  184. ///方向
  185. @property (nonatomic, copy) NSString *direction;
  186. ///是否有室内地图
  187. @property (nonatomic, assign) BOOL hasIndoorMap;
  188. ///所在商圈
  189. @property (nonatomic, copy) NSString *businessArea;
  190. ///室内信息
  191. @property (nonatomic, strong) AMapIndoorData *indoorData;
  192. ///子POI列表
  193. @property (nonatomic, strong) NSArray<AMapSubPOI *> *subPOIs;
  194. ///图片列表
  195. @property (nonatomic, strong) NSArray<AMapImage *> *images;
  196. ///扩展信息只有在ID查询时有效
  197. @property (nonatomic, strong) AMapPOIExtension *extensionInfo;
  198. @end
  199. #pragma mark - 逆地理编码 && 地理编码
  200. ///兴趣区域
  201. @interface AMapAOI : AMapSearchObject
  202. ///AOI全局唯一ID
  203. @property (nonatomic, copy) NSString *uid;
  204. ///名称
  205. @property (nonatomic, copy) NSString *name;
  206. ///所在区域编码
  207. @property (nonatomic, copy) NSString *adcode;
  208. ///中心点经纬度
  209. @property (nonatomic, copy) AMapGeoPoint *location;
  210. ///面积,单位平方米
  211. @property (nonatomic, assign) CGFloat area;
  212. @end
  213. ///道路
  214. @interface AMapRoad : AMapSearchObject
  215. ///道路ID
  216. @property (nonatomic, copy) NSString *uid;
  217. ///道路名称
  218. @property (nonatomic, copy) NSString *name;
  219. ///距离(单位:米)
  220. @property (nonatomic, assign) NSInteger distance;
  221. ///方向
  222. @property (nonatomic, copy) NSString *direction;
  223. ///坐标点
  224. @property (nonatomic, copy) AMapGeoPoint *location;
  225. @end
  226. ///道路交叉口
  227. @interface AMapRoadInter : AMapSearchObject
  228. ///距离(单位:米)
  229. @property (nonatomic, assign) NSInteger distance;
  230. ///方向
  231. @property (nonatomic, copy) NSString *direction;
  232. ///经纬度
  233. @property (nonatomic, copy) AMapGeoPoint *location;
  234. ///第一条道路ID
  235. @property (nonatomic, copy) NSString *firstId;
  236. ///第一条道路名称
  237. @property (nonatomic, copy) NSString *firstName;
  238. ///第二条道路ID
  239. @property (nonatomic, copy) NSString *secondId;
  240. ///第二条道路名称
  241. @property (nonatomic, copy) NSString *secondName;
  242. @end
  243. ///门牌信息
  244. @interface AMapStreetNumber : AMapSearchObject
  245. ///街道名称
  246. @property (nonatomic, copy) NSString *street;
  247. ///门牌号
  248. @property (nonatomic, copy) NSString *number;
  249. ///坐标点
  250. @property (nonatomic, copy) AMapGeoPoint *location;
  251. ///距离(单位:米)
  252. @property (nonatomic, assign) NSInteger distance;
  253. ///方向
  254. @property (nonatomic, copy) NSString *direction;
  255. @end
  256. ///商圈
  257. @interface AMapBusinessArea : AMapSearchObject
  258. ///名称
  259. @property (nonatomic, strong) NSString *name;
  260. ///中心坐标
  261. @property (nonatomic, copy) AMapGeoPoint *location;
  262. @end
  263. ///地址组成要素
  264. @interface AMapAddressComponent : AMapSearchObject
  265. ///国家(since 5.7.0)
  266. @property (nonatomic, copy) NSString *country;
  267. ///省/直辖市
  268. @property (nonatomic, copy) NSString *province;
  269. ///市
  270. @property (nonatomic, copy) NSString *city;
  271. ///城市编码
  272. @property (nonatomic, copy) NSString *citycode;
  273. ///区
  274. @property (nonatomic, copy) NSString *district;
  275. ///区域编码
  276. @property (nonatomic, copy) NSString *adcode;
  277. ///乡镇街道
  278. @property (nonatomic, copy) NSString *township;
  279. ///乡镇街道编码
  280. @property (nonatomic, copy) NSString *towncode;
  281. ///社区
  282. @property (nonatomic, copy) NSString *neighborhood;
  283. ///建筑
  284. @property (nonatomic, copy) NSString *building;
  285. ///门牌信息
  286. @property (nonatomic, strong) AMapStreetNumber *streetNumber;
  287. ///商圈列表 AMapBusinessArea 数组
  288. @property (nonatomic, strong) NSArray<AMapBusinessArea *> *businessAreas;
  289. @end
  290. ///逆地理编码
  291. @interface AMapReGeocode : AMapSearchObject
  292. ///格式化地址
  293. @property (nonatomic, copy) NSString *formattedAddress;
  294. ///地址组成要素
  295. @property (nonatomic, strong) AMapAddressComponent *addressComponent;
  296. ///道路信息 AMapRoad 数组
  297. @property (nonatomic, strong) NSArray<AMapRoad *> *roads;
  298. ///道路路口信息 AMapRoadInter 数组
  299. @property (nonatomic, strong) NSArray<AMapRoadInter *> *roadinters;
  300. ///兴趣点信息 AMapPOI 数组
  301. @property (nonatomic, strong) NSArray<AMapPOI *> *pois;
  302. ///兴趣区域信息 AMapAOI 数组
  303. @property (nonatomic, strong) NSArray<AMapAOI *> *aois;
  304. @end
  305. ///地理编码
  306. @interface AMapGeocode : AMapSearchObject
  307. ///格式化地址
  308. @property (nonatomic, copy) NSString *formattedAddress;
  309. ///所在省/直辖市
  310. @property (nonatomic, copy) NSString *province;
  311. ///城市名
  312. @property (nonatomic, copy) NSString *city;
  313. ///城市编码
  314. @property (nonatomic, copy) NSString *citycode;
  315. ///区域名称
  316. @property (nonatomic, copy) NSString *district;
  317. ///区域编码
  318. @property (nonatomic, copy) NSString *adcode;
  319. ///乡镇街道
  320. @property (nonatomic, copy) NSString *township;
  321. ///社区
  322. @property (nonatomic, copy) NSString *neighborhood;
  323. ///楼
  324. @property (nonatomic, copy) NSString *building;
  325. ///坐标点
  326. @property (nonatomic, copy) AMapGeoPoint *location;
  327. ///匹配的等级
  328. @property (nonatomic, copy) NSString *level;
  329. @end
  330. #pragma mark - 公交查询
  331. @class AMapBusLine;
  332. ///公交站
  333. @interface AMapBusStop : AMapSearchObject
  334. ///公交站点ID
  335. @property (nonatomic, copy) NSString *uid;
  336. ///区域编码
  337. @property (nonatomic, copy) NSString *adcode;
  338. ///公交站名
  339. @property (nonatomic, copy) NSString *name;
  340. ///城市编码
  341. @property (nonatomic, copy) NSString *citycode;
  342. ///经纬度坐标
  343. @property (nonatomic, copy) AMapGeoPoint *location;
  344. ///途径此站的公交路线 AMapBusLine 数组
  345. @property (nonatomic, strong) NSArray<AMapBusLine *> *buslines;
  346. ///查询公交线路时的第几站
  347. @property (nonatomic, copy) NSString *sequence;
  348. @end
  349. ///公交线路
  350. @interface AMapBusLine : AMapSearchObject
  351. ///公交线路ID
  352. @property (nonatomic, copy) NSString *uid;
  353. ///公交类型
  354. @property (nonatomic, copy) NSString *type;
  355. ///公交线路名称
  356. @property (nonatomic, copy) NSString *name;
  357. ///坐标集合
  358. @property (nonatomic, copy) NSString *polyline;
  359. ///城市编码
  360. @property (nonatomic, copy) NSString *citycode;
  361. ///首发站
  362. @property (nonatomic, copy) NSString *startStop;
  363. ///终点站
  364. @property (nonatomic, copy) NSString *endStop;
  365. ///当查询公交站点时,返回的 AMapBusLine 中含有该字段
  366. @property (nonatomic, copy) AMapGeoPoint *location;
  367. ///首班车时间
  368. @property (nonatomic, copy) NSString *startTime;
  369. ///末班车时间
  370. @property (nonatomic, copy) NSString *endTime;
  371. ///所属公交公司
  372. @property (nonatomic, copy) NSString *company;
  373. ///距离。在公交线路查询时,该值为此线路的全程距离,单位为千米; 在公交路径规划时,该值为乘坐此路公交车的行驶距离,单位为米
  374. @property (nonatomic, assign) CGFloat distance;
  375. ///起步价
  376. @property (nonatomic, assign) CGFloat basicPrice;
  377. ///全程票价
  378. @property (nonatomic, assign) CGFloat totalPrice;
  379. ///矩形区域左下、右上顶点坐标
  380. @property (nonatomic, copy) AMapGeoPolygon *bounds;
  381. ///本线路公交站 AMapBusStop 数组
  382. @property (nonatomic, strong) NSArray<AMapBusStop *> *busStops;
  383. ///起程站
  384. @property (nonatomic, strong) AMapBusStop *departureStop;
  385. ///下车站
  386. @property (nonatomic, strong) AMapBusStop *arrivalStop;
  387. ///途径公交站 AMapBusStop 数组
  388. @property (nonatomic, strong) NSArray<AMapBusStop *> *viaBusStops;
  389. ///预计行驶时间(单位:秒)
  390. @property (nonatomic, assign) NSInteger duration;
  391. @end
  392. #pragma mark - 行政区划
  393. ///行政区划
  394. @interface AMapDistrict : AMapSearchObject
  395. ///区域编码
  396. @property (nonatomic, copy) NSString *adcode;
  397. ///城市编码
  398. @property (nonatomic, copy) NSString *citycode;
  399. ///行政区名称
  400. @property (nonatomic, copy) NSString *name;
  401. ///级别
  402. @property (nonatomic, copy) NSString *level;
  403. ///城市中心点
  404. @property (nonatomic, copy) AMapGeoPoint *center;
  405. ///下级行政区域数组
  406. @property (nonatomic, strong) NSArray<AMapDistrict *> *districts;
  407. ///行政区边界坐标点, NSString 数组
  408. @property (nonatomic, strong) NSArray<NSString *> *polylines;
  409. @end
  410. #pragma mark - 路径规划
  411. ///实时路况信息
  412. @interface AMapTMC : AMapSearchObject
  413. ///长度(单位:米)
  414. @property (nonatomic, assign) NSInteger distance;
  415. ///路况状态描述:0 未知,1 畅通,2 缓行,3 拥堵,4 严重拥堵
  416. @property (nonatomic, copy) NSString *status;
  417. ///此路段坐标点串
  418. @property (nonatomic, copy) NSString *polyline;
  419. @end
  420. ///路段基本信息
  421. @interface AMapStep : AMapSearchObject
  422. ///行走指示
  423. @property (nonatomic, copy) NSString *instruction;
  424. ///方向
  425. @property (nonatomic, copy) NSString *orientation;
  426. ///道路名称
  427. @property (nonatomic, copy) NSString *road;
  428. ///此路段长度(单位:米)
  429. @property (nonatomic, assign) NSInteger distance;
  430. ///此路段预计耗时(单位:秒)
  431. @property (nonatomic, assign) NSInteger duration;
  432. ///此路段坐标点串
  433. @property (nonatomic, copy) NSString *polyline;
  434. ///导航主要动作
  435. @property (nonatomic, copy) NSString *action;
  436. ///导航辅助动作
  437. @property (nonatomic, copy) NSString *assistantAction;
  438. ///此段收费(单位:元)
  439. @property (nonatomic, assign) CGFloat tolls;
  440. ///收费路段长度(单位:米)
  441. @property (nonatomic, assign) NSInteger tollDistance;
  442. ///主要收费路段
  443. @property (nonatomic, copy) NSString *tollRoad;
  444. ///途径城市 AMapCity 数组,只有驾车路径规划时有效
  445. @property (nonatomic, strong) NSArray<AMapCity *> *cities;
  446. ///路况信息数组,只有驾车路径规划时有效
  447. @property (nonatomic, strong) NSArray<AMapTMC *> *tmcs;
  448. @end
  449. ///步行、骑行、驾车方案
  450. @interface AMapPath : AMapSearchObject
  451. ///起点和终点的距离
  452. @property (nonatomic, assign) NSInteger distance;
  453. ///预计耗时(单位:秒)
  454. @property (nonatomic, assign) NSInteger duration;
  455. ///导航策略
  456. @property (nonatomic, copy) NSString *strategy;
  457. ///导航路段 AMapStep 数组
  458. @property (nonatomic, strong) NSArray<AMapStep *> *steps;
  459. ///此方案费用(单位:元)
  460. @property (nonatomic, assign) CGFloat tolls;
  461. ///此方案收费路段长度(单位:米)
  462. @property (nonatomic, assign) NSInteger tollDistance;
  463. ///此方案交通信号灯个数
  464. @property (nonatomic, assign) NSInteger totalTrafficLights;
  465. /**
  466. 限行信息,仅在驾车和货车路径规划时有效。(since 6.0.0)
  467. 驾车路径规划时:
  468. 0 代表限行已规避或未限行; 1 代表限行无法规避。
  469. 货车路径规划时:
  470. 0,未知(未输入完整/正确车牌号信息时候显示)
  471. 1,已规避限行
  472. 2,起点限行
  473. 3,途径点在限行区域内(设置途径点才出现此报错)
  474. 4,途径限行区域
  475. 5,终点限行
  476. */
  477. @property (nonatomic, assign) NSInteger restriction;
  478. @end
  479. ///步行换乘信息
  480. @interface AMapWalking : AMapSearchObject
  481. ///起点坐标
  482. @property (nonatomic, copy) AMapGeoPoint *origin;
  483. ///终点坐标
  484. @property (nonatomic, copy) AMapGeoPoint *destination;
  485. ///起点和终点的步行距离
  486. @property (nonatomic, assign) NSInteger distance;
  487. ///步行预计时间
  488. @property (nonatomic, assign) NSInteger duration;
  489. ///步行路段 AMapStep 数组
  490. @property (nonatomic, strong) NSArray<AMapStep *> *steps;
  491. @end
  492. ///出租车信息
  493. @interface AMapTaxi : AMapSearchObject
  494. ///起点坐标
  495. @property (nonatomic, copy) AMapGeoPoint *origin;
  496. ///终点坐标
  497. @property (nonatomic, copy) AMapGeoPoint *destination;
  498. ///距离,单位米
  499. @property (nonatomic, assign) NSInteger distance;
  500. ///耗时,单位秒
  501. @property (nonatomic, assign) NSInteger duration;
  502. ///起点名称
  503. @property (nonatomic, copy) NSString *sname;
  504. ///终点名称
  505. @property (nonatomic, copy) NSString *tname;
  506. @end
  507. ///火车站
  508. @interface AMapRailwayStation : AMapSearchObject
  509. ///火车站ID
  510. @property (nonatomic, copy) NSString *uid;
  511. ///名称
  512. @property (nonatomic, copy) NSString *name;
  513. ///经纬度坐标
  514. @property (nonatomic, copy) AMapGeoPoint *location;
  515. ///区域编码
  516. @property (nonatomic, copy) NSString *adcode;
  517. ///发车、到站时间,途径站时则为进站时间
  518. @property (nonatomic, copy) NSString *time;
  519. ///途径站点的停靠时间,单位为分钟
  520. @property (nonatomic, assign) NSInteger wait;
  521. ///是否是始发站,为出发站时有效
  522. @property (nonatomic, assign) BOOL isStart;
  523. ///是否是终点站,为到达站时有效
  524. @property (nonatomic, assign) BOOL isEnd;
  525. @end
  526. ///火车仓位及价格信息
  527. @interface AMapRailwaySpace : AMapSearchObject
  528. ///类型,硬卧、硬座等
  529. @property (nonatomic, copy) NSString *code;
  530. ///票价,单位元
  531. @property (nonatomic, assign) CGFloat cost;
  532. @end
  533. ///火车信息
  534. @interface AMapRailway : AMapSearchObject
  535. ///火车线路ID
  536. @property (nonatomic, copy) NSString *uid;
  537. ///名称
  538. @property (nonatomic, copy) NSString *name;
  539. ///车次
  540. @property (nonatomic, copy) NSString *trip;
  541. ///类型
  542. @property (nonatomic, copy) NSString *type;
  543. ///该换乘段行车总距离,单位为米
  544. @property (nonatomic, assign) NSInteger distance;
  545. ///该线路车段耗时,单位为秒
  546. @property (nonatomic, assign) NSInteger time;
  547. ///出发站
  548. @property (nonatomic, strong) AMapRailwayStation *departureStation;
  549. ///到达站
  550. @property (nonatomic, strong) AMapRailwayStation *arrivalStation;
  551. ///仓位及价格信息
  552. @property (nonatomic, strong) NSArray<AMapRailwaySpace *> *spaces;
  553. ///途径站点信息
  554. @property (nonatomic, strong) NSArray<AMapRailwayStation *> *viaStops;
  555. ///备选路线信息, 目前只有id和name
  556. @property (nonatomic, strong) NSArray<AMapRailway *> *alters;
  557. @end
  558. ///公交换乘路段,如果walking和buslines同时有值,则是先walking后buslines
  559. @interface AMapSegment : AMapSearchObject
  560. ///此路段步行导航信息
  561. @property (nonatomic, strong) AMapWalking *walking;
  562. ///此路段可供选择的不同公交线路 AMapBusLine 数组
  563. @property (nonatomic, strong) NSArray<AMapBusLine *> *buslines;
  564. ///出租车信息,跨城时有效
  565. @property (nonatomic, strong) AMapTaxi *taxi;
  566. ///火车信息,跨城时有效
  567. @property (nonatomic, strong) AMapRailway *railway;
  568. ///入口名称
  569. @property (nonatomic, copy) NSString *enterName;
  570. ///入口经纬度
  571. @property (nonatomic, copy) AMapGeoPoint *enterLocation;
  572. ///出口名称
  573. @property (nonatomic, copy) NSString *exitName;
  574. ///出口经纬度
  575. @property (nonatomic, copy) AMapGeoPoint *exitLocation;
  576. @end
  577. ///公交方案
  578. @interface AMapTransit : AMapSearchObject
  579. ///此公交方案价格(单位:元)
  580. @property (nonatomic, assign) CGFloat cost;
  581. ///此换乘方案预期时间(单位:秒)
  582. @property (nonatomic, assign) NSInteger duration;
  583. ///是否是夜班车
  584. @property (nonatomic, assign) BOOL nightflag;
  585. ///此方案总步行距离(单位:米)
  586. @property (nonatomic, assign) NSInteger walkingDistance;
  587. ///换乘路段 AMapSegment 数组
  588. @property (nonatomic, strong) NSArray<AMapSegment *> *segments;
  589. ///当前方案的总距离
  590. @property (nonatomic, assign) NSInteger distance;
  591. @end
  592. ///路径规划信息
  593. @interface AMapRoute : AMapSearchObject
  594. ///起点坐标
  595. @property (nonatomic, copy) AMapGeoPoint *origin;
  596. ///终点坐标
  597. @property (nonatomic, copy) AMapGeoPoint *destination;
  598. ///出租车费用(单位:元)
  599. @property (nonatomic, assign) CGFloat taxiCost;
  600. ///步行、骑行、驾车方案列表 AMapPath 数组
  601. @property (nonatomic, strong) NSArray<AMapPath *> *paths;
  602. ///公交换乘方案列表 AMapTransit 数组
  603. @property (nonatomic, strong) NSArray<AMapTransit *> *transits;
  604. @end
  605. ///距离测量结果
  606. @interface AMapDistanceResult : AMapSearchObject
  607. ///起点坐标,起点坐标序列号(从1开始)
  608. @property (nonatomic, assign) NSInteger originID;
  609. ///终点坐标,终点坐标序列号(从1开始)
  610. @property (nonatomic, assign) NSInteger destID;
  611. ///路径距离,单位:米
  612. @property (nonatomic, assign) NSInteger distance;
  613. ///预计行驶时间,单位:秒
  614. @property (nonatomic, assign) NSInteger duration;
  615. ///错误信息,建议用此字段判断请求是否成功
  616. @property (nonatomic, copy) NSString *info;
  617. ///在驾车模式下有效。默认为0;1:指定地点之间没有可以行车的道路;2:起点/终点 距离所有道路均距离过远(例如在海洋/矿业);3;起点/终点不在中国境内;
  618. @property (nonatomic, assign) NSInteger code;
  619. @end
  620. #pragma mark - 天气查询
  621. ///实况天气,仅支持中国部分地区数据(台湾省目前没有数据)返回
  622. @interface AMapLocalWeatherLive : AMapSearchObject
  623. ///区域编码
  624. @property (nonatomic, copy) NSString *adcode;
  625. ///省份名
  626. @property (nonatomic, copy) NSString *province;
  627. ///城市名
  628. @property (nonatomic, copy) NSString *city;
  629. ///天气现象
  630. @property (nonatomic, copy) NSString *weather;
  631. ///实时温度
  632. @property (nonatomic, copy) NSString *temperature;
  633. ///风向
  634. @property (nonatomic, copy) NSString *windDirection;
  635. ///风力,单位:级
  636. @property (nonatomic, copy) NSString *windPower;
  637. ///空气湿度
  638. @property (nonatomic, copy) NSString *humidity;
  639. ///数据发布时间
  640. @property (nonatomic, copy) NSString *reportTime;
  641. @end
  642. ///某一天的天气预报信息
  643. @interface AMapLocalDayWeatherForecast : AMapSearchObject
  644. ///日期
  645. @property (nonatomic, copy) NSString *date;
  646. ///星期
  647. @property (nonatomic, copy) NSString *week;
  648. ///白天天气现象
  649. @property (nonatomic, copy) NSString *dayWeather;
  650. ///晚上天气现象
  651. @property (nonatomic, copy) NSString *nightWeather;
  652. ///白天温度
  653. @property (nonatomic, copy) NSString *dayTemp;
  654. ///晚上温度
  655. @property (nonatomic, copy) NSString *nightTemp;
  656. ///白天风向
  657. @property (nonatomic, copy) NSString *dayWind;
  658. ///晚上风向
  659. @property (nonatomic, copy) NSString *nightWind;
  660. ///白天风力
  661. @property (nonatomic, copy) NSString *dayPower;
  662. ///晚上风力
  663. @property (nonatomic, copy) NSString *nightPower;
  664. @end
  665. ///天气预报类,支持当前时间在内的3天的天气进行预报
  666. @interface AMapLocalWeatherForecast : AMapSearchObject
  667. ///区域编码
  668. @property (nonatomic, copy) NSString *adcode;
  669. ///省份名
  670. @property (nonatomic, copy) NSString *province;
  671. ///城市名
  672. @property (nonatomic, copy) NSString *city;
  673. ///数据发布时间
  674. @property (nonatomic, copy) NSString *reportTime;
  675. ///天气预报AMapLocalDayWeatherForecast数组
  676. @property (nonatomic, strong) NSArray<AMapLocalDayWeatherForecast *> *casts;
  677. @end
  678. #pragma mark - 附近搜索
  679. ///附近搜索返回的用户信息
  680. @interface AMapNearbyUserInfo : AMapSearchObject
  681. ///用户ID
  682. @property (nonatomic, copy) NSString *userID;
  683. ///最后更新位置
  684. @property (nonatomic, copy) AMapGeoPoint *location;
  685. ///与搜索点的距离,由搜索时searchType决定
  686. @property (nonatomic, assign) CGFloat distance;
  687. ///最后更新的时间戳,单位秒
  688. @property (nonatomic, assign) NSTimeInterval updatetime;
  689. @end
  690. #pragma mark - 交通态势
  691. ///道路路况评价 since 5.1.0
  692. @interface AMapTrafficEvaluation : AMapSearchObject
  693. ///综述
  694. @property (nonatomic, copy) NSString *evaluationDescription;
  695. ///0:未知;1:畅通;2:缓行;3:拥堵
  696. @property (nonatomic, assign) NSInteger status;
  697. ///畅通所占百分比
  698. @property (nonatomic, copy) NSString *expedite;
  699. ///缓行所占百分比
  700. @property (nonatomic, copy) NSString *congested;
  701. ///拥堵所占百分比
  702. @property (nonatomic, copy) NSString *blocked;
  703. ///未知路段所占百分比
  704. @property (nonatomic, copy) NSString *unknown;
  705. @end
  706. ///道路路况返回的道路信息 since 5.1.0
  707. @interface AMapTrafficRoad : AMapSearchObject
  708. ///道路名称
  709. @property (nonatomic, copy) NSString *name;
  710. ///0:未知;1:畅通;2:缓行;3:拥堵
  711. @property (nonatomic, assign) NSInteger status;
  712. ///方向描述
  713. @property (nonatomic, copy) NSString *direction;
  714. ///车行角度,判断道路正反向使用。 以正东方向为0度,逆时针方向为正,取值范围:[0,360]
  715. @property (nonatomic, assign) float angle;
  716. ///速度 单位:千米/小时
  717. @property (nonatomic, assign) float speed;
  718. ///道路坐标集,经度和纬度使用","分隔,坐标之间使用";"分隔。例如:x1,y1;x2,y2
  719. @property (nonatomic, copy) NSString *polyline;
  720. @end
  721. ///道路路况信息 since 5.1.0
  722. @interface AMapTrafficInfo : AMapSearchObject
  723. ///路况综述
  724. @property (nonatomic, copy) NSString *statusDescription;
  725. ///路况评价
  726. @property (nonatomic, strong) AMapTrafficEvaluation *evaluation;
  727. ///道路信息
  728. @property (nonatomic, strong) NSArray<AMapTrafficRoad*>* roads;
  729. @end
  730. #pragma mark - 云图基础数据类型
  731. ///POI点的图片信息
  732. @interface AMapCloudImage : AMapSearchObject
  733. ///图片的id标识
  734. @property (nonatomic, copy) NSString *uid;
  735. ///图片压缩后的url串
  736. @property (nonatomic, copy) NSString *preurl;
  737. ///图片原始的url
  738. @property (nonatomic, copy) NSString *url;
  739. @end
  740. ///POI信息
  741. @interface AMapCloudPOI : AMapSearchObject
  742. ///唯一标识
  743. @property (nonatomic, assign) NSInteger uid;
  744. ///名称
  745. @property (nonatomic, copy) NSString *name;
  746. ///坐标位置
  747. @property (nonatomic, copy) AMapGeoPoint *location;
  748. ///地址
  749. @property (nonatomic, copy) NSString *address;
  750. ///用户自定义字段
  751. @property (nonatomic, strong) NSDictionary *customFields;
  752. ///创建时间
  753. @property (nonatomic, copy) NSString *createTime;
  754. ///更新时间
  755. @property (nonatomic, copy) NSString *updateTime;
  756. ///离当前位置的距离(只在云图周边搜索时有效)
  757. @property (nonatomic, assign) NSInteger distance;
  758. ///图片信息
  759. @property (nonatomic, strong) NSArray<AMapCloudImage *> *images;
  760. @end