expo-gaode-map-navigation 1.1.5-next.2 → 1.1.5-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ExpoGaodeMapNavigationModule.d.ts +2 -1
- package/build/index.d.ts +35 -33
- package/build/index.js +69 -105
- package/build/types/index.d.ts +1 -0
- package/build/types/index.js +1 -0
- package/build/types/native-module.types.d.ts +69 -0
- package/build/types/native-module.types.js +2 -0
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ExpoGaodeMapNavigationModule as ExpoGaodeMapNavigationModuleType } from './types/native-module.types';
|
|
1
2
|
/**
|
|
2
3
|
* 高德地图导航模块
|
|
3
4
|
*
|
|
4
5
|
* 提供路径规划功能,包括驾车、步行、骑行、公交、货车等多种出行方式
|
|
5
6
|
*/
|
|
6
|
-
declare const ExpoGaodeMapNavigationModule:
|
|
7
|
+
declare const ExpoGaodeMapNavigationModule: ExpoGaodeMapNavigationModuleType;
|
|
7
8
|
export default ExpoGaodeMapNavigationModule;
|
package/build/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import ExpoGaodeMapNavigationModule from './ExpoGaodeMapNavigationModule';
|
|
1
2
|
export * from './map';
|
|
2
3
|
import { RouteType, DriveStrategy, WalkStrategy, RideStrategy, TruckSize, TravelStrategy } from './types';
|
|
3
4
|
import type { NaviPoint, RouteOptions, DriveRouteOptions, WalkRouteOptions, RideRouteOptions, EBikeRouteOptions, TruckRouteOptions, RouteResult, DriveRouteResult, IndependentRouteResult, IndependentDriveRouteOptions, IndependentTruckRouteOptions, IndependentWalkRouteOptions, IndependentRideRouteOptions, SelectIndependentRouteOptions, StartNaviWithIndependentPathOptions, ClearIndependentRouteOptions, MotorcycleRouteOptions, IndependentMotorcycleRouteOptions } from './types';
|
|
4
|
-
export { ExpoGaodeMapNaviView, type ExpoGaodeMapNaviViewRef } from './ExpoGaodeMapNaviView';
|
|
5
|
+
export { ExpoGaodeMapNaviView, type ExpoGaodeMapNaviViewRef, ExpoGaodeMapNaviView as NaviView, type ExpoGaodeMapNaviViewRef as NaviViewRef } from './ExpoGaodeMapNaviView';
|
|
5
6
|
/**
|
|
6
7
|
* 初始化导航模块(可选)
|
|
7
8
|
*/
|
|
8
|
-
export declare
|
|
9
|
+
export declare const initNavigation: () => void;
|
|
9
10
|
/**
|
|
10
11
|
* 销毁所有路径计算器实例
|
|
11
12
|
* 用于页面切换时释放资源,避免"Another route calculation is in progress"错误
|
|
12
13
|
*/
|
|
13
|
-
export declare
|
|
14
|
+
export declare const destroyAllCalculators: () => void;
|
|
14
15
|
/**
|
|
15
16
|
* 路径规划(通用方法)
|
|
16
17
|
* 注意:公交路径规划暂未实现
|
|
@@ -19,69 +20,70 @@ export declare function calculateRoute(options: RouteOptions): Promise<RouteResu
|
|
|
19
20
|
/**
|
|
20
21
|
* 驾车路径规划
|
|
21
22
|
*/
|
|
22
|
-
export declare
|
|
23
|
+
export declare const calculateDriveRoute: (options: DriveRouteOptions) => Promise<DriveRouteResult>;
|
|
23
24
|
/**
|
|
24
25
|
* 步行路径规划
|
|
25
26
|
*/
|
|
26
|
-
export declare
|
|
27
|
+
export declare const calculateWalkRoute: (options: WalkRouteOptions) => Promise<RouteResult>;
|
|
27
28
|
/**
|
|
28
29
|
* 骑行路径规划
|
|
29
30
|
*/
|
|
30
|
-
export declare
|
|
31
|
+
export declare const calculateRideRoute: (options: RideRouteOptions) => Promise<RouteResult>;
|
|
31
32
|
/**
|
|
32
33
|
* 骑行电动车路径规划
|
|
33
34
|
*/
|
|
34
|
-
export declare
|
|
35
|
+
export declare const calculateEBikeRoute: (options: EBikeRouteOptions) => Promise<RouteResult>;
|
|
35
36
|
/**
|
|
36
37
|
* 货车路径规划
|
|
37
38
|
*/
|
|
38
|
-
export declare
|
|
39
|
+
export declare const calculateTruckRoute: (options: TruckRouteOptions) => Promise<DriveRouteResult>;
|
|
39
40
|
/**
|
|
40
41
|
* 摩托车路径规划(车类型为 11,支持传入排量)
|
|
41
42
|
*/
|
|
42
|
-
export declare
|
|
43
|
+
export declare const calculateMotorcycleRoute: (options: MotorcycleRouteOptions) => Promise<DriveRouteResult>;
|
|
43
44
|
/**
|
|
44
45
|
* 独立路径规划(不会影响当前导航;适合路线预览/行前选路)
|
|
45
46
|
*/
|
|
46
|
-
export declare
|
|
47
|
-
export declare
|
|
48
|
-
export declare
|
|
49
|
-
export declare
|
|
47
|
+
export declare const independentDriveRoute: (options: IndependentDriveRouteOptions) => Promise<IndependentRouteResult>;
|
|
48
|
+
export declare const independentTruckRoute: (options: IndependentTruckRouteOptions) => Promise<IndependentRouteResult>;
|
|
49
|
+
export declare const independentWalkRoute: (options: IndependentWalkRouteOptions) => Promise<IndependentRouteResult>;
|
|
50
|
+
export declare const independentRideRoute: (options: IndependentRideRouteOptions) => Promise<IndependentRouteResult>;
|
|
50
51
|
/**
|
|
51
52
|
* 独立摩托车路径规划(不干扰当前导航)
|
|
52
53
|
*/
|
|
53
|
-
export declare
|
|
54
|
+
export declare const independentMotorcycleRoute: (options: IndependentMotorcycleRouteOptions) => Promise<IndependentRouteResult>;
|
|
54
55
|
/**
|
|
55
56
|
* 独立路径组:选主路线
|
|
56
57
|
*/
|
|
57
|
-
export declare
|
|
58
|
+
export declare const selectIndependentRoute: (options: SelectIndependentRouteOptions) => Promise<boolean>;
|
|
58
59
|
/**
|
|
59
60
|
* 独立路径组:使用指定路线启动导航
|
|
60
61
|
*/
|
|
61
|
-
export declare
|
|
62
|
+
export declare const startNaviWithIndependentPath: (options: StartNaviWithIndependentPathOptions) => Promise<boolean>;
|
|
62
63
|
/**
|
|
63
64
|
* 独立路径组:清理
|
|
64
65
|
*/
|
|
65
|
-
export declare
|
|
66
|
+
export declare const clearIndependentRoute: (options: ClearIndependentRouteOptions) => Promise<boolean>;
|
|
66
67
|
export type { NaviPoint, RouteOptions, DriveRouteOptions, WalkRouteOptions, RideRouteOptions, EBikeRouteOptions, TruckRouteOptions, RouteResult, DriveRouteResult, IndependentRouteResult, IndependentDriveRouteOptions, IndependentTruckRouteOptions, IndependentWalkRouteOptions, IndependentRideRouteOptions, SelectIndependentRouteOptions, StartNaviWithIndependentPathOptions, ClearIndependentRouteOptions, MotorcycleRouteOptions, IndependentMotorcycleRouteOptions, };
|
|
67
68
|
export { RouteType, DriveStrategy, WalkStrategy, RideStrategy, TruckSize, TravelStrategy, };
|
|
68
69
|
declare const _default: {
|
|
69
|
-
initNavigation:
|
|
70
|
-
destroyAllCalculators:
|
|
70
|
+
initNavigation: () => void;
|
|
71
|
+
destroyAllCalculators: () => void;
|
|
71
72
|
calculateRoute: typeof calculateRoute;
|
|
72
|
-
calculateDriveRoute:
|
|
73
|
-
calculateWalkRoute:
|
|
74
|
-
calculateRideRoute:
|
|
75
|
-
calculateEBikeRoute:
|
|
76
|
-
calculateTruckRoute:
|
|
77
|
-
calculateMotorcycleRoute:
|
|
78
|
-
independentDriveRoute:
|
|
79
|
-
independentTruckRoute:
|
|
80
|
-
independentWalkRoute:
|
|
81
|
-
independentRideRoute:
|
|
82
|
-
independentMotorcycleRoute:
|
|
83
|
-
selectIndependentRoute:
|
|
84
|
-
startNaviWithIndependentPath:
|
|
85
|
-
clearIndependentRoute:
|
|
73
|
+
calculateDriveRoute: (options: DriveRouteOptions) => Promise<DriveRouteResult>;
|
|
74
|
+
calculateWalkRoute: (options: WalkRouteOptions) => Promise<RouteResult>;
|
|
75
|
+
calculateRideRoute: (options: RideRouteOptions) => Promise<RouteResult>;
|
|
76
|
+
calculateEBikeRoute: (options: EBikeRouteOptions) => Promise<RouteResult>;
|
|
77
|
+
calculateTruckRoute: (options: TruckRouteOptions) => Promise<DriveRouteResult>;
|
|
78
|
+
calculateMotorcycleRoute: (options: MotorcycleRouteOptions) => Promise<DriveRouteResult>;
|
|
79
|
+
independentDriveRoute: (options: IndependentDriveRouteOptions) => Promise<IndependentRouteResult>;
|
|
80
|
+
independentTruckRoute: (options: IndependentTruckRouteOptions) => Promise<IndependentRouteResult>;
|
|
81
|
+
independentWalkRoute: (options: IndependentWalkRouteOptions) => Promise<IndependentRouteResult>;
|
|
82
|
+
independentRideRoute: (options: IndependentRideRouteOptions) => Promise<IndependentRouteResult>;
|
|
83
|
+
independentMotorcycleRoute: (options: IndependentMotorcycleRouteOptions) => Promise<IndependentRouteResult>;
|
|
84
|
+
selectIndependentRoute: (options: SelectIndependentRouteOptions) => Promise<boolean>;
|
|
85
|
+
startNaviWithIndependentPath: (options: StartNaviWithIndependentPathOptions) => Promise<boolean>;
|
|
86
|
+
clearIndependentRoute: (options: ClearIndependentRouteOptions) => Promise<boolean>;
|
|
86
87
|
};
|
|
87
88
|
export default _default;
|
|
89
|
+
export { ExpoGaodeMapNavigationModule, };
|
package/build/index.js
CHANGED
|
@@ -17,25 +17,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.TravelStrategy = exports.TruckSize = exports.RideStrategy = exports.WalkStrategy = exports.DriveStrategy = exports.RouteType = exports.ExpoGaodeMapNaviView = void 0;
|
|
21
|
-
exports.initNavigation = initNavigation;
|
|
22
|
-
exports.destroyAllCalculators = destroyAllCalculators;
|
|
20
|
+
exports.ExpoGaodeMapNavigationModule = exports.TravelStrategy = exports.TruckSize = exports.RideStrategy = exports.WalkStrategy = exports.DriveStrategy = exports.RouteType = exports.clearIndependentRoute = exports.startNaviWithIndependentPath = exports.selectIndependentRoute = exports.independentMotorcycleRoute = exports.independentRideRoute = exports.independentWalkRoute = exports.independentTruckRoute = exports.independentDriveRoute = exports.calculateMotorcycleRoute = exports.calculateTruckRoute = exports.calculateEBikeRoute = exports.calculateRideRoute = exports.calculateWalkRoute = exports.calculateDriveRoute = exports.destroyAllCalculators = exports.initNavigation = exports.NaviView = exports.ExpoGaodeMapNaviView = void 0;
|
|
23
21
|
exports.calculateRoute = calculateRoute;
|
|
24
|
-
exports.calculateDriveRoute = calculateDriveRoute;
|
|
25
|
-
exports.calculateWalkRoute = calculateWalkRoute;
|
|
26
|
-
exports.calculateRideRoute = calculateRideRoute;
|
|
27
|
-
exports.calculateEBikeRoute = calculateEBikeRoute;
|
|
28
|
-
exports.calculateTruckRoute = calculateTruckRoute;
|
|
29
|
-
exports.calculateMotorcycleRoute = calculateMotorcycleRoute;
|
|
30
|
-
exports.independentDriveRoute = independentDriveRoute;
|
|
31
|
-
exports.independentTruckRoute = independentTruckRoute;
|
|
32
|
-
exports.independentWalkRoute = independentWalkRoute;
|
|
33
|
-
exports.independentRideRoute = independentRideRoute;
|
|
34
|
-
exports.independentMotorcycleRoute = independentMotorcycleRoute;
|
|
35
|
-
exports.selectIndependentRoute = selectIndependentRoute;
|
|
36
|
-
exports.startNaviWithIndependentPath = startNaviWithIndependentPath;
|
|
37
|
-
exports.clearIndependentRoute = clearIndependentRoute;
|
|
38
22
|
const ExpoGaodeMapNavigationModule_1 = __importDefault(require("./ExpoGaodeMapNavigationModule"));
|
|
23
|
+
exports.ExpoGaodeMapNavigationModule = ExpoGaodeMapNavigationModule_1.default;
|
|
39
24
|
// 重新导出地图模块的所有内容
|
|
40
25
|
__exportStar(require("./map"), exports);
|
|
41
26
|
const types_1 = require("./types");
|
|
@@ -48,149 +33,128 @@ Object.defineProperty(exports, "TravelStrategy", { enumerable: true, get: functi
|
|
|
48
33
|
// 导出官方导航界面组件
|
|
49
34
|
var ExpoGaodeMapNaviView_1 = require("./ExpoGaodeMapNaviView");
|
|
50
35
|
Object.defineProperty(exports, "ExpoGaodeMapNaviView", { enumerable: true, get: function () { return ExpoGaodeMapNaviView_1.ExpoGaodeMapNaviView; } });
|
|
36
|
+
// 兼容旧版本名称
|
|
37
|
+
Object.defineProperty(exports, "NaviView", { enumerable: true, get: function () { return ExpoGaodeMapNaviView_1.ExpoGaodeMapNaviView; } });
|
|
51
38
|
/**
|
|
52
39
|
* 初始化导航模块(可选)
|
|
53
40
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
41
|
+
const initNavigation = () => ExpoGaodeMapNavigationModule_1.default.initNavigation();
|
|
42
|
+
exports.initNavigation = initNavigation;
|
|
57
43
|
/**
|
|
58
44
|
* 销毁所有路径计算器实例
|
|
59
45
|
* 用于页面切换时释放资源,避免"Another route calculation is in progress"错误
|
|
60
46
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
47
|
+
const destroyAllCalculators = () => ExpoGaodeMapNavigationModule_1.default.destroyAllCalculators();
|
|
48
|
+
exports.destroyAllCalculators = destroyAllCalculators;
|
|
64
49
|
/**
|
|
65
50
|
* 路径规划(通用方法)
|
|
66
51
|
* 注意:公交路径规划暂未实现
|
|
67
52
|
*/
|
|
68
53
|
async function calculateRoute(options) {
|
|
69
|
-
//
|
|
70
|
-
if ('
|
|
71
|
-
|
|
72
|
-
return await calculateDriveRoute(options);
|
|
54
|
+
// 1. 货车
|
|
55
|
+
if ('size' in options) {
|
|
56
|
+
return (0, exports.calculateTruckRoute)(options);
|
|
73
57
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
return await calculateEBikeRoute(options);
|
|
83
|
-
}
|
|
84
|
-
else if (options.strategy === 0 || options.strategy === 1) {
|
|
85
|
-
// 骑行
|
|
86
|
-
return await calculateRideRoute(options);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
// 步行
|
|
90
|
-
return await calculateWalkRoute(options);
|
|
58
|
+
// 2. 步行、骑行、电动车
|
|
59
|
+
if ('multiple' in options || 'travelStrategy' in options) {
|
|
60
|
+
if ('usePoi' in options)
|
|
61
|
+
return (0, exports.calculateEBikeRoute)(options);
|
|
62
|
+
// 策略判断:0 或 1 通常为骑行策略,其余默认步行
|
|
63
|
+
const strategy = options.strategy;
|
|
64
|
+
if (strategy === 0 || strategy === 1) {
|
|
65
|
+
return (0, exports.calculateRideRoute)(options);
|
|
91
66
|
}
|
|
67
|
+
return (0, exports.calculateWalkRoute)(options);
|
|
92
68
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return
|
|
69
|
+
// 3. 摩托车 (通过 carType 或 motorcycleCC 判断)
|
|
70
|
+
if ('motorcycleCC' in options || options.carType === 11) {
|
|
71
|
+
return (0, exports.calculateMotorcycleRoute)(options);
|
|
96
72
|
}
|
|
73
|
+
// 4. 默认驾车
|
|
74
|
+
return (0, exports.calculateDriveRoute)(options);
|
|
97
75
|
}
|
|
98
76
|
/**
|
|
99
77
|
* 驾车路径规划
|
|
100
78
|
*/
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
79
|
+
const calculateDriveRoute = (options) => ExpoGaodeMapNavigationModule_1.default.calculateDriveRoute(options);
|
|
80
|
+
exports.calculateDriveRoute = calculateDriveRoute;
|
|
104
81
|
/**
|
|
105
82
|
* 步行路径规划
|
|
106
83
|
*/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
84
|
+
const calculateWalkRoute = (options) => ExpoGaodeMapNavigationModule_1.default.calculateWalkRoute(options);
|
|
85
|
+
exports.calculateWalkRoute = calculateWalkRoute;
|
|
110
86
|
/**
|
|
111
87
|
* 骑行路径规划
|
|
112
88
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
89
|
+
const calculateRideRoute = (options) => ExpoGaodeMapNavigationModule_1.default.calculateRideRoute(options);
|
|
90
|
+
exports.calculateRideRoute = calculateRideRoute;
|
|
116
91
|
/**
|
|
117
92
|
* 骑行电动车路径规划
|
|
118
93
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
94
|
+
const calculateEBikeRoute = (options) => ExpoGaodeMapNavigationModule_1.default.calculateEBikeRoute(options);
|
|
95
|
+
exports.calculateEBikeRoute = calculateEBikeRoute;
|
|
122
96
|
/**
|
|
123
97
|
* 货车路径规划
|
|
124
98
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
99
|
+
const calculateTruckRoute = (options) => ExpoGaodeMapNavigationModule_1.default.calculateTruckRoute(options);
|
|
100
|
+
exports.calculateTruckRoute = calculateTruckRoute;
|
|
128
101
|
/**
|
|
129
102
|
* 摩托车路径规划(车类型为 11,支持传入排量)
|
|
130
103
|
*/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
104
|
+
const calculateMotorcycleRoute = (options) => ExpoGaodeMapNavigationModule_1.default.calculateMotorcycleRoute(options);
|
|
105
|
+
exports.calculateMotorcycleRoute = calculateMotorcycleRoute;
|
|
134
106
|
/**
|
|
135
107
|
* 独立路径规划(不会影响当前导航;适合路线预览/行前选路)
|
|
136
108
|
*/
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
async function independentRideRoute(options) {
|
|
147
|
-
return await ExpoGaodeMapNavigationModule_1.default.independentRideRoute(options);
|
|
148
|
-
}
|
|
109
|
+
const independentDriveRoute = (options) => ExpoGaodeMapNavigationModule_1.default.independentDriveRoute(options);
|
|
110
|
+
exports.independentDriveRoute = independentDriveRoute;
|
|
111
|
+
const independentTruckRoute = (options) => ExpoGaodeMapNavigationModule_1.default.independentTruckRoute(options);
|
|
112
|
+
exports.independentTruckRoute = independentTruckRoute;
|
|
113
|
+
const independentWalkRoute = (options) => ExpoGaodeMapNavigationModule_1.default.independentWalkRoute(options);
|
|
114
|
+
exports.independentWalkRoute = independentWalkRoute;
|
|
115
|
+
const independentRideRoute = (options) => ExpoGaodeMapNavigationModule_1.default.independentRideRoute(options);
|
|
116
|
+
exports.independentRideRoute = independentRideRoute;
|
|
149
117
|
/**
|
|
150
118
|
* 独立摩托车路径规划(不干扰当前导航)
|
|
151
119
|
*/
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
120
|
+
const independentMotorcycleRoute = (options) => ExpoGaodeMapNavigationModule_1.default.independentMotorcycleRoute(options);
|
|
121
|
+
exports.independentMotorcycleRoute = independentMotorcycleRoute;
|
|
155
122
|
/**
|
|
156
123
|
* 独立路径组:选主路线
|
|
157
124
|
*/
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
125
|
+
const selectIndependentRoute = (options) => ExpoGaodeMapNavigationModule_1.default.selectIndependentRoute(options);
|
|
126
|
+
exports.selectIndependentRoute = selectIndependentRoute;
|
|
161
127
|
/**
|
|
162
128
|
* 独立路径组:使用指定路线启动导航
|
|
163
129
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
130
|
+
const startNaviWithIndependentPath = (options) => ExpoGaodeMapNavigationModule_1.default.startNaviWithIndependentPath(options);
|
|
131
|
+
exports.startNaviWithIndependentPath = startNaviWithIndependentPath;
|
|
167
132
|
/**
|
|
168
133
|
* 独立路径组:清理
|
|
169
134
|
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
135
|
+
const clearIndependentRoute = (options) => ExpoGaodeMapNavigationModule_1.default.clearIndependentRoute(options);
|
|
136
|
+
exports.clearIndependentRoute = clearIndependentRoute;
|
|
173
137
|
// 精简后的默认导出
|
|
174
138
|
exports.default = {
|
|
175
139
|
// 初始化
|
|
176
|
-
initNavigation,
|
|
177
|
-
destroyAllCalculators,
|
|
140
|
+
initNavigation: exports.initNavigation,
|
|
141
|
+
destroyAllCalculators: exports.destroyAllCalculators,
|
|
178
142
|
// 路径规划
|
|
179
143
|
calculateRoute,
|
|
180
|
-
calculateDriveRoute,
|
|
181
|
-
calculateWalkRoute,
|
|
182
|
-
calculateRideRoute,
|
|
183
|
-
calculateEBikeRoute,
|
|
184
|
-
calculateTruckRoute,
|
|
185
|
-
calculateMotorcycleRoute,
|
|
144
|
+
calculateDriveRoute: exports.calculateDriveRoute,
|
|
145
|
+
calculateWalkRoute: exports.calculateWalkRoute,
|
|
146
|
+
calculateRideRoute: exports.calculateRideRoute,
|
|
147
|
+
calculateEBikeRoute: exports.calculateEBikeRoute,
|
|
148
|
+
calculateTruckRoute: exports.calculateTruckRoute,
|
|
149
|
+
calculateMotorcycleRoute: exports.calculateMotorcycleRoute,
|
|
186
150
|
// 独立路径规划
|
|
187
|
-
independentDriveRoute,
|
|
188
|
-
independentTruckRoute,
|
|
189
|
-
independentWalkRoute,
|
|
190
|
-
independentRideRoute,
|
|
191
|
-
independentMotorcycleRoute,
|
|
151
|
+
independentDriveRoute: exports.independentDriveRoute,
|
|
152
|
+
independentTruckRoute: exports.independentTruckRoute,
|
|
153
|
+
independentWalkRoute: exports.independentWalkRoute,
|
|
154
|
+
independentRideRoute: exports.independentRideRoute,
|
|
155
|
+
independentMotorcycleRoute: exports.independentMotorcycleRoute,
|
|
192
156
|
// 独立路径组操作
|
|
193
|
-
selectIndependentRoute,
|
|
194
|
-
startNaviWithIndependentPath,
|
|
195
|
-
clearIndependentRoute,
|
|
157
|
+
selectIndependentRoute: exports.selectIndependentRoute,
|
|
158
|
+
startNaviWithIndependentPath: exports.startNaviWithIndependentPath,
|
|
159
|
+
clearIndependentRoute: exports.clearIndependentRoute,
|
|
196
160
|
};
|
package/build/types/index.d.ts
CHANGED
package/build/types/index.js
CHANGED
|
@@ -19,3 +19,4 @@ __exportStar(require("./coordinates.types"), exports);
|
|
|
19
19
|
__exportStar(require("./route.types"), exports);
|
|
20
20
|
__exportStar(require("./independent.types"), exports);
|
|
21
21
|
__exportStar(require("./naviview.types"), exports);
|
|
22
|
+
__exportStar(require("./native-module.types"), exports);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { NativeModule } from 'expo';
|
|
2
|
+
import { DriveRouteOptions, DriveRouteResult, EBikeRouteOptions, RideRouteOptions, RouteResult, TruckRouteOptions, WalkRouteOptions } from './route.types';
|
|
3
|
+
import { MotorcycleRouteOptions, IndependentDriveRouteOptions, IndependentTruckRouteOptions, IndependentWalkRouteOptions, IndependentRideRouteOptions, IndependentMotorcycleRouteOptions, IndependentRouteResult, SelectIndependentRouteOptions, StartNaviWithIndependentPathOptions, ClearIndependentRouteOptions } from './independent.types';
|
|
4
|
+
export interface ExpoGaodeMapNavigationModule extends NativeModule {
|
|
5
|
+
/**
|
|
6
|
+
* 初始化导航模块
|
|
7
|
+
*/
|
|
8
|
+
initNavigation: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* 销毁所有路径规划器
|
|
11
|
+
*/
|
|
12
|
+
destroyAllCalculators: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* 驾车路径规划
|
|
15
|
+
*/
|
|
16
|
+
calculateDriveRoute: (options: DriveRouteOptions) => Promise<DriveRouteResult>;
|
|
17
|
+
/**
|
|
18
|
+
* 步行路径规划
|
|
19
|
+
*/
|
|
20
|
+
calculateWalkRoute: (options: WalkRouteOptions) => Promise<RouteResult>;
|
|
21
|
+
/**
|
|
22
|
+
* 骑行路径规划
|
|
23
|
+
*/
|
|
24
|
+
calculateRideRoute: (options: RideRouteOptions) => Promise<RouteResult>;
|
|
25
|
+
/**
|
|
26
|
+
* 骑行电动车路径规划
|
|
27
|
+
*/
|
|
28
|
+
calculateEBikeRoute: (options: EBikeRouteOptions) => Promise<RouteResult>;
|
|
29
|
+
/**
|
|
30
|
+
* 货车路径规划
|
|
31
|
+
*/
|
|
32
|
+
calculateTruckRoute: (options: TruckRouteOptions) => Promise<DriveRouteResult>;
|
|
33
|
+
/**
|
|
34
|
+
* 摩托车路径规划(车类型为 11,支持传入排量)
|
|
35
|
+
*/
|
|
36
|
+
calculateMotorcycleRoute: (options: MotorcycleRouteOptions) => Promise<DriveRouteResult>;
|
|
37
|
+
/**
|
|
38
|
+
* 独立路径规划(不会影响当前导航;适合路线预览/行前选路)
|
|
39
|
+
*/
|
|
40
|
+
independentDriveRoute: (options: IndependentDriveRouteOptions) => Promise<IndependentRouteResult>;
|
|
41
|
+
/**
|
|
42
|
+
* 独立货车路径规划(不会影响当前导航;适合路线预览/行前选路)
|
|
43
|
+
*/
|
|
44
|
+
independentTruckRoute: (options: IndependentTruckRouteOptions) => Promise<IndependentRouteResult>;
|
|
45
|
+
/**
|
|
46
|
+
* 独立步行路径规划(不会影响当前导航;适合路线预览/行前选路)
|
|
47
|
+
*/
|
|
48
|
+
independentWalkRoute: (options: IndependentWalkRouteOptions) => Promise<IndependentRouteResult>;
|
|
49
|
+
/**
|
|
50
|
+
* 独立骑行路径规划(不会影响当前导航;适合路线预览/行前选路)
|
|
51
|
+
*/
|
|
52
|
+
independentRideRoute: (options: IndependentRideRouteOptions) => Promise<IndependentRouteResult>;
|
|
53
|
+
/**
|
|
54
|
+
* 独立摩托车路径规划(不会影响当前导航;适合路线预览/行前选路)
|
|
55
|
+
*/
|
|
56
|
+
independentMotorcycleRoute: (options: IndependentMotorcycleRouteOptions) => Promise<IndependentRouteResult>;
|
|
57
|
+
/**
|
|
58
|
+
* 选择独立路径(会影响当前导航)
|
|
59
|
+
*/
|
|
60
|
+
selectIndependentRoute: (options: SelectIndependentRouteOptions) => Promise<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* 启动独立路径导航(会影响当前导航)
|
|
63
|
+
*/
|
|
64
|
+
startNaviWithIndependentPath: (options: StartNaviWithIndependentPathOptions) => Promise<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* 清除独立路径(会影响当前导航)
|
|
67
|
+
*/
|
|
68
|
+
clearIndependentRoute: (options: ClearIndependentRouteOptions) => Promise<boolean>;
|
|
69
|
+
}
|
package/package.json
CHANGED