react-native-map4d-map-dtqg 0.1.4 → 0.1.6
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/README.md +58 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/build.gradle +23 -2
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +39 -27
- package/ios/Map4dMap.h +12 -3
- package/ios/Map4dMap.m +108 -3
- package/ios/Map4dMapTurbo.mm +16 -0
- package/ios/RMFCircleManager.m +40 -68
- package/ios/RMFDirectionsRendererManager.m +26 -24
- package/ios/RMFMapViewManager.m +64 -149
- package/ios/RMFMarkerManager.m +36 -64
- package/ios/RMFPOIManager.m +40 -74
- package/ios/RMFPolygonManager.m +38 -60
- package/ios/RMFPolylineManager.m +36 -58
- package/ios/building/RMFBuildingManager.m +36 -64
- package/lib/commonjs/components/MFBanDoSo/constants.js +30 -0
- package/lib/commonjs/components/MFBanDoSo/constants.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/helpers.js +200 -0
- package/lib/commonjs/components/MFBanDoSo/helpers.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/propTypes.js +18 -0
- package/lib/commonjs/components/MFBanDoSo/propTypes.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/styles.js +334 -0
- package/lib/commonjs/components/MFBanDoSo/styles.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/ui.js +231 -0
- package/lib/commonjs/components/MFBanDoSo/ui.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo.js +201 -73
- package/lib/commonjs/components/MFBanDoSo.js.map +1 -1
- package/lib/commonjs/components/MFBuilding.js +15 -90
- package/lib/commonjs/components/MFBuilding.js.map +1 -1
- package/lib/commonjs/components/MFCircle.js +20 -88
- package/lib/commonjs/components/MFCircle.js.map +1 -1
- package/lib/commonjs/components/MFDirectionsRenderer.js +15 -93
- package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/commonjs/components/MFMapView.js +50 -147
- package/lib/commonjs/components/MFMapView.js.map +1 -1
- package/lib/commonjs/components/MFMarker.js +15 -101
- package/lib/commonjs/components/MFMarker.js.map +1 -1
- package/lib/commonjs/components/MFPOI.js +17 -92
- package/lib/commonjs/components/MFPOI.js.map +1 -1
- package/lib/commonjs/components/MFPolygon.js +15 -87
- package/lib/commonjs/components/MFPolygon.js.map +1 -1
- package/lib/commonjs/components/MFPolyline.js +17 -87
- package/lib/commonjs/components/MFPolyline.js.map +1 -1
- package/lib/commonjs/components/MFTileOverlay.js +7 -15
- package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
- package/lib/commonjs/components/Map4dMapView.js +1 -4
- package/lib/commonjs/components/Map4dMapView.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocusManager.js +4 -38
- package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocuser.js +1 -17
- package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -1
- package/lib/commonjs/components/extends/BoundHelper.js +0 -6
- package/lib/commonjs/components/extends/BoundHelper.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js +0 -37
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js +1 -35
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusSession.js +0 -18
- package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js +2 -3
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js +1 -2
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js +20 -31
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/commonjs/index.js +0 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native/Map4dMapNativeModule.js +10 -0
- package/lib/commonjs/native/Map4dMapNativeModule.js.map +1 -0
- package/lib/commonjs/native/NativeModuleResolver.js +35 -0
- package/lib/commonjs/native/NativeModuleResolver.js.map +1 -0
- package/lib/commonjs/native/ViewManagerCommand.js +67 -0
- package/lib/commonjs/native/ViewManagerCommand.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeMap4dMap.js +9 -0
- package/lib/commonjs/specs/NativeMap4dMap.js.map +1 -0
- package/lib/module/components/MFBanDoSo/constants.js +25 -0
- package/lib/module/components/MFBanDoSo/constants.js.map +1 -0
- package/lib/module/components/MFBanDoSo/helpers.js +188 -0
- package/lib/module/components/MFBanDoSo/helpers.js.map +1 -0
- package/lib/module/components/MFBanDoSo/propTypes.js +14 -0
- package/lib/module/components/MFBanDoSo/propTypes.js.map +1 -0
- package/lib/module/components/MFBanDoSo/styles.js +332 -0
- package/lib/module/components/MFBanDoSo/styles.js.map +1 -0
- package/lib/module/components/MFBanDoSo/ui.js +224 -0
- package/lib/module/components/MFBanDoSo/ui.js.map +1 -0
- package/lib/module/components/MFBanDoSo.js +203 -63
- package/lib/module/components/MFBanDoSo.js.map +1 -1
- package/lib/module/components/MFBuilding.js +17 -82
- package/lib/module/components/MFBuilding.js.map +1 -1
- package/lib/module/components/MFCircle.js +22 -80
- package/lib/module/components/MFCircle.js.map +1 -1
- package/lib/module/components/MFDirectionsRenderer.js +16 -85
- package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/module/components/MFMapView.js +51 -136
- package/lib/module/components/MFMapView.js.map +1 -1
- package/lib/module/components/MFMarker.js +17 -92
- package/lib/module/components/MFMarker.js.map +1 -1
- package/lib/module/components/MFPOI.js +19 -84
- package/lib/module/components/MFPOI.js.map +1 -1
- package/lib/module/components/MFPolygon.js +17 -79
- package/lib/module/components/MFPolygon.js.map +1 -1
- package/lib/module/components/MFPolyline.js +19 -79
- package/lib/module/components/MFPolyline.js.map +1 -1
- package/lib/module/components/MFTileOverlay.js +10 -9
- package/lib/module/components/MFTileOverlay.js.map +1 -1
- package/lib/module/components/Map4dMapView.js +2 -0
- package/lib/module/components/Map4dMapView.js.map +1 -1
- package/lib/module/components/extends/AreaFocusManager.js +6 -32
- package/lib/module/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/module/components/extends/AreaFocuser.js +3 -15
- package/lib/module/components/extends/AreaFocuser.js.map +1 -1
- package/lib/module/components/extends/BoundHelper.js +2 -5
- package/lib/module/components/extends/BoundHelper.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusAreas.js +2 -33
- package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js +2 -32
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusSession.js +2 -17
- package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusTypes.js +3 -0
- package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/module/components/internal/DefaultRoadmapStyle.js +2 -0
- package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/module/components/internal/GeojsonStyleUtils.js +21 -28
- package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/Map4dMapNativeModule.js +5 -0
- package/lib/module/native/Map4dMapNativeModule.js.map +1 -0
- package/lib/module/native/NativeModuleResolver.js +29 -0
- package/lib/module/native/NativeModuleResolver.js.map +1 -0
- package/lib/module/native/ViewManagerCommand.js +61 -0
- package/lib/module/native/ViewManagerCommand.js.map +1 -0
- package/lib/module/specs/NativeMap4dMap.js +5 -0
- package/lib/module/specs/NativeMap4dMap.js.map +1 -0
- package/lib/typescript/components/MFBanDoSo/constants.d.ts +11 -0
- package/lib/typescript/components/MFBanDoSo/constants.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/helpers.d.ts +14 -0
- package/lib/typescript/components/MFBanDoSo/helpers.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/propTypes.d.ts +2 -0
- package/lib/typescript/components/MFBanDoSo/propTypes.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/styles.d.ts +336 -0
- package/lib/typescript/components/MFBanDoSo/styles.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/ui.d.ts +32 -0
- package/lib/typescript/components/MFBanDoSo/ui.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo.d.ts +38 -0
- package/lib/typescript/components/MFBanDoSo.d.ts.map +1 -0
- package/lib/typescript/components/MFBuilding.d.ts +24 -0
- package/lib/typescript/components/MFBuilding.d.ts.map +1 -0
- package/lib/typescript/components/MFCircle.d.ts +24 -0
- package/lib/typescript/components/MFCircle.d.ts.map +1 -0
- package/lib/typescript/components/MFDirectionsRenderer.d.ts +19 -0
- package/lib/typescript/components/MFDirectionsRenderer.d.ts.map +1 -0
- package/lib/typescript/components/MFMapView.d.ts +66 -0
- package/lib/typescript/components/MFMapView.d.ts.map +1 -0
- package/lib/typescript/components/MFMarker.d.ts +26 -0
- package/lib/typescript/components/MFMarker.d.ts.map +1 -0
- package/lib/typescript/components/MFPOI.d.ts +24 -0
- package/lib/typescript/components/MFPOI.d.ts.map +1 -0
- package/lib/typescript/components/MFPolygon.d.ts +24 -0
- package/lib/typescript/components/MFPolygon.d.ts.map +1 -0
- package/lib/typescript/components/MFPolyline.d.ts +24 -0
- package/lib/typescript/components/MFPolyline.d.ts.map +1 -0
- package/lib/typescript/components/MFTileOverlay.d.ts +12 -0
- package/lib/typescript/components/MFTileOverlay.d.ts.map +1 -0
- package/lib/typescript/components/Map4dMapView.d.ts +8 -7
- package/lib/typescript/components/Map4dMapView.d.ts.map +1 -0
- package/lib/typescript/components/extends/AreaFocusManager.d.ts +34 -0
- package/lib/typescript/components/extends/AreaFocusManager.d.ts.map +1 -0
- package/lib/typescript/components/extends/AreaFocuser.d.ts +15 -0
- package/lib/typescript/components/extends/AreaFocuser.d.ts.map +1 -0
- package/lib/typescript/components/extends/BoundHelper.d.ts +11 -0
- package/lib/typescript/components/extends/BoundHelper.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts +58 -0
- package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts +19 -0
- package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusSession.d.ts +14 -0
- package/lib/typescript/components/extends/area/AreaFocusSession.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts +40 -0
- package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts.map +1 -0
- package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts +820 -0
- package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts.map +1 -0
- package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts +3 -0
- package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +13 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/native/Map4dMapNativeModule.d.ts +2 -0
- package/lib/typescript/native/Map4dMapNativeModule.d.ts.map +1 -0
- package/lib/typescript/native/NativeModuleResolver.d.ts +3 -0
- package/lib/typescript/native/NativeModuleResolver.d.ts.map +1 -0
- package/lib/typescript/native/ViewManagerCommand.d.ts +11 -0
- package/lib/typescript/native/ViewManagerCommand.d.ts.map +1 -0
- package/package.json +27 -11
- package/src/components/MFBanDoSo/constants.js +38 -0
- package/src/components/MFBanDoSo/helpers.js +273 -0
- package/src/components/MFBanDoSo/propTypes.js +14 -0
- package/src/components/MFBanDoSo/styles.js +323 -0
- package/src/components/MFBanDoSo/ui.js +261 -0
- package/src/components/MFBanDoSo.js +280 -78
- package/src/components/MFBuilding.js +8 -48
- package/src/components/MFCircle.js +8 -48
- package/src/components/MFDirectionsRenderer.js +8 -47
- package/src/components/MFMapView.js +31 -53
- package/src/components/MFMarker.js +9 -50
- package/src/components/MFPOI.js +8 -48
- package/src/components/MFPolygon.js +8 -48
- package/src/components/MFPolyline.js +8 -48
- package/src/components/internal/GeojsonStyleUtils.js +3 -0
- package/src/native/Map4dMapNativeModule.js +3 -0
- package/src/native/NativeModuleResolver.js +33 -0
- package/src/native/ViewManagerCommand.js +82 -0
- package/src/specs/NativeMap4dMap.js +12 -0
- package/ios/Map4dMapViewManager.m +0 -34
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
|
|
6
|
-
import {
|
|
6
|
+
import { runViewManagerCommand } from '../native/ViewManagerCommand';
|
|
7
|
+
import { requireNativeComponent, findNodeHandle, processColor } from 'react-native';
|
|
7
8
|
|
|
9
|
+
// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
11
|
const viewPropTypes = ViewPropTypes || View.propTypes;
|
|
9
|
-
const propTypes = {
|
|
10
|
-
|
|
12
|
+
const propTypes = {
|
|
13
|
+
...viewPropTypes,
|
|
11
14
|
/**
|
|
12
15
|
* The coordinate of the center of the circle
|
|
13
16
|
*/
|
|
@@ -18,47 +21,41 @@ const propTypes = { ...viewPropTypes,
|
|
|
18
21
|
latitude: PropTypes.number.isRequired,
|
|
19
22
|
longitude: PropTypes.number.isRequired
|
|
20
23
|
}).isRequired,
|
|
21
|
-
|
|
22
24
|
/**
|
|
23
25
|
* The radius of the circle to be drawn (in meters)
|
|
24
26
|
*/
|
|
25
27
|
radius: PropTypes.number.isRequired,
|
|
26
|
-
|
|
27
28
|
/**
|
|
28
29
|
* The stroke width to use for the circle.
|
|
29
30
|
*/
|
|
30
31
|
strokeWidth: PropTypes.number,
|
|
31
|
-
|
|
32
32
|
/**
|
|
33
33
|
* The stroke color to use for the circle.
|
|
34
34
|
*/
|
|
35
35
|
strokeColor: ColorPropType,
|
|
36
|
-
|
|
37
36
|
/**
|
|
38
37
|
* The fill color to use for the circle.
|
|
39
38
|
*/
|
|
40
39
|
fillColor: ColorPropType,
|
|
41
|
-
|
|
42
40
|
/**
|
|
43
41
|
* zIndex
|
|
44
42
|
*/
|
|
45
43
|
zIndex: PropTypes.number,
|
|
46
|
-
|
|
47
44
|
/**
|
|
48
45
|
* visible
|
|
49
46
|
*/
|
|
50
47
|
visible: PropTypes.bool,
|
|
51
|
-
|
|
52
48
|
/**
|
|
53
49
|
* userData
|
|
54
50
|
*/
|
|
55
51
|
userData: PropTypes.object,
|
|
56
|
-
|
|
57
52
|
/**
|
|
58
53
|
* Callback that is called when the user presses on the circle
|
|
59
54
|
*/
|
|
60
55
|
onPress: PropTypes.func
|
|
61
|
-
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// const defaultProps = {
|
|
62
59
|
// strokeColor: '#000',
|
|
63
60
|
// strokeWidth: 1,
|
|
64
61
|
// };
|
|
@@ -69,116 +66,61 @@ class MFCircle extends React.Component {
|
|
|
69
66
|
this._onPress = this._onPress.bind(this);
|
|
70
67
|
this._ref = this._ref.bind(this);
|
|
71
68
|
}
|
|
72
|
-
|
|
73
69
|
setCenter(center) {
|
|
74
70
|
this._runCommand("setCenter", [center]);
|
|
75
71
|
}
|
|
76
|
-
|
|
77
72
|
setRadius(radius) {
|
|
78
73
|
this._runCommand("setRadius", [radius]);
|
|
79
74
|
}
|
|
80
|
-
|
|
81
75
|
setFillColor(color) {
|
|
82
76
|
this._runCommand("setFillColor", [processColor(color)]);
|
|
83
77
|
}
|
|
84
|
-
|
|
85
78
|
setStrokeColor(color) {
|
|
86
79
|
this._runCommand("setStrokeColor", [processColor(color)]);
|
|
87
80
|
}
|
|
88
|
-
|
|
89
81
|
setStrokeWidth(width) {
|
|
90
82
|
this._runCommand("setStrokeWidth", [width]);
|
|
91
83
|
}
|
|
92
|
-
|
|
93
84
|
setUserData(userData) {
|
|
94
85
|
this._runCommand("setUserData", [userData]);
|
|
95
86
|
}
|
|
96
|
-
|
|
97
87
|
setZIndex(zIndex) {
|
|
98
88
|
this._runCommand("setZIndex", [zIndex]);
|
|
99
89
|
}
|
|
100
|
-
|
|
101
90
|
setVisible(visible) {
|
|
102
91
|
this._runCommand("setVisible", [visible]);
|
|
103
92
|
}
|
|
104
|
-
|
|
105
93
|
_getHandle() {
|
|
106
94
|
return findNodeHandle(this.circle);
|
|
107
95
|
}
|
|
108
|
-
|
|
109
96
|
_runCommand(name, args) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const commandId = this._uiManagerCommand(name);
|
|
118
|
-
|
|
119
|
-
if (commandId == null) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
case 'ios':
|
|
128
|
-
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
129
|
-
|
|
130
|
-
break;
|
|
131
|
-
|
|
132
|
-
default:
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
97
|
+
return runViewManagerCommand({
|
|
98
|
+
componentName: 'RMFCircle',
|
|
99
|
+
moduleName: 'RMFCircle',
|
|
100
|
+
commandName: name,
|
|
101
|
+
args,
|
|
102
|
+
reactTag: this._getHandle()
|
|
103
|
+
});
|
|
135
104
|
}
|
|
136
|
-
|
|
137
|
-
_uiManagerCommand(name) {
|
|
138
|
-
const uiManager = UIManager || NativeModules.UIManager;
|
|
139
|
-
const componentName = "RMFCircle";
|
|
140
|
-
|
|
141
|
-
if (!uiManager) {
|
|
142
|
-
return null;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
if (!uiManager.getViewManagerConfig) {
|
|
146
|
-
// RN < 0.58
|
|
147
|
-
const legacyConfig = uiManager[componentName];
|
|
148
|
-
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
149
|
-
} // RN >= 0.58
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const config = uiManager.getViewManagerConfig(componentName);
|
|
153
|
-
return config && config.Commands ? config.Commands[name] : null;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
_mapManagerCommand(name) {
|
|
157
|
-
return NativeModules[`RMFCircle`][name];
|
|
158
|
-
}
|
|
159
|
-
|
|
160
105
|
_onPress(event) {
|
|
161
106
|
event.stopPropagation();
|
|
162
|
-
|
|
163
107
|
if (this.props.onPress) {
|
|
164
108
|
this.props.onPress(event);
|
|
165
109
|
}
|
|
166
110
|
}
|
|
167
|
-
|
|
168
111
|
_ref(ref) {
|
|
169
112
|
this.circle = ref;
|
|
170
113
|
}
|
|
171
|
-
|
|
172
114
|
render() {
|
|
173
|
-
return /*#__PURE__*/
|
|
115
|
+
return /*#__PURE__*/_jsx(RMFCircle, {
|
|
116
|
+
...this.props,
|
|
174
117
|
ref: this._ref,
|
|
175
118
|
onPress: this._onPress
|
|
176
|
-
})
|
|
119
|
+
});
|
|
177
120
|
}
|
|
178
|
-
|
|
179
121
|
}
|
|
180
|
-
|
|
181
|
-
|
|
122
|
+
MFCircle.propTypes = propTypes;
|
|
123
|
+
// MFCircle.defaultProps = defaultProps;
|
|
182
124
|
|
|
183
125
|
var RMFCircle = requireNativeComponent(`RMFCircle`, MFCircle);
|
|
184
126
|
export { MFCircle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","
|
|
1
|
+
{"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","runViewManagerCommand","requireNativeComponent","findNodeHandle","processColor","jsx","_jsx","viewPropTypes","View","propTypes","center","shape","latitude","number","isRequired","longitude","radius","strokeWidth","strokeColor","fillColor","zIndex","visible","bool","userData","object","onPress","func","MFCircle","Component","constructor","props","_onPress","bind","_ref","setCenter","_runCommand","setRadius","setFillColor","color","setStrokeColor","setStrokeWidth","width","setUserData","setZIndex","setVisible","_getHandle","circle","name","args","componentName","moduleName","commandName","reactTag","event","stopPropagation","ref","render","RMFCircle"],"sourceRoot":"..\\..\\..\\src","sources":["components/MFCircle.js"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAQC,aAAa,EAAEC,aAAa,QAAO,oCAAoC;AAC/E,SAAQC,qBAAqB,QAAO,8BAA8B;AAClE,SACEC,sBAAsB,EACtBC,cAAc,EACdC,YAAY,QACP,cAAc;;AAErB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,aAAa,GAAGR,aAAa,IAAIS,IAAI,CAACC,SAAS;AAErD,MAAMA,SAAS,GAAG;EAChB,GAAGF,aAAa;EAEhB;AACF;AACA;EACEG,MAAM,EAAEb,SAAS,CAACc,KAAK,CAAC;IACtB;AACJ;AACA;IACIC,QAAQ,EAAEf,SAAS,CAACgB,MAAM,CAACC,UAAU;IACrCC,SAAS,EAAElB,SAAS,CAACgB,MAAM,CAACC;EAC9B,CAAC,CAAC,CAACA,UAAU;EAEb;AACF;AACA;EACEE,MAAM,EAAEnB,SAAS,CAACgB,MAAM,CAACC,UAAU;EAEnC;AACF;AACA;EACEG,WAAW,EAAEpB,SAAS,CAACgB,MAAM;EAE7B;AACF;AACA;EACEK,WAAW,EAAElB,aAAa;EAE1B;AACF;AACA;EACEmB,SAAS,EAAEn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react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
|
|
6
|
-
import {
|
|
6
|
+
import { runViewManagerCommand } from '../native/ViewManagerCommand';
|
|
7
|
+
import { requireNativeComponent, Image, findNodeHandle, processColor } from 'react-native';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
const viewPropTypes = ViewPropTypes || View.propTypes;
|
|
8
|
-
const propTypes = {
|
|
9
|
-
|
|
10
|
+
const propTypes = {
|
|
11
|
+
...viewPropTypes,
|
|
10
12
|
/**
|
|
11
13
|
* The directions to display on the map,
|
|
12
14
|
* retrieved as an array of array of coordinates to describe the routes.
|
|
@@ -16,59 +18,48 @@ const propTypes = { ...viewPropTypes,
|
|
|
16
18
|
latitude: PropTypes.number.isRequired,
|
|
17
19
|
longitude: PropTypes.number.isRequired
|
|
18
20
|
}))),
|
|
19
|
-
|
|
20
21
|
/**
|
|
21
22
|
* The directions to display on the map,
|
|
22
23
|
* retrieved as a json string from Get route Map4D API (/sdk/route).
|
|
23
24
|
* Similar to routes prop but with lower priority
|
|
24
25
|
*/
|
|
25
26
|
directions: PropTypes.string,
|
|
26
|
-
|
|
27
27
|
/**
|
|
28
28
|
* The index of the main route, default value is 0.
|
|
29
29
|
*/
|
|
30
30
|
activedIndex: PropTypes.number,
|
|
31
|
-
|
|
32
31
|
/**
|
|
33
32
|
* The active route stroke width.
|
|
34
33
|
*/
|
|
35
34
|
activeStrokeWidth: PropTypes.number,
|
|
36
|
-
|
|
37
35
|
/**
|
|
38
36
|
* The active route color.
|
|
39
37
|
*/
|
|
40
38
|
activeStrokeColor: ColorPropType,
|
|
41
|
-
|
|
42
39
|
/**
|
|
43
40
|
* The active route outline stroke width.
|
|
44
41
|
*/
|
|
45
42
|
activeOutlineWidth: PropTypes.number,
|
|
46
|
-
|
|
47
43
|
/**
|
|
48
44
|
* The active route outline color.
|
|
49
45
|
*/
|
|
50
46
|
activeOutlineColor: ColorPropType,
|
|
51
|
-
|
|
52
47
|
/**
|
|
53
48
|
* The inactive route stroke width.
|
|
54
49
|
*/
|
|
55
50
|
inactiveStrokeWidth: PropTypes.number,
|
|
56
|
-
|
|
57
51
|
/**
|
|
58
52
|
* The inactive route color.
|
|
59
53
|
*/
|
|
60
54
|
inactiveStrokeColor: ColorPropType,
|
|
61
|
-
|
|
62
55
|
/**
|
|
63
56
|
* The inactive route outline stroke width.
|
|
64
57
|
*/
|
|
65
58
|
inactiveOutlineWidth: PropTypes.number,
|
|
66
|
-
|
|
67
59
|
/**
|
|
68
60
|
* The inactive route outline color.
|
|
69
61
|
*/
|
|
70
62
|
inactiveOutlineColor: ColorPropType,
|
|
71
|
-
|
|
72
63
|
/**
|
|
73
64
|
* The options of the origin POI.
|
|
74
65
|
*/
|
|
@@ -84,7 +75,6 @@ const propTypes = { ...viewPropTypes,
|
|
|
84
75
|
titleColor: ColorPropType,
|
|
85
76
|
visible: PropTypes.bool
|
|
86
77
|
}),
|
|
87
|
-
|
|
88
78
|
/**
|
|
89
79
|
* The options of the destination POI.
|
|
90
80
|
*/
|
|
@@ -100,40 +90,32 @@ const propTypes = { ...viewPropTypes,
|
|
|
100
90
|
titleColor: ColorPropType,
|
|
101
91
|
visible: PropTypes.bool
|
|
102
92
|
}),
|
|
103
|
-
|
|
104
93
|
/**
|
|
105
94
|
* Callback that is called when the user presses on the routes.
|
|
106
95
|
*/
|
|
107
96
|
onPress: PropTypes.func
|
|
108
97
|
};
|
|
109
|
-
|
|
110
98
|
class MFDirectionsRenderer extends React.Component {
|
|
111
99
|
constructor(props) {
|
|
112
100
|
super(props);
|
|
113
101
|
this._ref = this._ref.bind(this);
|
|
114
102
|
this._onPress = this._onPress.bind(this);
|
|
115
103
|
}
|
|
116
|
-
|
|
117
104
|
setActivedIndex(index) {
|
|
118
105
|
this._runCommand("setActivedIndex", [index]);
|
|
119
106
|
}
|
|
120
|
-
|
|
121
107
|
setRoutes(routes) {
|
|
122
108
|
this._runCommand("setRoutes", [routes]);
|
|
123
109
|
}
|
|
124
|
-
|
|
125
110
|
setDirections(directions) {
|
|
126
111
|
this._runCommand("setDirections", [directions]);
|
|
127
112
|
}
|
|
128
|
-
|
|
129
113
|
render() {
|
|
130
114
|
let originPOIOptions = this.props.originPOIOptions;
|
|
131
|
-
|
|
132
115
|
if (originPOIOptions) {
|
|
133
116
|
if (originPOIOptions.titleColor) {
|
|
134
117
|
originPOIOptions.titleColor = processColor(originPOIOptions.titleColor);
|
|
135
118
|
}
|
|
136
|
-
|
|
137
119
|
if (originPOIOptions.icon) {
|
|
138
120
|
let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {
|
|
139
121
|
uri: originPOIOptions.icon.uri
|
|
@@ -143,14 +125,11 @@ class MFDirectionsRenderer extends React.Component {
|
|
|
143
125
|
};
|
|
144
126
|
}
|
|
145
127
|
}
|
|
146
|
-
|
|
147
128
|
let destinationPOIOptions = this.props.destinationPOIOptions;
|
|
148
|
-
|
|
149
129
|
if (destinationPOIOptions) {
|
|
150
130
|
if (destinationPOIOptions.titleColor) {
|
|
151
131
|
destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor);
|
|
152
132
|
}
|
|
153
|
-
|
|
154
133
|
if (destinationPOIOptions.icon) {
|
|
155
134
|
let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {
|
|
156
135
|
uri: destinationPOIOptions.icon.uri
|
|
@@ -160,84 +139,36 @@ class MFDirectionsRenderer extends React.Component {
|
|
|
160
139
|
};
|
|
161
140
|
}
|
|
162
141
|
}
|
|
163
|
-
|
|
164
|
-
|
|
142
|
+
return /*#__PURE__*/_jsx(RMFDirectionsRenderer, {
|
|
143
|
+
...this.props,
|
|
165
144
|
originPOIOptions: originPOIOptions,
|
|
166
145
|
destinationPOIOptions: destinationPOIOptions,
|
|
167
146
|
ref: this._ref,
|
|
168
147
|
onPress: this._onPress
|
|
169
|
-
})
|
|
148
|
+
});
|
|
170
149
|
}
|
|
171
|
-
|
|
172
150
|
_ref(ref) {
|
|
173
151
|
this.renderer = ref;
|
|
174
152
|
}
|
|
175
|
-
|
|
176
153
|
_onPress(event) {
|
|
177
154
|
event.stopPropagation();
|
|
178
|
-
|
|
179
155
|
if (this.props.onPress) {
|
|
180
156
|
this.props.onPress(event);
|
|
181
157
|
}
|
|
182
158
|
}
|
|
183
|
-
|
|
184
159
|
_runCommand(name, args) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const commandId = this._uiManagerCommand(name);
|
|
193
|
-
|
|
194
|
-
if (commandId == null) {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
case 'ios':
|
|
203
|
-
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
204
|
-
|
|
205
|
-
break;
|
|
206
|
-
|
|
207
|
-
default:
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
160
|
+
return runViewManagerCommand({
|
|
161
|
+
componentName: 'RMFDirectionsRenderer',
|
|
162
|
+
moduleName: 'RMFDirectionsRenderer',
|
|
163
|
+
commandName: name,
|
|
164
|
+
args,
|
|
165
|
+
reactTag: this._getHandle()
|
|
166
|
+
});
|
|
210
167
|
}
|
|
211
|
-
|
|
212
168
|
_getHandle() {
|
|
213
169
|
return findNodeHandle(this.renderer);
|
|
214
170
|
}
|
|
215
|
-
|
|
216
|
-
_uiManagerCommand(name) {
|
|
217
|
-
const uiManager = UIManager || NativeModules.UIManager;
|
|
218
|
-
const componentName = "RMFDirectionsRenderer";
|
|
219
|
-
|
|
220
|
-
if (!uiManager) {
|
|
221
|
-
return null;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
if (!uiManager.getViewManagerConfig) {
|
|
225
|
-
// RN < 0.58
|
|
226
|
-
const legacyConfig = uiManager[componentName];
|
|
227
|
-
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
228
|
-
} // RN >= 0.58
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const config = uiManager.getViewManagerConfig(componentName);
|
|
232
|
-
return config && config.Commands ? config.Commands[name] : null;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
_mapManagerCommand(name) {
|
|
236
|
-
return NativeModules[`RMFDirectionsRenderer`][name];
|
|
237
|
-
}
|
|
238
|
-
|
|
239
171
|
}
|
|
240
|
-
|
|
241
172
|
MFDirectionsRenderer.propTypes = propTypes;
|
|
242
173
|
var RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);
|
|
243
174
|
export { MFDirectionsRenderer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","Image","UIManager","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","routes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","OS","dispatchViewManagerCommand","commandId","_uiManagerCommand","_getHandle","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","legacyConfig","Commands","config","RMFDirectionsRenderer"],"sources":["MFDirectionsRenderer.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n Image,\r\n UIManager,\r\n NativeModules,\r\n findNodeHandle,\r\n processColor\r\n} from 'react-native';\r\n\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The directions to display on the map,\r\n * retrieved as an array of array of coordinates to describe the routes.\r\n * Similar to directions prop but has higher priority\r\n */\r\n routes: PropTypes.arrayOf(\r\n PropTypes.arrayOf(\r\n PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n })\r\n )\r\n ),\r\n\r\n /**\r\n * The directions to display on the map,\r\n * retrieved as a json string from Get route Map4D API (/sdk/route).\r\n * Similar to routes prop but with lower priority\r\n */\r\n directions: PropTypes.string,\r\n\r\n /**\r\n * The index of the main route, default value is 0.\r\n */\r\n activedIndex: PropTypes.number,\r\n\r\n /**\r\n * The active route stroke width.\r\n */\r\n activeStrokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The active route color.\r\n */\r\n activeStrokeColor: ColorPropType,\r\n\r\n /**\r\n * The active route outline stroke width.\r\n */\r\n activeOutlineWidth: PropTypes.number,\r\n\r\n /**\r\n * The active route outline color.\r\n */\r\n activeOutlineColor: ColorPropType,\r\n\r\n /**\r\n * The inactive route stroke width.\r\n */\r\n inactiveStrokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The inactive route color.\r\n */\r\n inactiveStrokeColor: ColorPropType,\r\n\r\n /**\r\n * The inactive route outline stroke width.\r\n */\r\n inactiveOutlineWidth: PropTypes.number,\r\n\r\n /**\r\n * The inactive route outline color.\r\n */\r\n inactiveOutlineColor: ColorPropType,\r\n\r\n /**\r\n * The options of the origin POI.\r\n */\r\n originPOIOptions: PropTypes.shape({\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired\r\n }),\r\n\r\n title: PropTypes.string,\r\n\r\n titleColor: ColorPropType,\r\n\r\n visible: PropTypes.bool,\r\n }),\r\n\r\n /**\r\n * The options of the destination POI.\r\n */\r\n destinationPOIOptions: PropTypes.shape({\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired\r\n }),\r\n\r\n title: PropTypes.string,\r\n\r\n titleColor: ColorPropType,\r\n\r\n visible: PropTypes.bool,\r\n }),\r\n\r\n /**\r\n * Callback that is called when the user presses on the routes.\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\nclass MFDirectionsRenderer extends React.Component {\r\n constructor(props) {\r\n super(props)\r\n this._ref = this._ref.bind(this)\r\n this._onPress = this._onPress.bind(this)\r\n }\r\n\r\n setActivedIndex(index) {\r\n this._runCommand(\"setActivedIndex\", [index])\r\n }\r\n\r\n setRoutes(routes) {\r\n this._runCommand(\"setRoutes\", [routes])\r\n }\r\n\r\n setDirections(directions) {\r\n this._runCommand(\"setDirections\", [directions])\r\n }\r\n\r\n render() {\r\n let originPOIOptions = this.props.originPOIOptions\r\n if (originPOIOptions) {\r\n if (originPOIOptions.titleColor) {\r\n originPOIOptions.titleColor = processColor(originPOIOptions.titleColor)\r\n }\r\n if (originPOIOptions.icon) {\r\n let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {uri: originPOIOptions.icon.uri};\r\n originPOIOptions.icon = {uri: uri.uri}\r\n }\r\n }\r\n\r\n let destinationPOIOptions = this.props.destinationPOIOptions\r\n if (destinationPOIOptions) {\r\n if (destinationPOIOptions.titleColor) {\r\n destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor)\r\n }\r\n if (destinationPOIOptions.icon) {\r\n let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {uri: destinationPOIOptions.icon.uri};\r\n destinationPOIOptions.icon = {uri: uri.uri}\r\n }\r\n }\r\n\r\n return <RMFDirectionsRenderer\r\n {...this.props}\r\n originPOIOptions={originPOIOptions}\r\n destinationPOIOptions={destinationPOIOptions}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n\r\n _ref(ref) {\r\n this.renderer = ref;\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android': {\r\n if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {\r\n return;\r\n }\r\n\r\n const commandId = this._uiManagerCommand(name);\r\n if (commandId == null) {\r\n return;\r\n }\r\n\r\n UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);\r\n break;\r\n }\r\n\r\n case 'ios':\r\n this._mapManagerCommand(name)(this._getHandle(), ...args);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.renderer);\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const uiManager = UIManager || NativeModules.UIManager;\r\n const componentName = \"RMFDirectionsRenderer\";\r\n\r\n if (!uiManager) {\r\n return null;\r\n }\r\n\r\n if (!uiManager.getViewManagerConfig) {\r\n // RN < 0.58\r\n const legacyConfig = uiManager[componentName];\r\n return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;\r\n }\r\n\r\n // RN >= 0.58 \r\n const config = uiManager.getViewManagerConfig(componentName);\r\n return config && config.Commands ? config.Commands[name] : null;\r\n }\r\n\r\n _mapManagerCommand(name) {\r\n return NativeModules[`RMFDirectionsRenderer`][name];\r\n }\r\n}\r\n\r\nMFDirectionsRenderer.propTypes = propTypes;\r\n\r\nvar RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);\r\n\r\nexport { MFDirectionsRenderer }\r\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB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AAgB;MACd,OAAO,IAAP;IACD;;IAED,IAAI,CAACA,SAAS,CAACE,oBAAf,EAAqC;MACnC;MACA,MAAMC,YAAY,GAAGH,SAAS,CAACC,aAAD,CAA9B;MACA,OAAOE,YAAY,IAAIA,YAAY,CAACC,QAA7B,GAAwCD,YAAY,CAACC,QAAb,CAAsBZ,IAAtB,CAAxC,GAAsE,IAA7E;IACD,CAZqB,CActB;;;IACA,MAAMa,MAAM,GAAGL,SAAS,CAACE,oBAAV,CAA+BD,aAA/B,CAAf;IACA,OAAOI,MAAM,IAAIA,MAAM,CAACD,QAAjB,GAA4BC,MAAM,CAACD,QAAP,CAAgBZ,IAAhB,CAA5B,GAAoD,IAA3D;EACD;;EAEDO,kBAAkB,CAACP,IAAD,EAAO;IACvB,OAAOtD,aAAa,CAAE,uBAAF,CAAb,CAAuCsD,IAAvC,CAAP;EACD;;AAhHgD;;AAmHnDlB,oBAAoB,CAAC/B,SAArB,GAAiCA,SAAjC;AAEA,IAAI+D,qBAAqB,GAAGxE,sBAAsB,CAAE,uBAAF,EAA0BwC,oBAA1B,CAAlD;AAEA,SAASA,oBAAT"}
|
|
1
|
+
{"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","runViewManagerCommand","requireNativeComponent","Image","findNodeHandle","processColor","jsx","_jsx","viewPropTypes","View","propTypes","routes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","resolveAssetSource","RMFDirectionsRenderer","ref","renderer","event","stopPropagation","name","args","componentName","moduleName","commandName","reactTag","_getHandle"],"sourceRoot":"..\\..\\..\\src","sources":["components/MFDirectionsRenderer.js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