TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | May 2017 |
Maintained by crash_wu.
Depends on: | |
YYModel | >= 0 |
SGSHTTPModule | >= 0 |
SVProgressHUD | >= 0 |
地名地址搜索,周边搜索,公交站点搜索,公交路线搜索,公交站点坐标搜索,公交路线坐标搜索,驾车路线搜索等功能,高德驾车路线规划
To run the example project, clone the repo, and run pod install
from the Example directory first.
#import<SGRoutePlanAndAddress/SGRoutePlanAndAddress.h>
搜索地名地址数据
/**
* @author crash [email protected] , 16-09-28 15:09:49
*
* @brief 单例
*
* @return
*/
+(nonnull instancetype) sharedInstance;
/**
* @author crash [email protected] , 16-09-28 15:09:32
*
* @brief 地名地址查询
*
* @param searchModel 查询实体
* @param url 请求服务URL
* @param success 搜索成功block
* @param fail 搜索失败block
*/
-(void)changShaAddressService:(SGAddressSearchModel *_Nullable)searchModel
andUrl:(NSString *_Nullable)url
success:(nonnull void(^)(NSArray<SGAddressModel *> *_Nullable models))success
fail:(nonnull void (^)(NSError *_Nullable error))fail;
搜索公交路线信息
/**
* @author crash [email protected] , 16-09-27 15:09:55
*
* @brief 单例
*
* @return
*/
+(nonnull instancetype)sharedInstance;
/**
* @author crash [email protected] , 16-09-28 09:09:57
*
* @brief 公交路线搜索
*
* @param start 起点地址
* @param end 终点地址
* @param url 公交路线搜索URL
* @param success 搜索成功block
* @param fail 搜索失败block
*/
-(void)busLineService:(NSString *_Nullable) start
andEnd:(NSString *_Nullable) end
andURL:(NSString *_Nullable)url
success:(nonnull void(^)(NSArray<BusTravelsModel *> *_Nullable busLines))success
fail:(nonnull void(^)(NSError *_Nullable error))fail;
查询公交站点数据
/**
* @author crash [email protected] , 16-09-27 15:09:55
*
* @brief 单例
*
* @return
*/
+(nonnull instancetype)sharedInstance;
/**
* @author crash [email protected] , 16-09-27 15:09:21
*
* @brief 查询公交站点名称
*
* @param stopName 公交站点名称
* @param url 公交站点查询URL
* @param success 查询成功block
* @param fail 查询失败block
*/
-(void)busStopService:(NSString *_Nullable)stopName
andURL:(NSString *_Nullable)url
success:(nonnull void (^)(NSArray<NSString *> *_Nullable stopNames))success
fail:(nonnull void(^)(NSError *_Nullable error))fail;
查询该条路线的几何图形数据(AGSGraphic),该查询类由 AGSQueryTask 类发起查询,查询的URL为 ArcGIS 服务
/**
* @author crash [email protected] , 16-09-06 15:09:48
*
* @brief 单例
*
* @return
*/
+(nonnull instancetype) sharedInstance;
/**
* @author crash [email protected] , 16-10-11 10:10:56
*
* @brief 获取公交路线线路坐标
*
* @param starStop 起点站点
* @param endStop 终点站点
* @param travelsModel 公交路线实体
* @param url 服务地址(ArcGIS 服务)
* @param success 成功block
* @param failed 失败block
*/
-(void)busStopLine:(NSString *_Nonnull)starStop
andEndStop:(NSString *_Nonnull)endStop
andBusTravles:(BusTravelsModel *_Nullable)travelsModel
andURL:(NSString *_Nullable)url
succes:
(nonnull void (^)( NSArray<AGSGraphic *> *_Nullable graphics))success
failed:
(nonnull void(^)(NSError *_Nullable error))failed;
查询该条公交路线经过站点位置坐标,该查询类由 AGSQueryTask 类发起查询,查询的URL为 ArcGIS 服务
/**
* @author crash [email protected] , 16-09-06 15:09:48
*
* @brief 单例
*
* @return
*/
+(nonnull instancetype) sharedInstance;
/**
* @author crash [email protected] , 16-10-11 10:10:56
*
* @brief 获取公交路线途径站点经纬度
*
* @param starStop 起点站点
* @param endStop 终点站点
* @param travelsModel 公交路线实体
* @param url 获取公交路线途径站点经纬度服务URL(ArcGIS 服务)
* @param success 成功block
* @param failed 失败block
*/
-(void)busStopLocation:(NSString *_Nonnull)starStop
andEndStop:(NSString *_Nonnull)endStop
andBusTravles:(BusTravelsModel *_Nullable)
travelsModel andURL:(NSString *_Nullable)url
succes:
(nonnull void (^)( NSArray<AGSGraphic *> *_Nullable graphics))success
failed:
(nonnull void(^)(NSError *_Nullable error))failed;
查询驾车路线数据,提供一条合适的驾车路线,该查询类由 AGSRouteTask 类发起查询,查询的URL为 ArcGIS 服务
/**
* @author crash [email protected] , 16-09-22 16:09:47
*
* @brief 单例
*
* @return
*/
+(nonnull instancetype)sharedInstance;
/**
* @author crash [email protected] , 16-09-22 17:09:46
*
* @brief 驾车路线规划
*
* @param points 路线经过点
* @param url 驾车路线规划请求服务(ArcGIS 服务)
* @param success 请求成功
* @param fail 请求失败
*/
-(void)changShaRouteSearch:(NSArray<AGSPoint *> *_Nonnull)points
andURL:(NSString *_Nullable)url
success:(nullable void(^)(AGSRouteResult *_Nullable resut))success
fail:(nullable void(^) (NSError *_Nullable error) )fail;
查询某一个位置 周边地名地址数据,类同地名地址查询类 SGAddressServiceHandler
/**
* @author crash [email protected] , 16-09-28 15:09:32
*
* @brief 地名地址查询
*
* @param searchModel 周边查询实体
* @param url 请求URL
* @param success 搜索成功block
* @param fail 搜索失败block
*/
-(void)changShaSurroundAddressService:(SGSurroundAddressSearchModel *_Nullable)searchModel
andURL:(NSString *_Nullable) url
success:(nonnull void(^)(NSArray<SGAddressModel *> *_Nullable models))success
fail:(nonnull void (^)(NSError *_Nullable error))fail;
/**
* @author crash [email protected] , 16-09-28 15:09:49
*
* @brief 单例
*
* @return
*/
+(nonnull instancetype) sharedInstance;
/**
单例
*/
+(nonnull instancetype )sharedManager;
/**
高德地图路线规划
@param from 起点
@param to 终点
@param success 搜索成功
@param fail 搜索失败
*/
-(void)gdRoute:(AGSPoint *_Nonnull)from andTo:(AGSPoint *_Nonnull)to andSuccess:(nonnull void(^) (AGSMutablePolyline *_Nonnull polyline) ) success andFail:(nonnull void(^) (NSError *_Nullable error)) fail;
###SGAddressModel 地名地址查询结果/周边查询结果实体类
###SGAddressSearchModel 地名地址查询请求实体类
地名地址周边查询请求实体类
公交路线实体
公交路线方案信息实体(某一条公交路线方案,如: 503->502)
公交线路信息详情实体(如:502公交详情)
ArcGIS-Runtime-SDK-iOS for version 10.2.5
SGRoutePlanAndAddress is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SGRoutePlanAndAddress"
吴小星, [email protected]
SGRoutePlanAndAddress is available under the MIT license. See the LICENSE file for more info.