react-native-map4d-map-dtqg 0.1.3 → 0.1.4

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.
Files changed (199) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +133 -133
  3. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.9/gc.properties +0 -0
  8. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  9. package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
  10. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  11. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  12. package/android/.gradle/9.2.0/gc.properties +0 -0
  13. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  14. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  15. package/android/.gradle/vcs-1/gc.properties +0 -0
  16. package/android/build.gradle +60 -60
  17. package/android/src/main/AndroidManifest.xml +4 -4
  18. package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -87
  19. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -298
  20. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -35
  21. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -31
  22. package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -167
  23. package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -121
  24. package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -105
  25. package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +121 -121
  26. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -502
  27. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -143
  28. package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +17 -17
  29. package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -1172
  30. package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +231 -231
  31. package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -412
  32. package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +211 -211
  33. package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -222
  34. package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -119
  35. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +172 -172
  36. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +147 -147
  37. package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -146
  38. package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +137 -137
  39. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -95
  40. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +64 -64
  41. package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -31
  42. package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -31
  43. package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -70
  44. package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -9
  45. package/ios/Map4dMap.h +7 -7
  46. package/ios/Map4dMap.m +14 -14
  47. package/ios/Map4dMapViewManager.m +34 -34
  48. package/ios/RCTConvert+Map4dMap.h +33 -33
  49. package/ios/RCTConvert+Map4dMap.m +112 -112
  50. package/ios/RMFCircle.h +37 -37
  51. package/ios/RMFCircle.m +100 -100
  52. package/ios/RMFCircleManager.h +18 -18
  53. package/ios/RMFCircleManager.m +155 -155
  54. package/ios/RMFCircleMap4d.h +23 -23
  55. package/ios/RMFCircleMap4d.m +13 -13
  56. package/ios/RMFCoordinate.h +22 -22
  57. package/ios/RMFCoordinate.m +13 -13
  58. package/ios/RMFDirectionsMarkerOptions.h +24 -24
  59. package/ios/RMFDirectionsMarkerOptions.m +23 -23
  60. package/ios/RMFDirectionsRenderer.h +47 -47
  61. package/ios/RMFDirectionsRenderer.m +182 -182
  62. package/ios/RMFDirectionsRendererManager.h +17 -17
  63. package/ios/RMFDirectionsRendererManager.m +84 -84
  64. package/ios/RMFDirectionsRendererMap4d.h +21 -21
  65. package/ios/RMFDirectionsRendererMap4d.m +12 -12
  66. package/ios/RMFDummyView.h +6 -6
  67. package/ios/RMFDummyView.m +12 -12
  68. package/ios/RMFEventResponse.h +39 -39
  69. package/ios/RMFEventResponse.m +98 -98
  70. package/ios/RMFIcon.h +24 -24
  71. package/ios/RMFIcon.m +35 -35
  72. package/ios/RMFMapView.h +84 -84
  73. package/ios/RMFMapView.m +376 -376
  74. package/ios/RMFMapViewManager.h +17 -17
  75. package/ios/RMFMapViewManager.m +509 -509
  76. package/ios/RMFMarker.h +57 -57
  77. package/ios/RMFMarker.m +267 -267
  78. package/ios/RMFMarkerManager.h +17 -17
  79. package/ios/RMFMarkerManager.m +156 -156
  80. package/ios/RMFMarkerMap4d.h +19 -19
  81. package/ios/RMFMarkerMap4d.m +13 -13
  82. package/ios/RMFPOI.h +38 -38
  83. package/ios/RMFPOI.m +123 -123
  84. package/ios/RMFPOIManager.h +18 -18
  85. package/ios/RMFPOIManager.m +168 -168
  86. package/ios/RMFPOIMap4d.h +22 -22
  87. package/ios/RMFPOIMap4d.m +12 -12
  88. package/ios/RMFPolygon.h +41 -41
  89. package/ios/RMFPolygon.m +106 -106
  90. package/ios/RMFPolygonManager.h +18 -18
  91. package/ios/RMFPolygonManager.m +141 -141
  92. package/ios/RMFPolygonMap4d.h +23 -23
  93. package/ios/RMFPolygonMap4d.m +15 -15
  94. package/ios/RMFPolyline.h +38 -38
  95. package/ios/RMFPolyline.m +101 -101
  96. package/ios/RMFPolylineManager.h +18 -18
  97. package/ios/RMFPolylineManager.m +139 -139
  98. package/ios/RMFPolylineMap4d.h +22 -22
  99. package/ios/RMFPolylineMap4d.m +15 -15
  100. package/ios/building/RMFBuilding.h +41 -41
  101. package/ios/building/RMFBuilding.m +104 -104
  102. package/ios/building/RMFBuildingManager.h +19 -19
  103. package/ios/building/RMFBuildingManager.m +133 -133
  104. package/ios/building/RMFBuildingMap4d.h +23 -23
  105. package/ios/building/RMFBuildingMap4d.m +15 -15
  106. package/ios/overlays/RMFTileOverlay.h +36 -36
  107. package/ios/overlays/RMFTileOverlay.m +64 -64
  108. package/ios/overlays/RMFTileOverlayManager.h +17 -17
  109. package/ios/overlays/RMFTileOverlayManager.m +27 -27
  110. package/lib/commonjs/components/MFBanDoSo.js.map +1 -1
  111. package/lib/commonjs/components/MFBuilding.js +50 -32
  112. package/lib/commonjs/components/MFBuilding.js.map +1 -1
  113. package/lib/commonjs/components/MFCircle.js +44 -26
  114. package/lib/commonjs/components/MFCircle.js.map +1 -1
  115. package/lib/commonjs/components/MFDirectionsRenderer.js +56 -38
  116. package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
  117. package/lib/commonjs/components/MFMapView.js +91 -74
  118. package/lib/commonjs/components/MFMapView.js.map +1 -1
  119. package/lib/commonjs/components/MFMarker.js +59 -41
  120. package/lib/commonjs/components/MFMarker.js.map +1 -1
  121. package/lib/commonjs/components/MFPOI.js +44 -26
  122. package/lib/commonjs/components/MFPOI.js.map +1 -1
  123. package/lib/commonjs/components/MFPolygon.js +46 -28
  124. package/lib/commonjs/components/MFPolygon.js.map +1 -1
  125. package/lib/commonjs/components/MFPolyline.js +42 -24
  126. package/lib/commonjs/components/MFPolyline.js.map +1 -1
  127. package/lib/commonjs/components/MFTileOverlay.js +9 -9
  128. package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
  129. package/lib/commonjs/components/Map4dMapView.js.map +1 -1
  130. package/lib/commonjs/components/extends/AreaFocusManager.js +16 -16
  131. package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -1
  132. package/lib/commonjs/components/extends/AreaFocuser.js +2 -2
  133. package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -1
  134. package/lib/commonjs/components/extends/BoundHelper.js.map +1 -1
  135. package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -1
  136. package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
  137. package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -1
  138. package/lib/commonjs/components/extends/area/AreaFocusTypes.js +18 -18
  139. package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -1
  140. package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -1
  141. package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -1
  142. package/lib/commonjs/index.js.map +1 -1
  143. package/lib/module/components/MFBanDoSo.js.map +1 -1
  144. package/lib/module/components/MFBuilding.js +51 -33
  145. package/lib/module/components/MFBuilding.js.map +1 -1
  146. package/lib/module/components/MFCircle.js +45 -27
  147. package/lib/module/components/MFCircle.js.map +1 -1
  148. package/lib/module/components/MFDirectionsRenderer.js +57 -39
  149. package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
  150. package/lib/module/components/MFMapView.js +92 -75
  151. package/lib/module/components/MFMapView.js.map +1 -1
  152. package/lib/module/components/MFMarker.js +60 -42
  153. package/lib/module/components/MFMarker.js.map +1 -1
  154. package/lib/module/components/MFPOI.js +45 -27
  155. package/lib/module/components/MFPOI.js.map +1 -1
  156. package/lib/module/components/MFPolygon.js +47 -29
  157. package/lib/module/components/MFPolygon.js.map +1 -1
  158. package/lib/module/components/MFPolyline.js +43 -25
  159. package/lib/module/components/MFPolyline.js.map +1 -1
  160. package/lib/module/components/MFTileOverlay.js +9 -9
  161. package/lib/module/components/MFTileOverlay.js.map +1 -1
  162. package/lib/module/components/Map4dMapView.js.map +1 -1
  163. package/lib/module/components/extends/AreaFocusManager.js +16 -16
  164. package/lib/module/components/extends/AreaFocusManager.js.map +1 -1
  165. package/lib/module/components/extends/AreaFocuser.js +2 -2
  166. package/lib/module/components/extends/AreaFocuser.js.map +1 -1
  167. package/lib/module/components/extends/BoundHelper.js.map +1 -1
  168. package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -1
  169. package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
  170. package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -1
  171. package/lib/module/components/extends/area/AreaFocusTypes.js +18 -18
  172. package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -1
  173. package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -1
  174. package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -1
  175. package/lib/module/index.js.map +1 -1
  176. package/lib/typescript/components/Map4dMapView.d.ts +7 -7
  177. package/package.json +152 -152
  178. package/react-native-map4d-map.podspec +20 -20
  179. package/src/components/MFBanDoSo.js +124 -124
  180. package/src/components/MFBuilding.js +200 -187
  181. package/src/components/MFCircle.js +186 -173
  182. package/src/components/MFDirectionsRenderer.js +250 -237
  183. package/src/components/MFMapView.js +480 -464
  184. package/src/components/MFMarker.js +259 -246
  185. package/src/components/MFPOI.js +197 -184
  186. package/src/components/MFPolygon.js +199 -186
  187. package/src/components/MFPolyline.js +185 -172
  188. package/src/components/MFTileOverlay.js +45 -45
  189. package/src/components/Map4dMapView.tsx +26 -26
  190. package/src/components/extends/AreaFocusManager.js +196 -196
  191. package/src/components/extends/AreaFocuser.js +61 -61
  192. package/src/components/extends/BoundHelper.js +31 -31
  193. package/src/components/extends/area/AreaFocusAreas.js +164 -164
  194. package/src/components/extends/area/AreaFocusGeometryUtils.js +164 -164
  195. package/src/components/extends/area/AreaFocusSession.js +100 -100
  196. package/src/components/extends/area/AreaFocusTypes.js +36 -36
  197. package/src/components/internal/DefaultRoadmapStyle.js +3365 -3365
  198. package/src/components/internal/GeojsonStyleUtils.js +143 -143
  199. package/src/index.js +25 -25
@@ -21,54 +21,54 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
21
21
  const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
22
22
  const propTypes = { ...viewPropTypes,
23
23
 
24
- /**
25
- * The coordinate of the center of the circle
24
+ /**
25
+ * The coordinate of the center of the circle
26
26
  */
27
27
  center: _propTypes.default.shape({
28
- /**
29
- * Coordinates for the center of the circle.
28
+ /**
29
+ * Coordinates for the center of the circle.
30
30
  */
31
31
  latitude: _propTypes.default.number.isRequired,
32
32
  longitude: _propTypes.default.number.isRequired
33
33
  }).isRequired,
34
34
 
35
- /**
36
- * The radius of the circle to be drawn (in meters)
35
+ /**
36
+ * The radius of the circle to be drawn (in meters)
37
37
  */
38
38
  radius: _propTypes.default.number.isRequired,
39
39
 
40
- /**
41
- * The stroke width to use for the circle.
40
+ /**
41
+ * The stroke width to use for the circle.
42
42
  */
43
43
  strokeWidth: _propTypes.default.number,
44
44
 
45
- /**
46
- * The stroke color to use for the circle.
45
+ /**
46
+ * The stroke color to use for the circle.
47
47
  */
48
48
  strokeColor: _deprecatedReactNativePropTypes.ColorPropType,
49
49
 
50
- /**
51
- * The fill color to use for the circle.
50
+ /**
51
+ * The fill color to use for the circle.
52
52
  */
53
53
  fillColor: _deprecatedReactNativePropTypes.ColorPropType,
54
54
 
55
- /**
56
- * zIndex
55
+ /**
56
+ * zIndex
57
57
  */
58
58
  zIndex: _propTypes.default.number,
59
59
 
60
- /**
61
- * visible
60
+ /**
61
+ * visible
62
62
  */
63
63
  visible: _propTypes.default.bool,
64
64
 
65
- /**
66
- * userData
65
+ /**
66
+ * userData
67
67
  */
68
68
  userData: _propTypes.default.object,
69
69
 
70
- /**
71
- * Callback that is called when the user presses on the circle
70
+ /**
71
+ * Callback that is called when the user presses on the circle
72
72
  */
73
73
  onPress: _propTypes.default.func
74
74
  }; // const defaultProps = {
@@ -122,9 +122,21 @@ class MFCircle extends _react.default.Component {
122
122
  _runCommand(name, args) {
123
123
  switch (_reactNative.Platform.OS) {
124
124
  case 'android':
125
- _reactNative.NativeModules.UIManager.dispatchViewManagerCommand(this._getHandle(), this._uiManagerCommand(name), args);
125
+ {
126
+ if (!_reactNative.UIManager || typeof _reactNative.UIManager.dispatchViewManagerCommand !== 'function') {
127
+ return;
128
+ }
126
129
 
127
- break;
130
+ const commandId = this._uiManagerCommand(name);
131
+
132
+ if (commandId == null) {
133
+ return;
134
+ }
135
+
136
+ _reactNative.UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
137
+
138
+ break;
139
+ }
128
140
 
129
141
  case 'ios':
130
142
  this._mapManagerCommand(name)(this._getHandle(), ...args);
@@ -137,16 +149,22 @@ class MFCircle extends _react.default.Component {
137
149
  }
138
150
 
139
151
  _uiManagerCommand(name) {
140
- const UIManager = _reactNative.NativeModules.UIManager;
152
+ const uiManager = _reactNative.UIManager || _reactNative.NativeModules.UIManager;
141
153
  const componentName = "RMFCircle";
142
154
 
143
- if (!UIManager.getViewManagerConfig) {
155
+ if (!uiManager) {
156
+ return null;
157
+ }
158
+
159
+ if (!uiManager.getViewManagerConfig) {
144
160
  // RN < 0.58
145
- return UIManager[componentName].Commands[name];
161
+ const legacyConfig = uiManager[componentName];
162
+ return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
146
163
  } // RN >= 0.58
147
164
 
148
165
 
149
- return UIManager.getViewManagerConfig(componentName).Commands[name];
166
+ const config = uiManager.getViewManagerConfig(componentName);
167
+ return config && config.Commands ? config.Commands[name] : null;
150
168
  }
151
169
 
152
170
  _mapManagerCommand(name) {
@@ -1 +1 @@
1
- {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","center","PropTypes","shape","latitude","number","isRequired","longitude","radius","strokeWidth","strokeColor","ColorPropType","fillColor","zIndex","visible","bool","userData","object","onPress","func","MFCircle","React","Component","constructor","props","_onPress","bind","_ref","setCenter","_runCommand","setRadius","setFillColor","color","processColor","setStrokeColor","setStrokeWidth","width","setUserData","setZIndex","setVisible","_getHandle","findNodeHandle","circle","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","event","stopPropagation","ref","render","RMFCircle","requireNativeComponent"],"sources":["MFCircle.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n NativeModules,\n findNodeHandle,\n processColor\n} from 'react-native';\n\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The coordinate of the center of the circle\n */\n center: PropTypes.shape({\n /**\n * Coordinates for the center of the circle.\n */\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }).isRequired,\n\n /**\n * The radius of the circle to be drawn (in meters)\n */\n radius: PropTypes.number.isRequired,\n\n /**\n * The stroke width to use for the circle.\n */\n strokeWidth: PropTypes.number,\n\n /**\n * The stroke color to use for the circle.\n */\n strokeColor: ColorPropType,\n\n /**\n * The fill color to use for the circle.\n */\n fillColor: ColorPropType,\n\n /**\n * zIndex\n */\n zIndex: PropTypes.number,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * userData\n */\n userData:PropTypes.object,\n\n /**\n * Callback that is called when the user presses on the circle\n */\n onPress: PropTypes.func,\n};\n\n// const defaultProps = {\n// strokeColor: '#000',\n// strokeWidth: 1,\n// };\n\nclass MFCircle extends React.Component {\n constructor(props) {\n super(props);\n this._onPress = this._onPress.bind(this)\n this._ref = this._ref.bind(this)\n }\n\n setCenter(center) {\n this._runCommand(\"setCenter\", [center])\n }\n setRadius(radius) {\n this._runCommand(\"setRadius\", [radius])\n }\n setFillColor(color) {\n this._runCommand(\"setFillColor\", [processColor(color)])\n }\n setStrokeColor(color) {\n this._runCommand(\"setStrokeColor\", [processColor(color)])\n }\n setStrokeWidth(width) {\n this._runCommand(\"setStrokeWidth\", [width])\n }\n setUserData(userData) {\n this._runCommand(\"setUserData\", [userData])\n }\n setZIndex(zIndex) {\n this._runCommand(\"setZIndex\", [zIndex])\n }\n setVisible(visible) {\n this._runCommand(\"setVisible\", [visible])\n }\n\n _getHandle() {\n return findNodeHandle(this.circle);\n }\n\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n break;\n\n case 'ios':\n this._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n\n default:\n break;\n }\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFCircle\";\n\n if (!UIManager.getViewManagerConfig) {\n // RN < 0.58\n return UIManager[componentName].Commands[name];\n }\n\n // RN >= 0.58 \n return UIManager.getViewManagerConfig(componentName).Commands[name];\n }\n \n _mapManagerCommand(name) {\n return NativeModules[`RMFCircle`][name];\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _ref(ref) {\n this.circle = ref;\n }\n\n render() {\n return <RMFCircle\n {...this.props}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n}\n\nMFCircle.propTypes = propTypes;\n// MFCircle.defaultProps = defaultProps;\n\nvar RMFCircle = requireNativeComponent(`RMFCircle`, MFCircle);\n\nexport {MFCircle}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAQA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;EACEI,MAAM,EAAEC,kBAAA,CAAUC,KAAV,CAAgB;IACtB;AACJ;AACA;IACIC,QAAQ,EAAEF,kBAAA,CAAUG,MAAV,CAAiBC,UAJL;IAKtBC,SAAS,EAAEL,kBAAA,CAAUG,MAAV,CA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AAOI,0BAAA,CAAe,WAAf,EAA2BJ,IAA3B,CAAP;EACD;;EAEDlB,QAAQ,CAAC8B,KAAD,EAAQ;IACdA,KAAK,CAACC,eAAN;;IACE,IAAI,KAAKhC,KAAL,CAAWN,OAAf,EAAwB;MACtB,KAAKM,KAAL,CAAWN,OAAX,CAAmBqC,KAAnB;IACH;EACF;;EAED5B,IAAI,CAAC8B,GAAD,EAAM;IACR,KAAKf,MAAL,GAAce,GAAd;EACD;;EAEDC,MAAM,GAAG;IACP,oBAAO,6BAAC,SAAD,eACD,KAAKlC,KADJ;MAEL,GAAG,EAAE,KAAKG,IAFL;MAGL,OAAO,EAAE,KAAKF;IAHT,GAAP;EAKD;;AA1FoC;;;AA6FvCL,QAAQ,CAACpB,SAAT,GAAqBA,SAArB,C,CACA;;AAEA,IAAI2D,SAAS,GAAG,IAAAC,mCAAA,EAAwB,WAAxB,EAAoCxC,QAApC,CAAhB"}
1
+ {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","center","PropTypes","shape","latitude","number","isRequired","longitude","radius","strokeWidth","strokeColor","ColorPropType","fillColor","zIndex","visible","bool","userData","object","onPress","func","MFCircle","React","Component","constructor","props","_onPress","bind","_ref","setCenter","_runCommand","setRadius","setFillColor","color","processColor","setStrokeColor","setStrokeWidth","width","setUserData","setZIndex","setVisible","_getHandle","findNodeHandle","circle","name","args","Platform","OS","UIManager","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","NativeModules","componentName","getViewManagerConfig","legacyConfig","Commands","config","event","stopPropagation","ref","render","RMFCircle","requireNativeComponent"],"sources":["MFCircle.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n UIManager,\r\n NativeModules,\r\n findNodeHandle,\r\n processColor\r\n} from 'react-native';\r\n\r\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The coordinate of the center of the circle\r\n */\r\n center: PropTypes.shape({\r\n /**\r\n * Coordinates for the center of the circle.\r\n */\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }).isRequired,\r\n\r\n /**\r\n * The radius of the circle to be drawn (in meters)\r\n */\r\n radius: PropTypes.number.isRequired,\r\n\r\n /**\r\n * The stroke width to use for the circle.\r\n */\r\n strokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The stroke color to use for the circle.\r\n */\r\n strokeColor: ColorPropType,\r\n\r\n /**\r\n * The fill color to use for the circle.\r\n */\r\n fillColor: ColorPropType,\r\n\r\n /**\r\n * zIndex\r\n */\r\n zIndex: PropTypes.number,\r\n\r\n /**\r\n * visible\r\n */\r\n visible: PropTypes.bool,\r\n\r\n /**\r\n * userData\r\n */\r\n userData:PropTypes.object,\r\n\r\n /**\r\n * Callback that is called when the user presses on the circle\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\n// const defaultProps = {\r\n// strokeColor: '#000',\r\n// strokeWidth: 1,\r\n// };\r\n\r\nclass MFCircle extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this._onPress = this._onPress.bind(this)\r\n this._ref = this._ref.bind(this)\r\n }\r\n\r\n setCenter(center) {\r\n this._runCommand(\"setCenter\", [center])\r\n }\r\n setRadius(radius) {\r\n this._runCommand(\"setRadius\", [radius])\r\n }\r\n setFillColor(color) {\r\n this._runCommand(\"setFillColor\", [processColor(color)])\r\n }\r\n setStrokeColor(color) {\r\n this._runCommand(\"setStrokeColor\", [processColor(color)])\r\n }\r\n setStrokeWidth(width) {\r\n this._runCommand(\"setStrokeWidth\", [width])\r\n }\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.circle);\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 _uiManagerCommand(name) {\r\n const uiManager = UIManager || NativeModules.UIManager;\r\n const componentName = \"RMFCircle\";\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[`RMFCircle`][name];\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 _ref(ref) {\r\n this.circle = ref;\r\n }\r\n\r\n render() {\r\n return <RMFCircle\r\n {...this.props}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFCircle.propTypes = propTypes;\r\n// MFCircle.defaultProps = defaultProps;\r\n\r\nvar RMFCircle = requireNativeComponent(`RMFCircle`, MFCircle);\r\n\r\nexport {MFCircle}\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AASA;AACA,MAAMA,aAAa,GA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,WAAxB,EAAoC5C,QAApC,CAAhB"}
@@ -20,70 +20,70 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
20
20
  const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
21
21
  const propTypes = { ...viewPropTypes,
22
22
 
23
- /**
24
- * The directions to display on the map,
25
- * retrieved as an array of array of coordinates to describe the routes.
26
- * Similar to directions prop but has higher priority
23
+ /**
24
+ * The directions to display on the map,
25
+ * retrieved as an array of array of coordinates to describe the routes.
26
+ * Similar to directions prop but has higher priority
27
27
  */
28
28
  routes: _propTypes.default.arrayOf(_propTypes.default.arrayOf(_propTypes.default.shape({
29
29
  latitude: _propTypes.default.number.isRequired,
30
30
  longitude: _propTypes.default.number.isRequired
31
31
  }))),
32
32
 
33
- /**
34
- * The directions to display on the map,
35
- * retrieved as a json string from Get route Map4D API (/sdk/route).
36
- * Similar to routes prop but with lower priority
33
+ /**
34
+ * The directions to display on the map,
35
+ * retrieved as a json string from Get route Map4D API (/sdk/route).
36
+ * Similar to routes prop but with lower priority
37
37
  */
38
38
  directions: _propTypes.default.string,
39
39
 
40
- /**
41
- * The index of the main route, default value is 0.
40
+ /**
41
+ * The index of the main route, default value is 0.
42
42
  */
43
43
  activedIndex: _propTypes.default.number,
44
44
 
45
- /**
46
- * The active route stroke width.
45
+ /**
46
+ * The active route stroke width.
47
47
  */
48
48
  activeStrokeWidth: _propTypes.default.number,
49
49
 
50
- /**
51
- * The active route color.
50
+ /**
51
+ * The active route color.
52
52
  */
53
53
  activeStrokeColor: _deprecatedReactNativePropTypes.ColorPropType,
54
54
 
55
- /**
56
- * The active route outline stroke width.
55
+ /**
56
+ * The active route outline stroke width.
57
57
  */
58
58
  activeOutlineWidth: _propTypes.default.number,
59
59
 
60
- /**
61
- * The active route outline color.
60
+ /**
61
+ * The active route outline color.
62
62
  */
63
63
  activeOutlineColor: _deprecatedReactNativePropTypes.ColorPropType,
64
64
 
65
- /**
66
- * The inactive route stroke width.
65
+ /**
66
+ * The inactive route stroke width.
67
67
  */
68
68
  inactiveStrokeWidth: _propTypes.default.number,
69
69
 
70
- /**
71
- * The inactive route color.
70
+ /**
71
+ * The inactive route color.
72
72
  */
73
73
  inactiveStrokeColor: _deprecatedReactNativePropTypes.ColorPropType,
74
74
 
75
- /**
76
- * The inactive route outline stroke width.
75
+ /**
76
+ * The inactive route outline stroke width.
77
77
  */
78
78
  inactiveOutlineWidth: _propTypes.default.number,
79
79
 
80
- /**
81
- * The inactive route outline color.
80
+ /**
81
+ * The inactive route outline color.
82
82
  */
83
83
  inactiveOutlineColor: _deprecatedReactNativePropTypes.ColorPropType,
84
84
 
85
- /**
86
- * The options of the origin POI.
85
+ /**
86
+ * The options of the origin POI.
87
87
  */
88
88
  originPOIOptions: _propTypes.default.shape({
89
89
  coordinate: _propTypes.default.shape({
@@ -98,8 +98,8 @@ const propTypes = { ...viewPropTypes,
98
98
  visible: _propTypes.default.bool
99
99
  }),
100
100
 
101
- /**
102
- * The options of the destination POI.
101
+ /**
102
+ * The options of the destination POI.
103
103
  */
104
104
  destinationPOIOptions: _propTypes.default.shape({
105
105
  coordinate: _propTypes.default.shape({
@@ -114,8 +114,8 @@ const propTypes = { ...viewPropTypes,
114
114
  visible: _propTypes.default.bool
115
115
  }),
116
116
 
117
- /**
118
- * Callback that is called when the user presses on the routes.
117
+ /**
118
+ * Callback that is called when the user presses on the routes.
119
119
  */
120
120
  onPress: _propTypes.default.func
121
121
  };
@@ -197,9 +197,21 @@ class MFDirectionsRenderer extends _react.default.Component {
197
197
  _runCommand(name, args) {
198
198
  switch (_reactNative.Platform.OS) {
199
199
  case 'android':
200
- _reactNative.NativeModules.UIManager.dispatchViewManagerCommand(this._getHandle(), this._uiManagerCommand(name), args);
200
+ {
201
+ if (!_reactNative.UIManager || typeof _reactNative.UIManager.dispatchViewManagerCommand !== 'function') {
202
+ return;
203
+ }
201
204
 
202
- break;
205
+ const commandId = this._uiManagerCommand(name);
206
+
207
+ if (commandId == null) {
208
+ return;
209
+ }
210
+
211
+ _reactNative.UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
212
+
213
+ break;
214
+ }
203
215
 
204
216
  case 'ios':
205
217
  this._mapManagerCommand(name)(this._getHandle(), ...args);
@@ -216,16 +228,22 @@ class MFDirectionsRenderer extends _react.default.Component {
216
228
  }
217
229
 
218
230
  _uiManagerCommand(name) {
219
- const UIManager = _reactNative.NativeModules.UIManager;
231
+ const uiManager = _reactNative.UIManager || _reactNative.NativeModules.UIManager;
220
232
  const componentName = "RMFDirectionsRenderer";
221
233
 
222
- if (!UIManager.getViewManagerConfig) {
234
+ if (!uiManager) {
235
+ return null;
236
+ }
237
+
238
+ if (!uiManager.getViewManagerConfig) {
223
239
  // RN < 0.58
224
- return UIManager[componentName].Commands[name];
240
+ const legacyConfig = uiManager[componentName];
241
+ return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
225
242
  } // RN >= 0.58
226
243
 
227
244
 
228
- return UIManager.getViewManagerConfig(componentName).Commands[name];
245
+ const config = uiManager.getViewManagerConfig(componentName);
246
+ return config && config.Commands ? config.Commands[name] : null;
229
247
  }
230
248
 
231
249
  _mapManagerCommand(name) {
@@ -1 +1 @@
1
- {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","routes","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","ColorPropType","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","React","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","processColor","Image","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_getHandle","_uiManagerCommand","_mapManagerCommand","findNodeHandle","componentName","getViewManagerConfig","Commands","RMFDirectionsRenderer","requireNativeComponent"],"sources":["MFDirectionsRenderer.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n Image,\n NativeModules,\n findNodeHandle,\n processColor\n} from 'react-native';\n\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The directions to display on the map,\n * retrieved as an array of array of coordinates to describe the routes.\n * Similar to directions prop but has higher priority\n */\n routes: PropTypes.arrayOf(\n PropTypes.arrayOf(\n PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n })\n )\n ),\n\n /**\n * The directions to display on the map,\n * retrieved as a json string from Get route Map4D API (/sdk/route).\n * Similar to routes prop but with lower priority\n */\n directions: PropTypes.string,\n\n /**\n * The index of the main route, default value is 0.\n */\n activedIndex: PropTypes.number,\n\n /**\n * The active route stroke width.\n */\n activeStrokeWidth: PropTypes.number,\n\n /**\n * The active route color.\n */\n activeStrokeColor: ColorPropType,\n\n /**\n * The active route outline stroke width.\n */\n activeOutlineWidth: PropTypes.number,\n\n /**\n * The active route outline color.\n */\n activeOutlineColor: ColorPropType,\n\n /**\n * The inactive route stroke width.\n */\n inactiveStrokeWidth: PropTypes.number,\n\n /**\n * The inactive route color.\n */\n inactiveStrokeColor: ColorPropType,\n\n /**\n * The inactive route outline stroke width.\n */\n inactiveOutlineWidth: PropTypes.number,\n\n /**\n * The inactive route outline color.\n */\n inactiveOutlineColor: ColorPropType,\n\n /**\n * The options of the origin POI.\n */\n originPOIOptions: PropTypes.shape({\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired\n }),\n\n title: PropTypes.string,\n\n titleColor: ColorPropType,\n\n visible: PropTypes.bool,\n }),\n\n /**\n * The options of the destination POI.\n */\n destinationPOIOptions: PropTypes.shape({\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired\n }),\n\n title: PropTypes.string,\n\n titleColor: ColorPropType,\n\n visible: PropTypes.bool,\n }),\n\n /**\n * Callback that is called when the user presses on the routes.\n */\n onPress: PropTypes.func,\n};\n\nclass MFDirectionsRenderer extends React.Component {\n constructor(props) {\n super(props)\n this._ref = this._ref.bind(this)\n this._onPress = this._onPress.bind(this)\n }\n\n setActivedIndex(index) {\n this._runCommand(\"setActivedIndex\", [index])\n }\n\n setRoutes(routes) {\n this._runCommand(\"setRoutes\", [routes])\n }\n\n setDirections(directions) {\n this._runCommand(\"setDirections\", [directions])\n }\n\n render() {\n let originPOIOptions = this.props.originPOIOptions\n if (originPOIOptions) {\n if (originPOIOptions.titleColor) {\n originPOIOptions.titleColor = processColor(originPOIOptions.titleColor)\n }\n if (originPOIOptions.icon) {\n let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {uri: originPOIOptions.icon.uri};\n originPOIOptions.icon = {uri: uri.uri}\n }\n }\n\n let destinationPOIOptions = this.props.destinationPOIOptions\n if (destinationPOIOptions) {\n if (destinationPOIOptions.titleColor) {\n destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor)\n }\n if (destinationPOIOptions.icon) {\n let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {uri: destinationPOIOptions.icon.uri};\n destinationPOIOptions.icon = {uri: uri.uri}\n }\n }\n\n return <RMFDirectionsRenderer\n {...this.props}\n originPOIOptions={originPOIOptions}\n destinationPOIOptions={destinationPOIOptions}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n\n _ref(ref) {\n this.renderer = ref;\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n break;\n\n case 'ios':\n this._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n\n default:\n break;\n }\n }\n\n _getHandle() {\n return findNodeHandle(this.renderer);\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFDirectionsRenderer\";\n\n if (!UIManager.getViewManagerConfig) {\n // RN < 0.58\n return UIManager[componentName].Commands[name];\n }\n\n // RN >= 0.58 \n return UIManager.getViewManagerConfig(componentName).Commands[name];\n }\n\n _mapManagerCommand(name) {\n return NativeModules[`RMFDirectionsRenderer`][name];\n }\n}\n\nMFDirectionsRenderer.propTypes = propTypes;\n\nvar RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);\n\nexport { MFDirectionsRenderer }\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AASA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;AACA;AACA;EACEI,MAAM,EAAEC,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUC,OAAV,CACED,kBAAA,CAAUE,KAAV,CAAgB;IACdC,QAAQ,EAAEH,kBAAA,CAAUI,MAAV,CAAiBC,UADb;IAEdC,SAAS,EAAEN,kBAAA,CAAUI,MAAV,CAAiBC;EAFd,CAAhB,CADF,CADM,CARQ;;EAiBhB;AACF;AACA;AACA;AACA;EACEE,UAAU,EAAEP,kBAAA,CAAUQ,MAtBN;;EAwBhB;AACF;AACA;EACEC,YAAY,EAAET,kBAAA,CAAUI,MA3BR;;EA6BhB;AACF;AACA;EACEM,iBAAiB,EAAEV,kBAAA,CAAUI,MAhCb;;EAkChB;AACF;AACA;EACEO,iBAAiB,EAAEC,6CArCH;;EAuChB;AACF;AACA;EACEC,kBAAkB,EAAE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EAA8B,KAAKO,UAAL,EAA9B,EAAiD,GAAGN,IAApD;;QACA;;MAEF;QACE;IAdJ;EAgBD;;EAEDM,UAAU,GAAG;IACX,OAAO,IAAAG,2BAAA,EAAe,KAAKb,QAApB,CAAP;EACD;;EAEDW,iBAAiB,CAACR,IAAD,EAAO;IACtB,MAAMK,SAAS,GAAGD,0BAAA,CAAcC,SAAhC;IACA,MAAMM,aAAa,GAAG,uBAAtB;;IAEA,IAAI,CAACN,SAAS,CAACO,oBAAf,EAAqC;MACnC;MACA,OAAOP,SAAS,CAACM,aAAD,CAAT,CAAyBE,QAAzB,CAAkCb,IAAlC,CAAP;IACD,CAPqB,CAStB;;;IACA,OAAOK,SAAS,CAACO,oBAAV,CAA+BD,aAA/B,EAA8CE,QAA9C,CAAuDb,IAAvD,CAAP;EACD;;EAEDS,kBAAkB,CAACT,IAAD,EAAO;IACvB,OAAOI,0BAAA,CAAe,uBAAf,EAAuCJ,IAAvC,CAAP;EACD;;AApGgD;;;AAuGnDrB,oBAAoB,CAACjC,SAArB,GAAiCA,SAAjC;AAEA,IAAIoE,qBAAqB,GAAG,IAAAC,mCAAA,EAAwB,uBAAxB,EAAgDpC,oBAAhD,CAA5B"}
1
+ {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","routes","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","ColorPropType","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","React","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","processColor","Image","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","Platform","OS","UIManager","dispatchViewManagerCommand","commandId","_uiManagerCommand","_getHandle","_mapManagerCommand","findNodeHandle","uiManager","NativeModules","componentName","getViewManagerConfig","legacyConfig","Commands","config","RMFDirectionsRenderer","requireNativeComponent"],"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;;AACA;;AACA;;AACA;;;;;;AAUA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;AACA;AACA;EACEI,MAAM,EAAEC,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUC,OAAV,CACED,kBAAA,CAAUE,KAAV,CAAgB;IACdC,QAAQ,EAAEH,kBAAA,CAAUI,MAAV,CAAiBC,UADb;IAEdC,SAAS,EAAEN,kBAAA,CAAUI,MAAV,CAAiBC;EAFd,CAAhB,CADF,CADM,CARQ;;EAiBhB;AACF;AACA;AACA;AACA;EACEE,UAAU,EAAEP,kBAAA,CAAUQ,MAtBN;;EAwBhB;AACF;AACA;EACEC,YAAY,EAAET,kBAAA,CAAUI,MA3BR;;EA6BhB;AACF;AACA;EACEM,iBAAiB,EAAEV,kBAAA,CAAUI,MAhCb;;EAkChB;AACF;AACA;EACEO,iBAAiB,EAAEC,6CArCH;;EAuChB;AACF;AACA;EACEC,kBAAkB,EAAEb,kBAAA,CAAUI,MA1Cd;;EA4ChB;AACF;AACA;EACEU,kBAAkB,EAAEF,6CA/CJ;;EAiDhB;AACF;AACA;EACEG,mBAAmB,EAAEf,kBAAA,CAAUI,MApDf;;EAsDhB;AACF;AACA;EACEY,mBAAmB,EAAEJ,6CAzDL;;EA2DhB;AACF;AACA;EACEK,oBAAoB,EAAEjB,kBAAA,CAAUI,MA9DhB;;EAgEhB;AACF;AACA;EACEc,oBAAoB,EAAEN,6CAnEN;;EAqEhB;AACF;AACA;EACEO,gBAAgB,EAAEnB,kBAAA,CAAUE,KAAV,CAAgB;IAChCkB,UAAU,EAAEpB,kBAAA,CAAUE,KAAV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