Skip to content

Commit b9eea6a

Browse files
committed
Initial Commit
0 parents  commit b9eea6a

File tree

1,451 files changed

+61124
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,451 files changed

+61124
-0
lines changed

.gitignore

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
.DS_Store
6+
.idea/
7+
8+
## Build generated
9+
build/
10+
DerivedData/
11+
12+
## Various settings
13+
*.pbxuser
14+
!default.pbxuser
15+
*.mode1v3
16+
!default.mode1v3
17+
*.mode2v3
18+
!default.mode2v3
19+
*.perspectivev3
20+
!default.perspectivev3
21+
xcuserdata/
22+
23+
## Other
24+
*.moved-aside
25+
*.xcuserstate
26+
27+
## Obj-C/Swift specific
28+
*.hmap
29+
*.ipa
30+
*.dSYM.zip
31+
*.dSYM
32+
33+
# CocoaPods
34+
#
35+
# We recommend against adding the Pods directory to your .gitignore. However
36+
# you should judge for yourself, the pros and cons are mentioned at:
37+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
38+
#
39+
Pods/
40+
41+
# Carthage
42+
#
43+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
44+
# Carthage/Checkouts
45+
46+
Carthage/Build
47+
48+
# fastlane
49+
#
50+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
51+
# screenshots whenever they are needed.
52+
# For more information about the recommended setup visit:
53+
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
54+
55+
fastlane/report.xml
56+
fastlane/screenshots
57+
58+
#Code Injection
59+
#
60+
# After new code Injection tools there's a generated folder /iOSInjectionProject
61+
# https://github.com/johnno1962/injectionforxcode
62+
63+
iOSInjectionProject/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.1.0.af5d224
Binary file not shown.
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年 AutoNavi. 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>
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年 AutoNavi. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
#ifndef AMapFoundationVersion_h
12+
#define AMapFoundationVersion_h
13+
14+
#define AMapFoundationVersionNumber 10100
15+
16+
FOUNDATION_EXTERN NSString * const AMapFoundationVersion;
17+
FOUNDATION_EXTERN NSString * const AMapFoundationName;
18+
19+
#endif /* AMapFoundationVersion_h */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
@interface AMapServices : NSObject
12+
13+
+ (AMapServices *)sharedServices;
14+
15+
/**
16+
* APIkey。设置key,需要绑定对应的bundle id。
17+
*/
18+
@property (nonatomic, copy) NSString *apiKey;
19+
20+
/**
21+
* 是否开启HTTPS,默认为NO。
22+
* 目前已支持服务:key鉴权、云图(不支持iOS9 SSL限制)、搜索(短串分享除外)。
23+
*/
24+
@property (nonatomic, assign) BOOL enableHTTPS;
25+
26+
/**
27+
* 是否启用崩溃日志上传。默认为YES, 只有在真机上设置有效。
28+
* 开启崩溃日志上传有助于我们更好的了解SDK的状况,可以帮助我们持续优化和改进SDK。
29+
* 需要注意的是,我是通过设置NSUncaughtExceptionHandler来捕获异常的,如果您的APP中使用了其他收集崩溃日志的SDK,或者自己有设置NSUncaughtExceptionHandler的话,请保证 AMapServices 的初始化是在其他设置NSUncaughtExceptionHandler操作之后进行的,我们的handler会再处理完异常后调用前一次设置的handler,保证之前设置的handler会被执行。
30+
*/
31+
@property (nonatomic, assign) BOOL crashReportEnabled;
32+
33+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// AMapURLSearch.h
3+
// AMapFoundation
4+
//
5+
// Created by xiaoming han on 15/10/28.
6+
// Copyright © 2015年 AutoNavi. 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+
/// 打开高德地图AppStore页面
16+
+ (void)getLatestAMapApp;
17+
18+
/**
19+
* 调起高德地图app驾车导航.
20+
*
21+
* @param config 配置参数.
22+
*
23+
* @return 是否成功.若为YES则成功调起,若为NO则无法调起.
24+
*/
25+
+ (BOOL)openAMapNavigation:(AMapNaviConfig *)config;
26+
27+
/**
28+
* 调起高德地图app进行路径规划.
29+
*
30+
* @param config 配置参数.
31+
*
32+
* @return 是否成功.
33+
*/
34+
+ (BOOL)openAMapRouteSearch:(AMapRouteConfig *)config;
35+
36+
/**
37+
* 调起高德地图app进行POI搜索.
38+
*
39+
* @param config 配置参数.
40+
*
41+
* @return 是否成功.
42+
*/
43+
+ (BOOL)openAMapPOISearch:(AMapPOIConfig *)config;
44+
45+
@end
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+
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+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//
2+
// AMapUtility.h
3+
// AMapFoundation
4+
//
5+
// Created by xiaoming han on 15/10/27.
6+
// Copyright © 2015年 AutoNavi. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <CoreLocation/CoreLocation.h>
11+
12+
/**
13+
* 工具方法
14+
*/
15+
16+
FOUNDATION_STATIC_INLINE NSString * AMapEmptyStringIfNil(NSString *s)
17+
{
18+
return s ? s : @"";
19+
}
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+
* 转换目标经纬度为高德坐标系
36+
*
37+
* @param coordinate 待转换的经纬度
38+
* @param type 坐标系类型
39+
*
40+
* @return 高德坐标系经纬度
41+
*/
42+
FOUNDATION_EXTERN CLLocationCoordinate2D AMapCoordinateConvert(CLLocationCoordinate2D coordinate, AMapCoordinateType type);
43+
44+
/**
45+
* 判断目标经纬度是否在大陆以及港、澳地区。输入参数为高德坐标系。
46+
*
47+
* @param coordinate 待判断的目标经纬度
48+
* @return 是否在大陆以及港、澳地区
49+
*/
50+
FOUNDATION_EXTERN BOOL AMapDataAvailableForCoordinate(CLLocationCoordinate2D coordinate);
51+
52+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.0.598d05d
1.71 MB
Binary file not shown.

0 commit comments

Comments
 (0)