Latest 0.0.2
Homepage https://github.com/crash-wu/SGRoutePlan_OC
License MIT
Platforms ios 8.0
Dependencies YYModel
Authors

CI Status
Version
License
Platform

Author

吴小星, [email protected]

Describe

天地图POI搜索,公交路线搜索,驾车路线搜索,逆地址编码 等服务工具。集成了在地图上展示POI搜索结果(显示大头针),展示公交规划路线,驾车规划路线等功能

Usage

#import <SGRoutePlan_OC/SGRoutePlanHeader.h>
//在项目中引入头文件

SGRoutePlanService

/**
 *  @author crash         [email protected]   , 16-08-26 15:08:22
 *
 *  @brief  单例
 *
 */
+(nonnull instancetype) shareInstance;

/**
*  @author crash         [email protected]   , 16-08-26 11:08:49
*
*  @brief  天地图POI搜索
*
*  @param keyWordEntity 搜索类型实体
*  @param success       搜索成功返回Block
*  @param failed        失败block
*/
-(void)poiSearch:
(nullable TdtPOISearchKeyWord *)keyWordEntity success:
(nonnull void(^) (NSArray<TdtPOIResult *> *_Nullable array ))success failed:
(nonnull FailedBlock)failed;

/**
 *  @author crash         [email protected]   , 16-03-17 11:03:18
 *
 *  @brief  驾车路线规划

 *  @param driverEntity 驾车路线请求参数实体
 *  @param success      路线请求成功bolck
 *  @param fail         路线请求失败bolck
 */
-(void)carLineSearch :
(nullable CarLineSearch *)driverEntity success:
(nonnull void( ^)(CarLine * _Nullable array))success andFail:
(nonnull FailedBlock)fail;

/**
 *  @author crash         [email protected]   , 16-08-26 11:08:33
 *
 *  @brief  天地图公交路线查询
 *
 *  @param entity  公交路线请求参数实体
 *  @param success 路线请求成功bolck
 *  @param failed  路线请求失败bolck
 */
-(void)busLineSearch:
(nullable BusLineSearch *)entity success:
(nonnull void(^) (NSArray<BusLine *> * _Nullable carline ))success failed:
(nonnull FailedBlock)failed;

/**
 *  @author crash         [email protected]   , 16-09-01 11:09:44
 *
 *  @brief  逆地址编码
 *
 *  @param key    逆地址编码请求实体
 *  @param fail   请求成功返回bolck
 *  @param failed 请求失败返回bolck
 */
-(void)getCode:(ReverseAddressSearchKeyword *)entity success:(void (^)(ReverseAddress * address))success fail:(nonnull FailedBlock)failed;

SGRoutePlanService

该类提供在地图上展示POI搜索结果(大头针),公交路线,驾车路线等相关功能。

/**
 *  @author crash         [email protected]   , 16-08-26 14:08:34
 *
 *  @brief  单例
 *
 */
+(nonnull instancetype) sharedInstance;

/**
 *  @author crash         [email protected]   , 16-08-31 17:08:34
 *
 *  @brief  清除天地图poi搜索结果展示图层
 *
 *  @param mapView 当前地图
 */
-(void)clearPOIResultLayer:(nonnull AGSMapView *)mapView;

/**
 *  @author crash         [email protected]   , 16-08-31 17:08:32
 *
 *  @brief  移除驾车路线图层或者公交路线图层
 *
 *  @param mapView 地图
 */
-(void)clearLineLayer:(nonnull AGSMapView *)mapView;

/**
 *  @author crash         [email protected]   , 16-08-31 17:08:57
 *
 *  @brief  清除天地图POI搜索结果高亮显示图层(或者 清除单个坐标点添加显示大头针图层)
 *
 *  @param mapView 当前地图
 */
-(void)clearHighlightLayer:(nonnull AGSMapView *)mapView;

/**
 *  @author crash         [email protected]   , 16-08-26 14:08:32
 *
 *  @brief  获取当前地图左上角,右下角坐标(xmin,ymin,xmax,ymax)
 *
 *  @param mapView 地图
 *
 *  @return 返回地图的左上角坐标,与右下角坐标(xmin,ymin,xmax,ymax)
 */
-(NSString *_Nullable) getMapBound:(nonnull AGSMapView * )mapView;

/**
 *  @author crash         [email protected]   , 16-08-31 14:08:03
 *
 *  @brief  在地图页面上,以大头针形式展示天地图POI搜索数据
 *
 *  @param pois      天地图POI搜索结果数组
 *  @param mapview   地图
 *  @param imageName 大头针图标名称
 */
-(void) showPOIResultsLayer:
(nullable NSArray<TdtPOIResult *> *) pois andMapView:
(nonnull AGSMapView *) mapview andImageName:
(nullable NSString  *)imageName;

/**
 *  @author crash         [email protected]   , 16-08-31 15:08:13
 *
 *  @brief  高亮显示天地图POI搜索结果
 *
 *  @param poi       天地图POI搜索数据
 *  @param mapView   地图
 *  @param imageName 图标名称
 */
-(void)showHighlightLayer:
(nonnull TdtPOIResult *)poi andMapView:
(nonnull AGSMapView *)mapView andImageName :
(nonnull NSString *) imageName;

/**
 绘制公交路线图

 :param: busLine        公公交线路实体

 :param: mapView        地图

 :param: lineColor      线路颜色

 :param: startImageName 起点图标名称

 :param: endImageName   终点图标名称
 */

-(void)drawBusLine:
(nonnull BusLine *)buseLine andMapView:
(nonnull AGSMapView *)mapView andColor:
(nonnull UIColor *)lineColor andStartImage:
(nonnull NSString *)startImageName andEndImage:
(nonnull NSString *)endImageName;

/**
 *  @author crash         [email protected]   , 16-08-31 17:08:44
 *
 *  @brief  绘制驾车路线
 *
 *  @param carline        驾车路线实体
 *  @param mapView        地图
 *  @param lineColor      路线颜色
 *  @param startImageName 起点图标名称
 *  @param endImageName   终点图标名称
 */
-(void)drawDriveLine:
(nonnull CarLine *)carline andMapView:
(nonnull AGSMapView *)mapView andColor:
(nonnull UIColor *)lineColor andStartImage:
(nonnull NSString *)startImageName andEndImage:
(nonnull NSString *)endImageName;

/**
 *  @author crash         [email protected]   , 16-08-31 17:08:45
 *
 *  @brief 将地图缩放到第10级
 *
 *  @param mapView 地图
 */
-(void)zoomTo10Level:(nonnull AGSMapView *)mapView;

BusLine

天地图公交路线实体

TdtPOIResult

天地图POI搜索结果实体

TdtPOISearchKeyword

天地图POI搜索请求参数

BusLineSearch

天地图公交路线请求参数

CarLineSearch

天地图驾车规划请求参数

CarLine

天地图驾车路线实体

ReverseAddressSearchKeyword

逆地址编码搜索请求实体

ReverseAddress

逆地址搜索结果实体(依据经纬度坐标查找位置信息)

注意

公交节点,驾车路线节点详情请查看Swift 版本

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

ArcGIS-Runtime-SDK-iOS for version 10.2.5

Installation

SGRoutePlan_OC is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "SGRoutePlan_OC"

License

SGRoutePlan_OC is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SGRoutePlan_OC",
    "version": "0.0.2",
    "summary": "u5929u5730u56fePOIu641cu7d22uff0cu516cu4ea4u8defu7ebfu641cu7d22uff0cu9a7eu8f66u8defu7ebfu641cu7d22,u9006u5730u5740u7f16u7801u7b49u670du52a1u5de5u5177.",
    "description": "u5929u5730u56fePOIu641cu7d22uff0cu516cu4ea4u8defu7ebfu641cu7d22uff0cu9a7eu8f66u8defu7ebfu641cu7d22,u9006u5730u5740u7f16u7801 u7b49u670du52a1u5de5u5177u3002u96c6u6210u4e86u5728u5730u56feu4e0au5c55u793aPOIu641cu7d22u7ed3u679c(u663eu793au5927u5934u9488)uff0cu5c55u793au516cu4ea4u89c4u5212u8defu7ebfuff0cu9a7eu8f66u89c4u5212u8defu7ebfu7b49u529fu80fd",
    "homepage": "https://github.com/crash-wu/SGRoutePlan_OC",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u5434u5c0fu661f": "[email protected]"
    },
    "source": {
        "git": "https://github.com/crash-wu/SGRoutePlan_OC.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SGRoutePlan_OC/Classes/**/*",
    "dependencies": {
        "YYModel": []
    },
    "xcconfig": {
        "FRAMEWORK_SEARCH_PATHS": "$(HOME)/Library/SDKs/ArcGIS/iOS",
        "OTHER_LDFLAGS": "-lObjC -framework ArcGIS -l c++",
        "ENABLE_BITCODE": "NO",
        "CLANG_ENABLE_MODULES": "YES"
    }
}

Pin It on Pinterest

Share This