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

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 (217) hide show
  1. package/README.md +58 -0
  2. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  3. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  4. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  5. package/android/build.gradle +2 -2
  6. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +39 -27
  7. package/ios/Map4dMap.h +12 -3
  8. package/ios/Map4dMap.m +108 -3
  9. package/ios/Map4dMapTurbo.mm +16 -0
  10. package/ios/RMFCircleManager.m +40 -68
  11. package/ios/RMFDirectionsRendererManager.m +26 -24
  12. package/ios/RMFMapViewManager.m +64 -149
  13. package/ios/RMFMarkerManager.m +36 -64
  14. package/ios/RMFPOIManager.m +40 -74
  15. package/ios/RMFPolygonManager.m +38 -60
  16. package/ios/RMFPolylineManager.m +36 -58
  17. package/ios/building/RMFBuildingManager.m +36 -64
  18. package/lib/commonjs/components/MFBanDoSo/constants.js +27 -0
  19. package/lib/commonjs/components/MFBanDoSo/constants.js.map +1 -0
  20. package/lib/commonjs/components/MFBanDoSo/helpers.js +200 -0
  21. package/lib/commonjs/components/MFBanDoSo/helpers.js.map +1 -0
  22. package/lib/commonjs/components/MFBanDoSo/propTypes.js +18 -0
  23. package/lib/commonjs/components/MFBanDoSo/propTypes.js.map +1 -0
  24. package/lib/commonjs/components/MFBanDoSo/styles.js +328 -0
  25. package/lib/commonjs/components/MFBanDoSo/styles.js.map +1 -0
  26. package/lib/commonjs/components/MFBanDoSo/ui.js +220 -0
  27. package/lib/commonjs/components/MFBanDoSo/ui.js.map +1 -0
  28. package/lib/commonjs/components/MFBanDoSo.js +190 -73
  29. package/lib/commonjs/components/MFBanDoSo.js.map +1 -1
  30. package/lib/commonjs/components/MFBuilding.js +15 -90
  31. package/lib/commonjs/components/MFBuilding.js.map +1 -1
  32. package/lib/commonjs/components/MFCircle.js +20 -88
  33. package/lib/commonjs/components/MFCircle.js.map +1 -1
  34. package/lib/commonjs/components/MFDirectionsRenderer.js +15 -93
  35. package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
  36. package/lib/commonjs/components/MFMapView.js +50 -147
  37. package/lib/commonjs/components/MFMapView.js.map +1 -1
  38. package/lib/commonjs/components/MFMarker.js +15 -101
  39. package/lib/commonjs/components/MFMarker.js.map +1 -1
  40. package/lib/commonjs/components/MFPOI.js +17 -92
  41. package/lib/commonjs/components/MFPOI.js.map +1 -1
  42. package/lib/commonjs/components/MFPolygon.js +15 -87
  43. package/lib/commonjs/components/MFPolygon.js.map +1 -1
  44. package/lib/commonjs/components/MFPolyline.js +17 -87
  45. package/lib/commonjs/components/MFPolyline.js.map +1 -1
  46. package/lib/commonjs/components/MFTileOverlay.js +7 -15
  47. package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
  48. package/lib/commonjs/components/Map4dMapView.js +1 -4
  49. package/lib/commonjs/components/Map4dMapView.js.map +1 -1
  50. package/lib/commonjs/components/extends/AreaFocusManager.js +4 -38
  51. package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -1
  52. package/lib/commonjs/components/extends/AreaFocuser.js +1 -17
  53. package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -1
  54. package/lib/commonjs/components/extends/BoundHelper.js +0 -6
  55. package/lib/commonjs/components/extends/BoundHelper.js.map +1 -1
  56. package/lib/commonjs/components/extends/area/AreaFocusAreas.js +0 -37
  57. package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -1
  58. package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js +1 -35
  59. package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
  60. package/lib/commonjs/components/extends/area/AreaFocusSession.js +0 -18
  61. package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -1
  62. package/lib/commonjs/components/extends/area/AreaFocusTypes.js +2 -3
  63. package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -1
  64. package/lib/commonjs/components/internal/DefaultRoadmapStyle.js +1 -2
  65. package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -1
  66. package/lib/commonjs/components/internal/GeojsonStyleUtils.js +20 -31
  67. package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -1
  68. package/lib/commonjs/index.js +0 -11
  69. package/lib/commonjs/index.js.map +1 -1
  70. package/lib/commonjs/native/Map4dMapNativeModule.js +10 -0
  71. package/lib/commonjs/native/Map4dMapNativeModule.js.map +1 -0
  72. package/lib/commonjs/native/NativeModuleResolver.js +35 -0
  73. package/lib/commonjs/native/NativeModuleResolver.js.map +1 -0
  74. package/lib/commonjs/native/ViewManagerCommand.js +67 -0
  75. package/lib/commonjs/native/ViewManagerCommand.js.map +1 -0
  76. package/lib/commonjs/package.json +1 -0
  77. package/lib/commonjs/specs/NativeMap4dMap.js +9 -0
  78. package/lib/commonjs/specs/NativeMap4dMap.js.map +1 -0
  79. package/lib/module/components/MFBanDoSo/constants.js +22 -0
  80. package/lib/module/components/MFBanDoSo/constants.js.map +1 -0
  81. package/lib/module/components/MFBanDoSo/helpers.js +188 -0
  82. package/lib/module/components/MFBanDoSo/helpers.js.map +1 -0
  83. package/lib/module/components/MFBanDoSo/propTypes.js +14 -0
  84. package/lib/module/components/MFBanDoSo/propTypes.js.map +1 -0
  85. package/lib/module/components/MFBanDoSo/styles.js +325 -0
  86. package/lib/module/components/MFBanDoSo/styles.js.map +1 -0
  87. package/lib/module/components/MFBanDoSo/ui.js +213 -0
  88. package/lib/module/components/MFBanDoSo/ui.js.map +1 -0
  89. package/lib/module/components/MFBanDoSo.js +192 -63
  90. package/lib/module/components/MFBanDoSo.js.map +1 -1
  91. package/lib/module/components/MFBuilding.js +17 -82
  92. package/lib/module/components/MFBuilding.js.map +1 -1
  93. package/lib/module/components/MFCircle.js +22 -80
  94. package/lib/module/components/MFCircle.js.map +1 -1
  95. package/lib/module/components/MFDirectionsRenderer.js +16 -85
  96. package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
  97. package/lib/module/components/MFMapView.js +51 -136
  98. package/lib/module/components/MFMapView.js.map +1 -1
  99. package/lib/module/components/MFMarker.js +17 -92
  100. package/lib/module/components/MFMarker.js.map +1 -1
  101. package/lib/module/components/MFPOI.js +19 -84
  102. package/lib/module/components/MFPOI.js.map +1 -1
  103. package/lib/module/components/MFPolygon.js +17 -79
  104. package/lib/module/components/MFPolygon.js.map +1 -1
  105. package/lib/module/components/MFPolyline.js +19 -79
  106. package/lib/module/components/MFPolyline.js.map +1 -1
  107. package/lib/module/components/MFTileOverlay.js +10 -9
  108. package/lib/module/components/MFTileOverlay.js.map +1 -1
  109. package/lib/module/components/Map4dMapView.js +2 -0
  110. package/lib/module/components/Map4dMapView.js.map +1 -1
  111. package/lib/module/components/extends/AreaFocusManager.js +6 -32
  112. package/lib/module/components/extends/AreaFocusManager.js.map +1 -1
  113. package/lib/module/components/extends/AreaFocuser.js +3 -15
  114. package/lib/module/components/extends/AreaFocuser.js.map +1 -1
  115. package/lib/module/components/extends/BoundHelper.js +2 -5
  116. package/lib/module/components/extends/BoundHelper.js.map +1 -1
  117. package/lib/module/components/extends/area/AreaFocusAreas.js +2 -33
  118. package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -1
  119. package/lib/module/components/extends/area/AreaFocusGeometryUtils.js +2 -32
  120. package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
  121. package/lib/module/components/extends/area/AreaFocusSession.js +2 -17
  122. package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -1
  123. package/lib/module/components/extends/area/AreaFocusTypes.js +3 -0
  124. package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -1
  125. package/lib/module/components/internal/DefaultRoadmapStyle.js +2 -0
  126. package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -1
  127. package/lib/module/components/internal/GeojsonStyleUtils.js +21 -28
  128. package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -1
  129. package/lib/module/index.js +2 -0
  130. package/lib/module/index.js.map +1 -1
  131. package/lib/module/native/Map4dMapNativeModule.js +5 -0
  132. package/lib/module/native/Map4dMapNativeModule.js.map +1 -0
  133. package/lib/module/native/NativeModuleResolver.js +29 -0
  134. package/lib/module/native/NativeModuleResolver.js.map +1 -0
  135. package/lib/module/native/ViewManagerCommand.js +61 -0
  136. package/lib/module/native/ViewManagerCommand.js.map +1 -0
  137. package/lib/module/specs/NativeMap4dMap.js +5 -0
  138. package/lib/module/specs/NativeMap4dMap.js.map +1 -0
  139. package/lib/typescript/components/MFBanDoSo/constants.d.ts +8 -0
  140. package/lib/typescript/components/MFBanDoSo/constants.d.ts.map +1 -0
  141. package/lib/typescript/components/MFBanDoSo/helpers.d.ts +14 -0
  142. package/lib/typescript/components/MFBanDoSo/helpers.d.ts.map +1 -0
  143. package/lib/typescript/components/MFBanDoSo/propTypes.d.ts +2 -0
  144. package/lib/typescript/components/MFBanDoSo/propTypes.d.ts.map +1 -0
  145. package/lib/typescript/components/MFBanDoSo/styles.d.ts +462 -0
  146. package/lib/typescript/components/MFBanDoSo/styles.d.ts.map +1 -0
  147. package/lib/typescript/components/MFBanDoSo/ui.d.ts +30 -0
  148. package/lib/typescript/components/MFBanDoSo/ui.d.ts.map +1 -0
  149. package/lib/typescript/components/MFBanDoSo.d.ts +37 -0
  150. package/lib/typescript/components/MFBanDoSo.d.ts.map +1 -0
  151. package/lib/typescript/components/MFBuilding.d.ts +24 -0
  152. package/lib/typescript/components/MFBuilding.d.ts.map +1 -0
  153. package/lib/typescript/components/MFCircle.d.ts +24 -0
  154. package/lib/typescript/components/MFCircle.d.ts.map +1 -0
  155. package/lib/typescript/components/MFDirectionsRenderer.d.ts +19 -0
  156. package/lib/typescript/components/MFDirectionsRenderer.d.ts.map +1 -0
  157. package/lib/typescript/components/MFMapView.d.ts +66 -0
  158. package/lib/typescript/components/MFMapView.d.ts.map +1 -0
  159. package/lib/typescript/components/MFMarker.d.ts +26 -0
  160. package/lib/typescript/components/MFMarker.d.ts.map +1 -0
  161. package/lib/typescript/components/MFPOI.d.ts +24 -0
  162. package/lib/typescript/components/MFPOI.d.ts.map +1 -0
  163. package/lib/typescript/components/MFPolygon.d.ts +24 -0
  164. package/lib/typescript/components/MFPolygon.d.ts.map +1 -0
  165. package/lib/typescript/components/MFPolyline.d.ts +24 -0
  166. package/lib/typescript/components/MFPolyline.d.ts.map +1 -0
  167. package/lib/typescript/components/MFTileOverlay.d.ts +12 -0
  168. package/lib/typescript/components/MFTileOverlay.d.ts.map +1 -0
  169. package/lib/typescript/components/Map4dMapView.d.ts +8 -7
  170. package/lib/typescript/components/Map4dMapView.d.ts.map +1 -0
  171. package/lib/typescript/components/extends/AreaFocusManager.d.ts +34 -0
  172. package/lib/typescript/components/extends/AreaFocusManager.d.ts.map +1 -0
  173. package/lib/typescript/components/extends/AreaFocuser.d.ts +15 -0
  174. package/lib/typescript/components/extends/AreaFocuser.d.ts.map +1 -0
  175. package/lib/typescript/components/extends/BoundHelper.d.ts +11 -0
  176. package/lib/typescript/components/extends/BoundHelper.d.ts.map +1 -0
  177. package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts +58 -0
  178. package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts.map +1 -0
  179. package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts +19 -0
  180. package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts.map +1 -0
  181. package/lib/typescript/components/extends/area/AreaFocusSession.d.ts +14 -0
  182. package/lib/typescript/components/extends/area/AreaFocusSession.d.ts.map +1 -0
  183. package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts +40 -0
  184. package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts.map +1 -0
  185. package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts +820 -0
  186. package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts.map +1 -0
  187. package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts +3 -0
  188. package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts.map +1 -0
  189. package/lib/typescript/index.d.ts +13 -0
  190. package/lib/typescript/index.d.ts.map +1 -0
  191. package/lib/typescript/native/Map4dMapNativeModule.d.ts +2 -0
  192. package/lib/typescript/native/Map4dMapNativeModule.d.ts.map +1 -0
  193. package/lib/typescript/native/NativeModuleResolver.d.ts +3 -0
  194. package/lib/typescript/native/NativeModuleResolver.d.ts.map +1 -0
  195. package/lib/typescript/native/ViewManagerCommand.d.ts +11 -0
  196. package/lib/typescript/native/ViewManagerCommand.d.ts.map +1 -0
  197. package/package.json +27 -11
  198. package/src/components/MFBanDoSo/constants.js +32 -0
  199. package/src/components/MFBanDoSo/helpers.js +273 -0
  200. package/src/components/MFBanDoSo/propTypes.js +14 -0
  201. package/src/components/MFBanDoSo/styles.js +316 -0
  202. package/src/components/MFBanDoSo/ui.js +230 -0
  203. package/src/components/MFBanDoSo.js +268 -78
  204. package/src/components/MFBuilding.js +8 -48
  205. package/src/components/MFCircle.js +8 -48
  206. package/src/components/MFDirectionsRenderer.js +8 -47
  207. package/src/components/MFMapView.js +31 -53
  208. package/src/components/MFMarker.js +9 -50
  209. package/src/components/MFPOI.js +8 -48
  210. package/src/components/MFPolygon.js +8 -48
  211. package/src/components/MFPolyline.js +8 -48
  212. package/src/components/internal/GeojsonStyleUtils.js +3 -0
  213. package/src/native/Map4dMapNativeModule.js +3 -0
  214. package/src/native/NativeModuleResolver.js +33 -0
  215. package/src/native/ViewManagerCommand.js +82 -0
  216. package/src/specs/NativeMap4dMap.js +12 -0
  217. package/ios/Map4dMapViewManager.m +0 -34
@@ -1,13 +1,16 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ "use strict";
2
2
 
3
3
  import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
6
- import { requireNativeComponent, Platform, UIManager, NativeModules, findNodeHandle, processColor } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
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 = { ...viewPropTypes,
10
-
12
+ const propTypes = {
13
+ ...viewPropTypes,
11
14
  /**
12
15
  * An array of coordinates to describe the polygon
13
16
  */
@@ -18,7 +21,6 @@ const propTypes = { ...viewPropTypes,
18
21
  latitude: PropTypes.number.isRequired,
19
22
  longitude: PropTypes.number.isRequired
20
23
  })),
21
-
22
24
  /**
23
25
  * An array of array of coordinates to describe the polygon holes
24
26
  */
@@ -29,158 +31,94 @@ const propTypes = { ...viewPropTypes,
29
31
  latitude: PropTypes.number.isRequired,
30
32
  longitude: PropTypes.number.isRequired
31
33
  }))),
32
-
33
34
  /**
34
35
  * The color to use for the polygon.
35
36
  */
36
37
  fillColor: ColorPropType,
37
-
38
38
  /**
39
39
  * The color to use for the polygon stroke.
40
40
  */
41
41
  strokeColor: ColorPropType,
42
-
43
42
  /**
44
43
  * The stroke width to use for the polygon.
45
44
  */
46
45
  strokeWidth: PropTypes.number,
47
-
48
46
  /**
49
47
  * zIndex
50
48
  */
51
49
  zIndex: PropTypes.number,
52
-
53
50
  /**
54
51
  * visible
55
52
  */
56
53
  visible: PropTypes.bool,
57
-
58
54
  /**
59
55
  * userData
60
56
  */
61
57
  userData: PropTypes.object,
62
-
63
58
  /**
64
59
  * Callback that is called when the user presses on the polygon
65
60
  */
66
61
  onPress: PropTypes.func
67
62
  };
68
-
69
63
  class MFPolygon extends React.Component {
70
64
  constructor(props) {
71
65
  super(props);
72
66
  this._onPress = this._onPress.bind(this);
73
67
  this._ref = this._ref.bind(this);
74
68
  }
75
-
76
69
  _onPress(event) {
77
70
  event.stopPropagation();
78
-
79
71
  if (this.props.onPress) {
80
72
  this.props.onPress(event);
81
73
  }
82
74
  }
83
-
84
75
  _ref(ref) {
85
76
  this.polygon = ref;
86
77
  }
87
-
88
78
  setCoordinates(coordinates) {
89
79
  this._runCommand("setCoordinates", [coordinates]);
90
80
  }
91
-
92
81
  setHoles(holes) {
93
82
  this._runCommand("setHoles", [holes]);
94
83
  }
95
-
96
84
  setFillColor(color) {
97
85
  this._runCommand("setFillColor", [processColor(color)]);
98
86
  }
99
-
100
87
  setStrokeColor(color) {
101
88
  this._runCommand("setStrokeColor", [processColor(color)]);
102
89
  }
103
-
104
90
  setStrokeWidth(width) {
105
91
  this._runCommand("setStrokeWidth", [width]);
106
92
  }
107
-
108
93
  setVisible(visible) {
109
94
  this._runCommand("setVisible", [visible]);
110
95
  }
111
-
112
96
  setZIndex(zIndex) {
113
97
  this._runCommand("setZIndex", [zIndex]);
114
98
  }
115
-
116
99
  setUserData(userData) {
117
100
  this._runCommand("setUserData", [userData]);
118
101
  }
119
-
120
102
  _getHandle() {
121
103
  return findNodeHandle(this.polygon);
122
104
  }
123
-
124
105
  _runCommand(name, args) {
125
- switch (Platform.OS) {
126
- case 'android':
127
- {
128
- if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {
129
- return;
130
- }
131
-
132
- const commandId = this._uiManagerCommand(name);
133
-
134
- if (commandId == null) {
135
- return;
136
- }
137
-
138
- UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
139
- break;
140
- }
141
-
142
- case 'ios':
143
- this._mapManagerCommand(name)(this._getHandle(), ...args);
144
-
145
- break;
146
-
147
- default:
148
- break;
149
- }
106
+ return runViewManagerCommand({
107
+ componentName: 'RMFPolygon',
108
+ moduleName: 'RMFPolygon',
109
+ commandName: name,
110
+ args,
111
+ reactTag: this._getHandle()
112
+ });
150
113
  }
151
-
152
- _uiManagerCommand(name) {
153
- const uiManager = UIManager || NativeModules.UIManager;
154
- const componentName = "RMFPolygon";
155
-
156
- if (!uiManager) {
157
- return null;
158
- }
159
-
160
- if (!uiManager.getViewManagerConfig) {
161
- // RN < 0.58
162
- const legacyConfig = uiManager[componentName];
163
- return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
164
- } // RN >= 0.58
165
-
166
-
167
- const config = uiManager.getViewManagerConfig(componentName);
168
- return config && config.Commands ? config.Commands[name] : null;
169
- }
170
-
171
- _mapManagerCommand(name) {
172
- return NativeModules[`RMFPolygon`][name];
173
- }
174
-
175
114
  render() {
176
- return /*#__PURE__*/React.createElement(RMFPolygon, _extends({}, this.props, {
115
+ return /*#__PURE__*/_jsx(RMFPolygon, {
116
+ ...this.props,
177
117
  ref: this._ref,
178
118
  onPress: this._onPress
179
- }));
119
+ });
180
120
  }
181
-
182
121
  }
183
-
184
122
  MFPolygon.propTypes = propTypes;
185
123
  var RMFPolygon = requireNativeComponent(`RMFPolygon`, MFPolygon);
186
124
  export { MFPolygon };
@@ -1 +1 @@
1
- {"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","UIManager","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","coordinates","arrayOf","shape","latitude","number","isRequired","longitude","holes","fillColor","strokeColor","strokeWidth","zIndex","visible","bool","userData","object","onPress","func","MFPolygon","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polygon","setCoordinates","_runCommand","setHoles","setFillColor","color","setStrokeColor","setStrokeWidth","width","setVisible","setZIndex","setUserData","_getHandle","name","args","OS","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","legacyConfig","Commands","config","render","RMFPolygon"],"sources":["MFPolygon.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 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 * An array of coordinates to describe the polygon\r\n */\r\n coordinates: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n /**\r\n * Latitude/Longitude coordinates\r\n */\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n })\r\n ),\r\n\r\n /**\r\n * An array of array of coordinates to describe the polygon holes\r\n */\r\n holes: PropTypes.arrayOf(\r\n PropTypes.arrayOf(\r\n PropTypes.shape({\r\n /**\r\n * Latitude/Longitude coordinates\r\n */\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 color to use for the polygon.\r\n */\r\n fillColor: ColorPropType,\r\n\r\n /**\r\n * The color to use for the polygon stroke.\r\n */\r\n strokeColor: ColorPropType,\r\n\r\n /**\r\n * The stroke width to use for the polygon.\r\n */\r\n strokeWidth: PropTypes.number,\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 polygon\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\n\r\nclass MFPolygon 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 _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.polygon = ref;\r\n }\r\n\r\n setCoordinates(coordinates) {\r\n this._runCommand(\"setCoordinates\", [coordinates])\r\n }\r\n\r\n setHoles(holes) {\r\n this._runCommand(\"setHoles\", [holes])\r\n }\r\n\r\n setFillColor(color) {\r\n this._runCommand(\"setFillColor\", [processColor(color)])\r\n }\r\n\r\n setStrokeColor(color) {\r\n this._runCommand(\"setStrokeColor\", [processColor(color)])\r\n }\r\n\r\n setStrokeWidth(width) {\r\n this._runCommand(\"setStrokeWidth\", [width])\r\n }\r\n\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.polygon);\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 = \"RMFPolygon\";\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[`RMFPolygon`][name];\r\n }\r\n\r\n render() {\r\n return <RMFPolygon\r\n {...this.props}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFPolygon.propTypes = propTypes;\r\n\r\nvar RMFPolygon = requireNativeComponent(`RMFPolygon`, MFPolygon);\r\n\r\nexport { MFPolygon }\r\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,SAHF,EAIEC,aAJF,EAKEC,cALF,EAMEC,YANF,QAOO,cAPP,C,CASA;;AACA,MAAMC,aAAa,GAAGR,aAAa,IAAIS,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,WAAW,EAAEZ,SAAS,CAACa,OAAV,CACXb,SAAS,CAACc,KAAV,CAAgB;IACd;AACN;AACA;IACMC,QAAQ,EAAEf,SAAS,CAACgB,MAAV,CAAiBC,UAJb;IAKdC,SAAS,EAAElB,SAAS,CAACgB,MAAV,CAAiBC;EALd,CAAhB,CADW,CANG;;EAgBhB;AACF;AACA;EACEE,KAAK,EAAEnB,SAAS,CAACa,OAAV,CACLb,SAAS,CAACa,OAAV,CACEb,SAAS,CAACc,KAAV,CAAgB;IACd;AACR;AACA;IACQC,QAAQ,EAAEf,SAAS,CAACgB,MAAV,CAAiBC,UAJb;IAKdC,SAAS,EAAElB,SAAS,CAACgB,MAAV,CAAiBC;EALd,CAAhB,CADF,CADK,CAnBS;;EA+BhB;AACF;AACA;EACEG,SAAS,EAAElB,aAlCK;;EAoChB;AACF;AACA;EACEmB,WAAW,EAAEnB,aAvCG;;EAyChB;AACF;AACA;EACEoB,WAAW,EAAEtB,SAAS,CAACgB,MA5CP;;EA8ChB;AACF;A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AD,CAA9B;MACA,OAAOE,YAAY,IAAIA,YAAY,CAACC,QAA7B,GAAwCD,YAAY,CAACC,QAAb,CAAsBX,IAAtB,CAAxC,GAAsE,IAA7E;IACD,CAZqB,CActB;;;IACA,MAAMY,MAAM,GAAGL,SAAS,CAACE,oBAAV,CAA+BD,aAA/B,CAAf;IACA,OAAOI,MAAM,IAAIA,MAAM,CAACD,QAAjB,GAA4BC,MAAM,CAACD,QAAP,CAAgBX,IAAhB,CAA5B,GAAoD,IAA3D;EACD;;EAEDM,kBAAkB,CAACN,IAAD,EAAO;IACvB,OAAO/C,aAAa,CAAE,YAAF,CAAb,CAA4B+C,IAA5B,CAAP;EACD;;EAEDa,MAAM,GAAG;IACP,oBAAO,oBAAC,UAAD,eACD,KAAKjC,KADJ;MAEL,GAAG,EAAE,KAAKG,IAFL;MAGL,OAAO,EAAE,KAAKF;IAHT,GAAP;EAKD;;AA5GqC;;AA+GxCJ,SAAS,CAACnB,SAAV,GAAsBA,SAAtB;AAEA,IAAIwD,UAAU,GAAGhE,sBAAsB,CAAE,YAAF,EAAe2B,SAAf,CAAvC;AAEA,SAASA,SAAT"}
1
+ {"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","runViewManagerCommand","requireNativeComponent","findNodeHandle","processColor","jsx","_jsx","viewPropTypes","View","propTypes","coordinates","arrayOf","shape","latitude","number","isRequired","longitude","holes","fillColor","strokeColor","strokeWidth","zIndex","visible","bool","userData","object","onPress","func","MFPolygon","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polygon","setCoordinates","_runCommand","setHoles","setFillColor","color","setStrokeColor","setStrokeWidth","width","setVisible","setZIndex","setUserData","_getHandle","name","args","componentName","moduleName","commandName","reactTag","render","RMFPolygon"],"sourceRoot":"..\\..\\..\\src","sources":["components/MFPolygon.js"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAAQC,aAAa,EAAEC,aAAa,QAAO,o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,EAAE;IACpB,IAAI,CAACgB,WAAW,CAAC,aAAa,EAAE,CAAChB,QAAQ,CAAC,CAAC;EAC7C;EAEA0B,UAAUA,CAAA,EAAG;IACX,OAAO/C,cAAc,CAAC,IAAI,CAACmC,OAAO,CAAC;EACrC;EAEAE,WAAWA,CAACW,IAAI,EAAEC,IAAI,EAAE;IACtB,OAAOnD,qBAAqB,CAAC;MAC3BoD,aAAa,EAAE,YAAY;MAC3BC,UAAU,EAAE,YAAY;MACxBC,WAAW,EAAEJ,IAAI;MACjBC,IAAI;MACJI,QAAQ,EAAE,IAAI,CAACN,UAAU,CAAC;IAC5B,CAAC,CAAC;EACJ;EAEAO,MAAMA,CAAA,EAAG;IACP,oBAAOnD,IAAA,CAACoD,UAAU;MAAA,GACZ,IAAI,CAAC3B,KAAK;MACdM,GAAG,EAAE,IAAI,CAACH,IAAK;MACfR,OAAO,EAAE,IAAI,CAACM;IAAS,CACxB,CAAC;EACJ;AACF;AAEAJ,SAAS,CAACnB,SAAS,GAAGA,SAAS;AAE/B,IAAIiD,UAAU,GAAGxD,sBAAsB,CAAC,YAAY,EAAE0B,SAAS,CAAC;AAEhE,SAASA,SAAS","ignoreList":[]}
@@ -1,13 +1,16 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ "use strict";
2
2
 
3
3
  import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
6
- import { requireNativeComponent, Platform, UIManager, NativeModules, findNodeHandle, processColor } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
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 = { ...viewPropTypes,
10
-
12
+ const propTypes = {
13
+ ...viewPropTypes,
11
14
  /**
12
15
  * An array of coordinates to describe the polyline
13
16
  */
@@ -18,159 +21,96 @@ const propTypes = { ...viewPropTypes,
18
21
  latitude: PropTypes.number.isRequired,
19
22
  longitude: PropTypes.number.isRequired
20
23
  })),
21
-
22
24
  /**
23
25
  * The color to use for the path.
24
26
  */
25
27
  color: ColorPropType,
26
-
27
28
  /**
28
29
  * The stroke width to use for the path.
29
30
  */
30
31
  width: PropTypes.number,
31
-
32
32
  /**
33
33
  * The default style is `solid`.
34
34
  */
35
35
  lineStyle: PropTypes.oneOf(['solid', 'dotted']),
36
-
37
36
  /**
38
37
  * zIndex
39
38
  */
40
39
  zIndex: PropTypes.number,
41
-
42
40
  /**
43
41
  * visible
44
42
  */
45
43
  visible: PropTypes.bool,
46
-
47
44
  /**
48
45
  * userData
49
46
  */
50
47
  userData: PropTypes.object,
51
-
52
48
  /**
53
49
  * Callback that is called when the user presses on the polyline
54
50
  */
55
51
  onPress: PropTypes.func
56
52
  };
57
-
58
53
  class MFPolyline extends React.Component {
59
54
  constructor(props) {
60
55
  super(props);
61
56
  this._onPress = this._onPress.bind(this);
62
57
  this._ref = this._ref.bind(this);
63
58
  }
64
-
65
59
  _onPress(event) {
66
60
  event.stopPropagation();
67
-
68
61
  if (this.props.onPress) {
69
62
  this.props.onPress(event);
70
63
  }
71
64
  }
72
-
73
65
  _ref(ref) {
74
66
  this.polyline = ref;
75
- } // TODO - bug
76
-
67
+ }
77
68
 
69
+ // TODO - bug
78
70
  setCoordinates(coordinates) {
79
71
  this._runCommand("setCoordinates", [coordinates]);
80
72
  }
81
-
82
73
  setWidth(width) {
83
74
  this._runCommand("setWidth", [width]);
84
75
  }
85
-
86
76
  setColor(color) {
87
77
  this._runCommand("setColor", [processColor(color)]);
88
78
  }
89
-
90
79
  setVisible(visible) {
91
80
  this._runCommand("setVisible", [visible]);
92
81
  }
93
-
94
82
  setTouchable(touchable) {
95
83
  this._runCommand("setTouchable", [touchable]);
96
84
  }
97
-
98
85
  setZIndex(zIndex) {
99
86
  this._runCommand("setZIndex", [zIndex]);
100
87
  }
101
-
102
88
  setLineStyle(style) {
103
89
  this._runCommand("setLineStyle", [style]);
104
90
  }
105
-
106
91
  setUserData(userData) {
107
92
  this._runCommand("setUserData", [userData]);
108
93
  }
109
-
110
94
  _getHandle() {
111
95
  return findNodeHandle(this.polyline);
112
96
  }
113
-
114
97
  _runCommand(name, args) {
115
- switch (Platform.OS) {
116
- case 'android':
117
- {
118
- if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {
119
- return;
120
- }
121
-
122
- const commandId = this._uiManagerCommand(name);
123
-
124
- if (commandId == null) {
125
- return;
126
- }
127
-
128
- UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
129
- break;
130
- }
131
-
132
- case 'ios':
133
- this._mapManagerCommand(name)(this._getHandle(), ...args);
134
-
135
- break;
136
-
137
- default:
138
- break;
139
- }
98
+ return runViewManagerCommand({
99
+ componentName: 'RMFPolyline',
100
+ moduleName: 'RMFPolyline',
101
+ commandName: name,
102
+ args,
103
+ reactTag: this._getHandle()
104
+ });
140
105
  }
141
-
142
- _uiManagerCommand(name) {
143
- const uiManager = UIManager || NativeModules.UIManager;
144
- const componentName = "RMFPolyline";
145
-
146
- if (!uiManager) {
147
- return null;
148
- }
149
-
150
- if (!uiManager.getViewManagerConfig) {
151
- // RN < 0.58
152
- const legacyConfig = uiManager[componentName];
153
- return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
154
- } // RN >= 0.58
155
-
156
-
157
- const config = uiManager.getViewManagerConfig(componentName);
158
- return config && config.Commands ? config.Commands[name] : null;
159
- }
160
-
161
- _mapManagerCommand(name) {
162
- return NativeModules[`RMFPolyline`][name];
163
- }
164
-
165
106
  render() {
166
- return /*#__PURE__*/React.createElement(RMFPolyline, _extends({}, this.props, {
107
+ return /*#__PURE__*/_jsx(RMFPolyline, {
108
+ ...this.props,
167
109
  ref: this._ref,
168
110
  onPress: this._onPress
169
- }));
111
+ });
170
112
  }
171
-
172
113
  }
173
-
174
114
  MFPolyline.propTypes = propTypes;
175
115
  var RMFPolyline = requireNativeComponent(`RMFPolyline`, MFPolyline);
176
116
  export { MFPolyline };
@@ -1 +1 @@
1
- {"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","UIManager","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","coordinates","arrayOf","shape","latitude","number","isRequired","longitude","color","width","lineStyle","oneOf","zIndex","visible","bool","userData","object","onPress","func","MFPolyline","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polyline","setCoordinates","_runCommand","setWidth","setColor","setVisible","setTouchable","touchable","setZIndex","setLineStyle","style","setUserData","_getHandle","name","args","OS","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","legacyConfig","Commands","config","render","RMFPolyline"],"sources":["MFPolyline.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 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 * An array of coordinates to describe the polyline\r\n */\r\n coordinates: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n /**\r\n * Latitude/Longitude coordinates\r\n */\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n })\r\n ),\r\n\r\n /**\r\n * The color to use for the path.\r\n */\r\n color: ColorPropType,\r\n\r\n /**\r\n * The stroke width to use for the path.\r\n */\r\n width: PropTypes.number,\r\n\r\n /**\r\n * The default style is `solid`.\r\n */\r\n lineStyle: PropTypes.oneOf(['solid', 'dotted']),\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 polyline\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\n\r\nclass MFPolyline 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 _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.polyline = ref;\r\n }\r\n\r\n // TODO - bug\r\n setCoordinates(coordinates) {\r\n this._runCommand(\"setCoordinates\", [coordinates])\r\n }\r\n\r\n setWidth(width) {\r\n this._runCommand(\"setWidth\", [width])\r\n }\r\n\r\n setColor(color) {\r\n this._runCommand(\"setColor\", [processColor(color)])\r\n }\r\n\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n setTouchable(touchable) {\r\n this._runCommand(\"setTouchable\", [touchable])\r\n }\r\n\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n\r\n setLineStyle(style) {\r\n this._runCommand(\"setLineStyle\", [style])\r\n }\r\n\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.polyline);\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 = \"RMFPolyline\";\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[`RMFPolyline`][name];\r\n }\r\n\r\n render() {\r\n return <RMFPolyline\r\n {...this.props}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFPolyline.propTypes = propTypes;\r\n\r\nvar RMFPolyline = requireNativeComponent(`RMFPolyline`, MFPolyline);\r\n\r\nexport { MFPolyline }\r\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,SAHF,EAIEC,aAJF,EAKEC,cALF,EAMEC,YANF,QAOO,cAPP,C,CASA;;AACA,MAAMC,aAAa,GAAGR,aAAa,IAAIS,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,WAAW,EAAEZ,SAAS,CAACa,OAAV,CACXb,SAAS,CAACc,KAAV,CAAgB;IACd;AACN;AACA;IACMC,QAAQ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L,EAA9B,EAAiD,GAAGE,IAApD;;QACA;;MAEF;QACE;IApBJ;EAsBD;;EAEDI,iBAAiB,CAACL,IAAD,EAAO;IACtB,MAAMO,SAAS,GAAGvD,SAAS,IAAIC,aAAa,CAACD,SAA7C;IACA,MAAMwD,aAAa,GAAG,aAAtB;;IAEA,IAAI,CAACD,SAAL,EAAgB;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,CAAsBX,IAAtB,CAAxC,GAAsE,IAA7E;IACD,CAZqB,CActB;;;IACA,MAAMY,MAAM,GAAGL,SAAS,CAACE,oBAAV,CAA+BD,aAA/B,CAAf;IACA,OAAOI,MAAM,IAAIA,MAAM,CAACD,QAAjB,GAA4BC,MAAM,CAACD,QAAP,CAAgBX,IAAhB,CAA5B,GAAoD,IAA3D;EACD;;EAEDM,kBAAkB,CAACN,IAAD,EAAO;IACvB,OAAO/C,aAAa,CAAE,aAAF,CAAb,CAA6B+C,IAA7B,CAAP;EACD;;EAEDa,MAAM,GAAG;IACP,oBAAO,oBAAC,WAAD,eACD,KAAKjC,KADJ;MAEL,GAAG,EAAE,KAAKG,IAFL;MAGL,OAAO,EAAE,KAAKF;IAHT,GAAP;EAKD;;AA7GsC;;AAgHzCJ,UAAU,CAACnB,SAAX,GAAuBA,SAAvB;AAEA,IAAIwD,WAAW,GAAGhE,sBAAsB,CAAE,aAAF,EAAgB2B,UAAhB,CAAxC;AAEA,SAASA,UAAT"}
1
+ {"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","runViewManagerCommand","requireNativeComponent","findNodeHandle","processColor","jsx","_jsx","viewPropTypes","View","propTypes","coordinates","arrayOf","shape","latitude","number","isRequired","longitude","color","width","lineStyle","oneOf","zIndex","visible","bool","userData","object","onPress","func","MFPolyline","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polyline","setCoordinates","_runCommand","setWidth","setColor","setVisible","setTouchable","touchable","setZIndex","setLineStyle","style","setUserData","_getHandle","name","args","componentName","moduleName","commandName","reactTag","render","RMFPolyline"],"sourceRoot":"..\\..\\..\\src","sources":["components/MFPolyline.js"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,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,WAAW,EAAEZ,SAAS,CAACa,OAAO,CAC5Bb,SAAS,CAACc,KAAK,CAAC;IACd;AACN;AACA;IACMC,QAAQ,EAAEf,SAAS,CAACgB,MAAM,CAACC,UAAU;IACrCC,SAAS,EAAElB,SAAS,CAACgB,MAAM,CAACC;EAC9B,CAAC,CACH,CAAC;EAED;AACF;AACA;EACEE,KAAK,EAAEjB,aAAa;EAEpB;AACF;AACA;EACEkB,KAAK,EAAEpB,SAAS,CAACgB,MAAM;EAEvB;AACF;AACA;EACEK,SAAS,EAAErB,SAAS,CAACsB,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;EAE/C;AACF;AACA;EACEC,MAAM,EAAEvB,SAAS,CAACgB,MAAM;EAExB;AACF;AACA;EACEQ,OAAO,EAAExB,SAAS,CAACyB,IAAI;EAEvB;AACF;AACA;EACEC,QAAQ,EAAC1B,SAAS,CAAC2B,MAAM;EAEzB;AACF;AACA;EACEC,OAAO,EAAE5B,SAAS,CAAC6B;AACrB,CAAC;AAGD,MA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,KAAK,EAAE;IAClB,IAAI,CAACR,WAAW,CAAC,cAAc,EAAE,CAACQ,KAAK,CAAC,CAAC;EAC3C;EAEAC,WAAWA,CAACzB,QAAQ,EAAE;IACpB,IAAI,CAACgB,WAAW,CAAC,aAAa,EAAE,CAAChB,QAAQ,CAAC,CAAC;EAC7C;EAEA0B,UAAUA,CAAA,EAAG;IACX,OAAO/C,cAAc,CAAC,IAAI,CAACmC,QAAQ,CAAC;EACtC;EAEAE,WAAWA,CAACW,IAAI,EAAEC,IAAI,EAAE;IACtB,OAAOnD,qBAAqB,CAAC;MAC3BoD,aAAa,EAAE,aAAa;MAC5BC,UAAU,EAAE,aAAa;MACzBC,WAAW,EAAEJ,IAAI;MACjBC,IAAI;MACJI,QAAQ,EAAE,IAAI,CAACN,UAAU,CAAC;IAC5B,CAAC,CAAC;EACJ;EAEAO,MAAMA,CAAA,EAAG;IACP,oBAAOnD,IAAA,CAACoD,WAAW;MAAA,GACb,IAAI,CAAC3B,KAAK;MACdM,GAAG,EAAE,IAAI,CAACH,IAAK;MACfR,OAAO,EAAE,IAAI,CAACM;IAAS,CACxB,CAAC;EACJ;AACF;AAEAJ,UAAU,CAACnB,SAAS,GAAGA,SAAS;AAEhC,IAAIiD,WAAW,GAAGxD,sBAAsB,CAAC,aAAa,EAAE0B,UAAU,CAAC;AAEnE,SAASA,UAAU","ignoreList":[]}
@@ -1,22 +1,24 @@
1
+ "use strict";
2
+
1
3
  import PropTypes from "prop-types";
2
4
  import React from 'react';
3
5
  import { ViewPropTypes } from 'deprecated-react-native-prop-types';
4
- import { requireNativeComponent, View } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
6
+ import { requireNativeComponent, View } from 'react-native';
5
7
 
8
+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
9
+ import { jsx as _jsx } from "react/jsx-runtime";
6
10
  const viewPropTypes = ViewPropTypes || View.propTypes;
7
- const propTypes = { ...viewPropTypes,
8
-
11
+ const propTypes = {
12
+ ...viewPropTypes,
9
13
  /**
10
14
  * The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
11
15
  * For example, https://tile.openstreetmap.de/{z}/{x}/{y}.png
12
16
  */
13
17
  urlTemplate: PropTypes.string.isRequired,
14
-
15
18
  /**
16
19
  * visible
17
20
  */
18
21
  visible: PropTypes.bool,
19
-
20
22
  /**
21
23
  * The order in which this tile overlay is drawn with respect to other overlays. An overlay
22
24
  * with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays
@@ -24,14 +26,13 @@ const propTypes = { ...viewPropTypes,
24
26
  */
25
27
  zIndex: PropTypes.number
26
28
  };
27
-
28
29
  class MFTileOverlay extends React.Component {
29
30
  render() {
30
- return /*#__PURE__*/React.createElement(RMFTileOverlay, this.props);
31
+ return /*#__PURE__*/_jsx(RMFTileOverlay, {
32
+ ...this.props
33
+ });
31
34
  }
32
-
33
35
  }
34
-
35
36
  MFTileOverlay.propTypes = propTypes;
36
37
  var RMFTileOverlay = requireNativeComponent(`RMFTileOverlay`, MFTileOverlay);
37
38
  export { MFTileOverlay };
@@ -1 +1 @@
1
- {"version":3,"names":["PropTypes","React","ViewPropTypes","requireNativeComponent","View","viewPropTypes","propTypes","urlTemplate","string","isRequired","visible","bool","zIndex","number","MFTileOverlay","Component","render","props","RMFTileOverlay"],"sources":["MFTileOverlay.js"],"sourcesContent":["import PropTypes from \"prop-types\";\r\nimport React from 'react';\r\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n View,\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\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime\r\n * For example, https://tile.openstreetmap.de/{z}/{x}/{y}.png\r\n */\r\n urlTemplate: PropTypes.string.isRequired,\r\n\r\n /**\r\n * visible\r\n */\r\n visible: PropTypes.bool,\r\n\r\n /**\r\n * The order in which this tile overlay is drawn with respect to other overlays. An overlay\r\n * with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays\r\n * with the same z-index is arbitrary. The default zIndex is 0.\r\n */\r\n zIndex: PropTypes.number,\r\n};\r\n\r\nclass MFTileOverlay extends React.Component {\r\n render() {\r\n return <RMFTileOverlay\r\n {...this.props}\r\n />;\r\n }\r\n}\r\n\r\nMFTileOverlay.propTypes = propTypes;\r\n\r\nvar RMFTileOverlay = requireNativeComponent(`RMFTileOverlay`, MFTileOverlay);\r\n\r\nexport { MFTileOverlay }\r\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,QAA4B,oCAA5B;AACA,SACEC,sBADF,EAEEC,IAFF,QAGO,cAHP,C,CAKA;;AACA,MAAMC,aAAa,GAAGH,aAAa,IAAIE,IAAI,CAACE,SAA5C;AACA,MAAMA,SAAS,GAAG,EAChB,GAAGD,aADa;;EAGhB;AACF;AACA;AACA;EACEE,WAAW,EAAEP,SAAS,CAACQ,MAAV,CAAiBC,UAPd;;EAShB;AACF;AACA;EACEC,OAAO,EAAEV,SAAS,CAACW,IAZH;;EAchB;AACF;AACA;AACA;AACA;EACEC,MAAM,EAAEZ,SAAS,CAACa;AAnBF,CAAlB;;AAsBA,MAAMC,aAAN,SAA4Bb,KAAK,CAACc,SAAlC,CAA4C;EAC1CC,MAAM,GAAG;IACP,oBAAO,oBAAC,cAAD,EACD,KAAKC,KADJ,CAAP;EAGD;;AALyC;;AAQ5CH,aAAa,CAACR,SAAd,GAA0BA,SAA1B;AAEA,IAAIY,cAAc,GAAGf,sBAAsB,CAAE,gBAAF,EAAmBW,aAAnB,CAA3C;AAEA,SAASA,aAAT"}
1
+ {"version":3,"names":["PropTypes","React","ViewPropTypes","requireNativeComponent","View","jsx","_jsx","viewPropTypes","propTypes","urlTemplate","string","isRequired","visible","bool","zIndex","number","MFTileOverlay","Component","render","RMFTileOverlay","props"],"sourceRoot":"..\\..\\..\\src","sources":["components/MFTileOverlay.js"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAAQC,aAAa,QAAO,oCAAoC;AAChE,SACEC,sBAAsB,EACtBC,IAAI,QACC,cAAc;;AAErB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,aAAa,GAAGL,aAAa,IAAIE,IAAI,CAACI,SAAS;AACrD,MAAMA,SAAS,GAAG;EAChB,GAAGD,aAAa;EAEhB;AACF;AACA;AACA;EACEE,WAAW,EAAET,SAAS,CAACU,MAAM,CAACC,UAAU;EAExC;AACF;AACA;EACEC,OAAO,EAAEZ,SAAS,CAACa,IAAI;EAEvB;AACF;AACA;AACA;AACA;EACEC,MAAM,EAAEd,SAAS,CAACe;AACpB,CAAC;AAED,MAAMC,aAAa,SAASf,KAAK,CAACgB,SAAS,CAAC;EAC1CC,MAAMA,CAAA,EAAG;IACP,oBAAOZ,IAAA,CAACa,cAAc;MAAA,GAChB,IAAI,CAACC;IAAK,CACf,CAAC;EACJ;AACF;AAEAJ,aAAa,CAACR,SAAS,GAAGA,SAAS;AAEnC,IAAIW,cAAc,GAAGhB,sBAAsB,CAAC,gBAAgB,EAAEa,aAAa,CAAC;AAE5E,SAASA,aAAa","ignoreList":[]}
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  import { requireNativeComponent, UIManager, Platform } from 'react-native';
2
4
  const LINKING_ERROR = `The package 'react-native-map4d-map' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
3
5
  ios: "- You have run 'pod install'\n",
@@ -1 +1 @@
1
- {"version":3,"names":["requireNativeComponent","UIManager","Platform","LINKING_ERROR","select","ios","default","ComponentName","Map4dMapView","getViewManagerConfig","Error"],"sources":["Map4dMapView.tsx"],"sourcesContent":["import {\r\n requireNativeComponent,\r\n UIManager,\r\n Platform,\r\n ViewStyle,\r\n } from 'react-native';\r\n \r\n const LINKING_ERROR =\r\n `The package 'react-native-map4d-map' doesn't seem to be linked. Make sure: \\n\\n` +\r\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\r\n '- You rebuilt the app after installing the package\\n' +\r\n '- You are not using Expo managed workflow\\n';\r\n \r\n type Map4dMapProps = {\r\n color: string;\r\n style: ViewStyle;\r\n };\r\n \r\n const ComponentName = 'Map4dMapView';\r\n \r\n export const Map4dMapView =\r\n UIManager.getViewManagerConfig(ComponentName) != null\r\n ? requireNativeComponent<Map4dMapProps>(ComponentName)\r\n : () => {\r\n throw new Error(LINKING_ERROR);\r\n };\r\n "],"mappings":"AAAA,SACIA,sBADJ,EAEIC,SAFJ,EAGIC,QAHJ,QAKS,cALT;AAOE,MAAMC,aAAa,GAChB,iFAAD,GACAD,QAAQ,CAACE,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAWA,MAAMC,aAAa,GAAG,cAAtB;AAEA,OAAO,MAAMC,YAAY,GACvBP,SAAS,CAACQ,oBAAV,CAA+BF,aAA/B,KAAiD,IAAjD,GACIP,sBAAsB,CAAgBO,aAAhB,CAD1B,GAEI,MAAM;EACJ,MAAM,IAAIG,KAAJ,CAAUP,aAAV,CAAN;AACD,CALA"}
1
+ {"version":3,"names":["requireNativeComponent","UIManager","Platform","LINKING_ERROR","select","ios","default","ComponentName","Map4dMapView","getViewManagerConfig","Error"],"sourceRoot":"..\\..\\..\\src","sources":["components/Map4dMapView.tsx"],"mappings":";;AAAA,SACIA,sBAAsB,EACtBC,SAAS,EACTC,QAAQ,QAEH,cAAc;AAErB,MAAMC,aAAa,GACjB,iFAAiF,GACjFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,6CAA6C;AAO/C,MAAMC,aAAa,GAAG,cAAc;AAEpC,OAAO,MAAMC,YAAY,GACvBP,SAAS,CAACQ,oBAAoB,CAACF,aAAa,CAAC,IAAI,IAAI,GACjDP,sBAAsB,CAAgBO,aAAa,CAAC,GACpD,MAAM;EACJ,MAAM,IAAIG,KAAK,CAACP,aAAa,CAAC;AAChC,CAAC","ignoreList":[]}