Skip to content

Commit b1f053f

Browse files
committed
ios
1 parent 2e794f5 commit b1f053f

26 files changed

+1709
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.3.4.0300a2c
3.68 MB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// AMapFoundationKit.h
3+
// AMapFoundationKit
4+
//
5+
// Created by xiaoming han on 15/10/28.
6+
// Copyright © 2015年 Amap. All rights reserved.
7+
//
8+
9+
#import <AMapFoundationKit/AMapFoundationVersion.h>
10+
#import <AMapFoundationKit/AMapServices.h>
11+
#import <AMapFoundationKit/AMapURLSearchConfig.h>
12+
#import <AMapFoundationKit/AMapURLSearchType.h>
13+
#import <AMapFoundationKit/AMapURLSearch.h>
14+
15+
#import <AMapFoundationKit/AMapUtility.h>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// AMapFoundationVersion.h
3+
// AMapFoundation
4+
//
5+
// Created by xiaoming han on 15/10/26.
6+
// Copyright © 2015年 Amap. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
#ifndef AMapFoundationVersion_h
12+
#define AMapFoundationVersion_h
13+
14+
#define AMapFoundationVersionNumber 10304
15+
16+
FOUNDATION_EXTERN NSString * const AMapFoundationVersion;
17+
FOUNDATION_EXTERN NSString * const AMapFoundationName;
18+
19+
#endif /* AMapFoundationVersion_h */
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//
2+
// AMapSearchServices.h
3+
// AMapSearchKit
4+
//
5+
// Created by xiaoming han on 15/6/18.
6+
// Copyright (c) 2015年 xiaoming han. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
///高德SDK服务类
12+
@interface AMapServices : NSObject
13+
14+
/**
15+
* @brief 获取单例
16+
*/
17+
+ (AMapServices *)sharedServices;
18+
19+
///APIkey。设置key,需要绑定对应的bundle id。
20+
@property (nonatomic, copy) NSString *apiKey;
21+
22+
///是否开启HTTPS,从1.3.3版本开始默认为YES。
23+
@property (nonatomic, assign) BOOL enableHTTPS;
24+
25+
///是否启用崩溃日志上传。默认为YES, 只有在真机上设置有效。\n开启崩溃日志上传有助于我们更好的了解SDK的状况,可以帮助我们持续优化和改进SDK。需要注意的是,SDK内部是通过设置NSUncaughtExceptionHandler来捕获异常的,如果您的APP中使用了其他收集崩溃日志的SDK,或者自己有设置NSUncaughtExceptionHandler的话,请保证 AMapServices 的初始化是在其他设置NSUncaughtExceptionHandler操作之后进行的,我们的handler会再处理完异常后调用前一次设置的handler,保证之前设置的handler会被执行。
26+
@property (nonatomic, assign) BOOL crashReportEnabled;
27+
28+
@end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// AMapURLSearch.h
3+
// AMapFoundation
4+
//
5+
// Created by xiaoming han on 15/10/28.
6+
// Copyright © 2015年 Amap. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "AMapURLSearchConfig.h"
11+
12+
///调起高德地图URL进行搜索,若是调起失败,可使用`+ (void)getLatestAMapApp;`方法获取最新版高德地图app.
13+
@interface AMapURLSearch : NSObject
14+
15+
/**
16+
* @brief 打开高德地图AppStore页面
17+
*/
18+
+ (void)getLatestAMapApp;
19+
20+
/**
21+
* @brief 调起高德地图app驾车导航.
22+
* @param config 配置参数.
23+
* @return 是否成功.若为YES则成功调起,若为NO则无法调起.
24+
*/
25+
+ (BOOL)openAMapNavigation:(AMapNaviConfig *)config;
26+
27+
/**
28+
* @brief 调起高德地图app进行路径规划.
29+
* @param config 配置参数.
30+
* @return 是否成功.
31+
*/
32+
+ (BOOL)openAMapRouteSearch:(AMapRouteConfig *)config;
33+
34+
/**
35+
* @brief 调起高德地图app进行POI搜索.
36+
* @param config 配置参数.
37+
* @return 是否成功.
38+
*/
39+
+ (BOOL)openAMapPOISearch:(AMapPOIConfig *)config;
40+
41+
@end
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
//
2+
// MAMapURLSearchConfig.h
3+
// MAMapKitNew
4+
//
5+
// Created by xiaoming han on 15/5/25.
6+
// Copyright (c) 2015年 xiaoming han. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <CoreLocation/CoreLocation.h>
11+
#import "AMapURLSearchType.h"
12+
13+
///导航配置信息
14+
@interface AMapNaviConfig : NSObject
15+
16+
///应用返回的Scheme
17+
@property (nonatomic, copy) NSString *appScheme;
18+
19+
///应用名称
20+
@property (nonatomic, copy) NSString *appName;
21+
22+
///终点
23+
@property (nonatomic, assign) CLLocationCoordinate2D destination;
24+
25+
///导航策略
26+
@property (nonatomic, assign) AMapDrivingStrategy strategy;
27+
28+
@end
29+
30+
#pragma mark -
31+
32+
///路径搜索配置信息
33+
@interface AMapRouteConfig : NSObject
34+
35+
///应用返回的Scheme
36+
@property (nonatomic, copy) NSString *appScheme;
37+
38+
///应用名称
39+
@property (nonatomic, copy) NSString *appName;
40+
41+
///起点坐标
42+
@property (nonatomic, assign) CLLocationCoordinate2D startCoordinate;
43+
44+
///终点坐标
45+
@property (nonatomic, assign) CLLocationCoordinate2D destinationCoordinate;
46+
47+
///驾车策略
48+
@property (nonatomic, assign) AMapDrivingStrategy drivingStrategy;
49+
50+
///公交策略
51+
@property (nonatomic, assign) AMapTransitStrategy transitStrategy;
52+
53+
///路径规划类型
54+
@property (nonatomic, assign) AMapRouteSearchType routeType;
55+
56+
@end
57+
58+
#pragma mark -
59+
60+
///POI搜索配置信息
61+
@interface AMapPOIConfig : NSObject
62+
63+
///应用返回的Scheme
64+
@property (nonatomic, copy) NSString *appScheme;
65+
66+
///应用名称
67+
@property (nonatomic, copy) NSString *appName;
68+
69+
///搜索关键字
70+
@property (nonatomic, copy) NSString *keywords;
71+
72+
///左上角坐标
73+
@property (nonatomic, assign) CLLocationCoordinate2D leftTopCoordinate;
74+
75+
///右下角坐标
76+
@property (nonatomic, assign) CLLocationCoordinate2D rightBottomCoordinate;
77+
78+
@end
79+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//
2+
// MAMapURLSearchType.h
3+
// MAMapKitNew
4+
//
5+
// Created by xiaoming han on 15/5/25.
6+
// Copyright (c) 2015年 xiaoming han. All rights reserved.
7+
//
8+
9+
///驾车策略
10+
typedef NS_ENUM(NSInteger, AMapDrivingStrategy)
11+
{
12+
AMapDrivingStrategyFastest = 0, ///<速度最快
13+
AMapDrivingStrategyMinFare = 1, ///<避免收费
14+
AMapDrivingStrategyShortest = 2, ///<距离最短
15+
16+
AMapDrivingStrategyNoHighways = 3, ///<不走高速
17+
AMapDrivingStrategyAvoidCongestion = 4, ///<躲避拥堵
18+
19+
AMapDrivingStrategyAvoidHighwaysAndFare = 5, ///<不走高速且避免收费
20+
AMapDrivingStrategyAvoidHighwaysAndCongestion = 6, ///<不走高速且躲避拥堵
21+
AMapDrivingStrategyAvoidFareAndCongestion = 7, ///<躲避收费和拥堵
22+
AMapDrivingStrategyAvoidHighwaysAndFareAndCongestion = 8 ///<不走高速躲避收费和拥堵
23+
};
24+
25+
///公交策略
26+
typedef NS_ENUM(NSInteger, AMapTransitStrategy)
27+
{
28+
AMapTransitStrategyFastest = 0,///<最快捷
29+
AMapTransitStrategyMinFare = 1,///<最经济
30+
AMapTransitStrategyMinTransfer = 2,///<最少换乘
31+
AMapTransitStrategyMinWalk = 3,///<最少步行
32+
AMapTransitStrategyMostComfortable = 4,///<最舒适
33+
AMapTransitStrategyAvoidSubway = 5,///<不乘地铁
34+
};
35+
36+
///路径规划类型
37+
typedef NS_ENUM(NSInteger, AMapRouteSearchType)
38+
{
39+
AMapRouteSearchTypeDriving = 0, ///<驾车
40+
AMapRouteSearchTypeTransit = 1, ///<公交
41+
AMapRouteSearchTypeWalking = 2, ///<步行
42+
};
43+
44+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//
2+
// AMapUtility.h
3+
// AMapFoundation
4+
//
5+
// Created by xiaoming han on 15/10/27.
6+
// Copyright © 2015年 Amap. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <CoreLocation/CoreLocation.h>
11+
12+
//工具方法
13+
14+
/**
15+
* @brief 如果字符串为nil则返回空字符串
16+
*/
17+
FOUNDATION_STATIC_INLINE NSString * AMapEmptyStringIfNil(NSString *s)
18+
{
19+
return s ? s : @"";
20+
}
21+
22+
///坐标类型枚举
23+
typedef NS_ENUM(NSUInteger, AMapCoordinateType)
24+
{
25+
AMapCoordinateTypeBaidu = 0, ///<Baidu
26+
AMapCoordinateTypeMapBar, ///<MapBar
27+
AMapCoordinateTypeMapABC, ///<MapABC
28+
AMapCoordinateTypeSoSoMap, ///<SoSoMap
29+
AMapCoordinateTypeAliYun, ///<AliYun
30+
AMapCoordinateTypeGoogle, ///<Google
31+
AMapCoordinateTypeGPS, ///<GPS
32+
};
33+
34+
/**
35+
* @brief 转换目标经纬度为高德坐标系
36+
* @param coordinate 待转换的经纬度
37+
* @param type 坐标系类型
38+
* @return 高德坐标系经纬度
39+
*/
40+
FOUNDATION_EXTERN CLLocationCoordinate2D AMapCoordinateConvert(CLLocationCoordinate2D coordinate, AMapCoordinateType type);
41+
42+
/**
43+
* @brief 判断目标经纬度是否在大陆以及港、澳地区。输入参数为高德坐标系。
44+
* @param coordinate 待判断的目标经纬度
45+
* @return 是否在大陆以及港、澳地区
46+
*/
47+
FOUNDATION_EXTERN BOOL AMapDataAvailableForCoordinate(CLLocationCoordinate2D coordinate);
48+
49+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.3.0.2c6b5d0

0 commit comments

Comments
 (0)