react-native-map4d-map-dtqg 0.1.0

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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -0
  3. package/android/build.gradle +60 -0
  4. package/android/src/main/AndroidManifest.xml +4 -0
  5. package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -0
  6. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -0
  7. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -0
  8. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -0
  9. package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -0
  10. package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -0
  11. package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -0
  12. package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +122 -0
  13. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -0
  14. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -0
  15. package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +18 -0
  16. package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -0
  17. package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +226 -0
  18. package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -0
  19. package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +212 -0
  20. package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -0
  21. package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -0
  22. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +173 -0
  23. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +148 -0
  24. package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -0
  25. package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +138 -0
  26. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -0
  27. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +65 -0
  28. package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -0
  29. package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -0
  30. package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -0
  31. package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -0
  32. package/ios/Map4dMap.h +7 -0
  33. package/ios/Map4dMap.m +14 -0
  34. package/ios/Map4dMap.xcodeproj/project.pbxproj +282 -0
  35. package/ios/Map4dMapViewManager.m +34 -0
  36. package/ios/RCTConvert+Map4dMap.h +33 -0
  37. package/ios/RCTConvert+Map4dMap.m +112 -0
  38. package/ios/RMFCircle.h +37 -0
  39. package/ios/RMFCircle.m +100 -0
  40. package/ios/RMFCircleManager.h +18 -0
  41. package/ios/RMFCircleManager.m +155 -0
  42. package/ios/RMFCircleMap4d.h +23 -0
  43. package/ios/RMFCircleMap4d.m +13 -0
  44. package/ios/RMFCoordinate.h +22 -0
  45. package/ios/RMFCoordinate.m +13 -0
  46. package/ios/RMFDirectionsMarkerOptions.h +24 -0
  47. package/ios/RMFDirectionsMarkerOptions.m +23 -0
  48. package/ios/RMFDirectionsRenderer.h +47 -0
  49. package/ios/RMFDirectionsRenderer.m +182 -0
  50. package/ios/RMFDirectionsRendererManager.h +17 -0
  51. package/ios/RMFDirectionsRendererManager.m +84 -0
  52. package/ios/RMFDirectionsRendererMap4d.h +21 -0
  53. package/ios/RMFDirectionsRendererMap4d.m +12 -0
  54. package/ios/RMFDummyView.h +7 -0
  55. package/ios/RMFDummyView.m +13 -0
  56. package/ios/RMFEventResponse.h +39 -0
  57. package/ios/RMFEventResponse.m +98 -0
  58. package/ios/RMFIcon.h +24 -0
  59. package/ios/RMFIcon.m +35 -0
  60. package/ios/RMFMapView.h +84 -0
  61. package/ios/RMFMapView.m +376 -0
  62. package/ios/RMFMapViewManager.h +17 -0
  63. package/ios/RMFMapViewManager.m +493 -0
  64. package/ios/RMFMarker.h +57 -0
  65. package/ios/RMFMarker.m +267 -0
  66. package/ios/RMFMarkerManager.h +17 -0
  67. package/ios/RMFMarkerManager.m +156 -0
  68. package/ios/RMFMarkerMap4d.h +19 -0
  69. package/ios/RMFMarkerMap4d.m +13 -0
  70. package/ios/RMFPOI.h +38 -0
  71. package/ios/RMFPOI.m +123 -0
  72. package/ios/RMFPOIManager.h +18 -0
  73. package/ios/RMFPOIManager.m +168 -0
  74. package/ios/RMFPOIMap4d.h +22 -0
  75. package/ios/RMFPOIMap4d.m +12 -0
  76. package/ios/RMFPolygon.h +41 -0
  77. package/ios/RMFPolygon.m +106 -0
  78. package/ios/RMFPolygonManager.h +18 -0
  79. package/ios/RMFPolygonManager.m +141 -0
  80. package/ios/RMFPolygonMap4d.h +23 -0
  81. package/ios/RMFPolygonMap4d.m +15 -0
  82. package/ios/RMFPolyline.h +38 -0
  83. package/ios/RMFPolyline.m +101 -0
  84. package/ios/RMFPolylineManager.h +18 -0
  85. package/ios/RMFPolylineManager.m +139 -0
  86. package/ios/RMFPolylineMap4d.h +22 -0
  87. package/ios/RMFPolylineMap4d.m +15 -0
  88. package/ios/building/RMFBuilding.h +41 -0
  89. package/ios/building/RMFBuilding.m +104 -0
  90. package/ios/building/RMFBuildingManager.h +19 -0
  91. package/ios/building/RMFBuildingManager.m +133 -0
  92. package/ios/building/RMFBuildingMap4d.h +23 -0
  93. package/ios/building/RMFBuildingMap4d.m +15 -0
  94. package/ios/overlays/RMFTileOverlay.h +36 -0
  95. package/ios/overlays/RMFTileOverlay.m +64 -0
  96. package/ios/overlays/RMFTileOverlayManager.h +17 -0
  97. package/ios/overlays/RMFTileOverlayManager.m +27 -0
  98. package/lib/commonjs/components/MFBuilding.js +192 -0
  99. package/lib/commonjs/components/MFBuilding.js.map +1 -0
  100. package/lib/commonjs/components/MFCircle.js +181 -0
  101. package/lib/commonjs/components/MFCircle.js.map +1 -0
  102. package/lib/commonjs/components/MFDirectionsRenderer.js +240 -0
  103. package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -0
  104. package/lib/commonjs/components/MFMapView.js +375 -0
  105. package/lib/commonjs/components/MFMapView.js.map +1 -0
  106. package/lib/commonjs/components/MFMarker.js +255 -0
  107. package/lib/commonjs/components/MFMarker.js.map +1 -0
  108. package/lib/commonjs/components/MFPOI.js +204 -0
  109. package/lib/commonjs/components/MFPOI.js.map +1 -0
  110. package/lib/commonjs/components/MFPolygon.js +183 -0
  111. package/lib/commonjs/components/MFPolygon.js.map +1 -0
  112. package/lib/commonjs/components/MFPolyline.js +173 -0
  113. package/lib/commonjs/components/MFPolyline.js.map +1 -0
  114. package/lib/commonjs/components/MFTileOverlay.js +51 -0
  115. package/lib/commonjs/components/MFTileOverlay.js.map +1 -0
  116. package/lib/commonjs/components/Map4dMapView.js +19 -0
  117. package/lib/commonjs/components/Map4dMapView.js.map +1 -0
  118. package/lib/commonjs/index.js +78 -0
  119. package/lib/commonjs/index.js.map +1 -0
  120. package/lib/module/components/MFBuilding.js +178 -0
  121. package/lib/module/components/MFBuilding.js.map +1 -0
  122. package/lib/module/components/MFCircle.js +167 -0
  123. package/lib/module/components/MFCircle.js.map +1 -0
  124. package/lib/module/components/MFDirectionsRenderer.js +226 -0
  125. package/lib/module/components/MFDirectionsRenderer.js.map +1 -0
  126. package/lib/module/components/MFMapView.js +361 -0
  127. package/lib/module/components/MFMapView.js.map +1 -0
  128. package/lib/module/components/MFMarker.js +240 -0
  129. package/lib/module/components/MFMarker.js.map +1 -0
  130. package/lib/module/components/MFPOI.js +190 -0
  131. package/lib/module/components/MFPOI.js.map +1 -0
  132. package/lib/module/components/MFPolygon.js +169 -0
  133. package/lib/module/components/MFPolygon.js.map +1 -0
  134. package/lib/module/components/MFPolyline.js +159 -0
  135. package/lib/module/components/MFPolyline.js.map +1 -0
  136. package/lib/module/components/MFTileOverlay.js +38 -0
  137. package/lib/module/components/MFTileOverlay.js.map +1 -0
  138. package/lib/module/components/Map4dMapView.js +10 -0
  139. package/lib/module/components/Map4dMapView.js.map +1 -0
  140. package/lib/module/index.js +11 -0
  141. package/lib/module/index.js.map +1 -0
  142. package/lib/typescript/components/Map4dMapView.d.ts +7 -0
  143. package/package.json +152 -0
  144. package/react-native-map4d-map.podspec +20 -0
  145. package/src/components/MFBuilding.js +188 -0
  146. package/src/components/MFCircle.js +173 -0
  147. package/src/components/MFDirectionsRenderer.js +237 -0
  148. package/src/components/MFMapView.js +374 -0
  149. package/src/components/MFMarker.js +246 -0
  150. package/src/components/MFPOI.js +184 -0
  151. package/src/components/MFPolygon.js +186 -0
  152. package/src/components/MFPolyline.js +172 -0
  153. package/src/components/MFTileOverlay.js +45 -0
  154. package/src/components/Map4dMapView.tsx +27 -0
  155. package/src/index.js +21 -0
@@ -0,0 +1,226 @@
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); }
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
6
+ import { requireNativeComponent, Platform, Image, NativeModules, findNodeHandle, processColor } from 'react-native';
7
+ const viewPropTypes = ViewPropTypes || View.propTypes;
8
+ const propTypes = { ...viewPropTypes,
9
+
10
+ /**
11
+ * The directions to display on the map,
12
+ * retrieved as an array of array of coordinates to describe the routes.
13
+ * Similar to directions prop but has higher priority
14
+ */
15
+ routes: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.shape({
16
+ latitude: PropTypes.number.isRequired,
17
+ longitude: PropTypes.number.isRequired
18
+ }))),
19
+
20
+ /**
21
+ * The directions to display on the map,
22
+ * retrieved as a json string from Get route Map4D API (/sdk/route).
23
+ * Similar to routes prop but with lower priority
24
+ */
25
+ directions: PropTypes.string,
26
+
27
+ /**
28
+ * The index of the main route, default value is 0.
29
+ */
30
+ activedIndex: PropTypes.number,
31
+
32
+ /**
33
+ * The active route stroke width.
34
+ */
35
+ activeStrokeWidth: PropTypes.number,
36
+
37
+ /**
38
+ * The active route color.
39
+ */
40
+ activeStrokeColor: ColorPropType,
41
+
42
+ /**
43
+ * The active route outline stroke width.
44
+ */
45
+ activeOutlineWidth: PropTypes.number,
46
+
47
+ /**
48
+ * The active route outline color.
49
+ */
50
+ activeOutlineColor: ColorPropType,
51
+
52
+ /**
53
+ * The inactive route stroke width.
54
+ */
55
+ inactiveStrokeWidth: PropTypes.number,
56
+
57
+ /**
58
+ * The inactive route color.
59
+ */
60
+ inactiveStrokeColor: ColorPropType,
61
+
62
+ /**
63
+ * The inactive route outline stroke width.
64
+ */
65
+ inactiveOutlineWidth: PropTypes.number,
66
+
67
+ /**
68
+ * The inactive route outline color.
69
+ */
70
+ inactiveOutlineColor: ColorPropType,
71
+
72
+ /**
73
+ * The options of the origin POI.
74
+ */
75
+ originPOIOptions: PropTypes.shape({
76
+ coordinate: PropTypes.shape({
77
+ latitude: PropTypes.number.isRequired,
78
+ longitude: PropTypes.number.isRequired
79
+ }),
80
+ icon: PropTypes.shape({
81
+ uri: PropTypes.any.isRequired
82
+ }),
83
+ title: PropTypes.string,
84
+ titleColor: ColorPropType,
85
+ visible: PropTypes.bool
86
+ }),
87
+
88
+ /**
89
+ * The options of the destination POI.
90
+ */
91
+ destinationPOIOptions: PropTypes.shape({
92
+ coordinate: PropTypes.shape({
93
+ latitude: PropTypes.number.isRequired,
94
+ longitude: PropTypes.number.isRequired
95
+ }),
96
+ icon: PropTypes.shape({
97
+ uri: PropTypes.any.isRequired
98
+ }),
99
+ title: PropTypes.string,
100
+ titleColor: ColorPropType,
101
+ visible: PropTypes.bool
102
+ }),
103
+
104
+ /**
105
+ * Callback that is called when the user presses on the routes.
106
+ */
107
+ onPress: PropTypes.func
108
+ };
109
+
110
+ class MFDirectionsRenderer extends React.Component {
111
+ constructor(props) {
112
+ super(props);
113
+ this._ref = this._ref.bind(this);
114
+ this._onPress = this._onPress.bind(this);
115
+ }
116
+
117
+ setActivedIndex(index) {
118
+ this._runCommand("setActivedIndex", [index]);
119
+ }
120
+
121
+ setRoutes(routes) {
122
+ this._runCommand("setRoutes", [routes]);
123
+ }
124
+
125
+ setDirections(directions) {
126
+ this._runCommand("setDirections", [directions]);
127
+ }
128
+
129
+ render() {
130
+ let originPOIOptions = this.props.originPOIOptions;
131
+
132
+ if (originPOIOptions) {
133
+ if (originPOIOptions.titleColor) {
134
+ originPOIOptions.titleColor = processColor(originPOIOptions.titleColor);
135
+ }
136
+
137
+ if (originPOIOptions.icon) {
138
+ let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {
139
+ uri: originPOIOptions.icon.uri
140
+ };
141
+ originPOIOptions.icon = {
142
+ uri: uri.uri
143
+ };
144
+ }
145
+ }
146
+
147
+ let destinationPOIOptions = this.props.destinationPOIOptions;
148
+
149
+ if (destinationPOIOptions) {
150
+ if (destinationPOIOptions.titleColor) {
151
+ destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor);
152
+ }
153
+
154
+ if (destinationPOIOptions.icon) {
155
+ let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {
156
+ uri: destinationPOIOptions.icon.uri
157
+ };
158
+ destinationPOIOptions.icon = {
159
+ uri: uri.uri
160
+ };
161
+ }
162
+ }
163
+
164
+ return /*#__PURE__*/React.createElement(RMFDirectionsRenderer, _extends({}, this.props, {
165
+ originPOIOptions: originPOIOptions,
166
+ destinationPOIOptions: destinationPOIOptions,
167
+ ref: this._ref,
168
+ onPress: this._onPress
169
+ }));
170
+ }
171
+
172
+ _ref(ref) {
173
+ this.renderer = ref;
174
+ }
175
+
176
+ _onPress(event) {
177
+ event.stopPropagation();
178
+
179
+ if (this.props.onPress) {
180
+ this.props.onPress(event);
181
+ }
182
+ }
183
+
184
+ _runCommand(name, args) {
185
+ switch (Platform.OS) {
186
+ case 'android':
187
+ NativeModules.UIManager.dispatchViewManagerCommand(this._getHandle(), this._uiManagerCommand(name), args);
188
+ break;
189
+
190
+ case 'ios':
191
+ this._mapManagerCommand(name)(this._getHandle(), ...args);
192
+
193
+ break;
194
+
195
+ default:
196
+ break;
197
+ }
198
+ }
199
+
200
+ _getHandle() {
201
+ return findNodeHandle(this.renderer);
202
+ }
203
+
204
+ _uiManagerCommand(name) {
205
+ const UIManager = NativeModules.UIManager;
206
+ const componentName = "RMFDirectionsRenderer";
207
+
208
+ if (!UIManager.getViewManagerConfig) {
209
+ // RN < 0.58
210
+ return UIManager[componentName].Commands[name];
211
+ } // RN >= 0.58
212
+
213
+
214
+ return UIManager.getViewManagerConfig(componentName).Commands[name];
215
+ }
216
+
217
+ _mapManagerCommand(name) {
218
+ return NativeModules[`RMFDirectionsRenderer`][name];
219
+ }
220
+
221
+ }
222
+
223
+ MFDirectionsRenderer.propTypes = propTypes;
224
+ var RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);
225
+ export { MFDirectionsRenderer };
226
+ //# sourceMappingURL=MFDirectionsRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","Image","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","routes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","OS","UIManager","dispatchViewManagerCommand","_getHandle","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","RMFDirectionsRenderer"],"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,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,KAHF,EAIEC,aAJF,EAKEC,cALF,EAMEC,YANF,QAOO,cAPP;AASA,MAAMC,aAAa,GAAGR,aAAa,IAAIS,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;AACA;AACA;EACEG,MAAM,EAAEZ,SAAS,CAACa,OAAV,CACNb,SAAS,CAACa,OAAV,CACEb,SAAS,CAACc,KAAV,CAAgB;IACdC,QAAQ,EAAEf,SAAS,CAACgB,MAAV,CAAiBC,UADb;IAEdC,SAAS,EAAElB,SAAS,CAACgB,MAAV,CAAiBC;EAFd,CAAhB,CADF,CADM,CARQ;;EAiBhB;AACF;AACA;AACA;AACA;EACEE,UAAU,EAAEnB,SAAS,CAACoB,MA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AwBC,0BAAxB,CACE,KAAKC,UAAL,EADF,EAEE,KAAKC,iBAAL,CAAuBN,IAAvB,CAFF,EAGEC,IAHF;QAKA;;MAEF,KAAK,KAAL;QACE,KAAKM,kBAAL,CAAwBP,IAAxB,EAA8B,KAAKK,UAAL,EAA9B,EAAiD,GAAGJ,IAApD;;QACA;;MAEF;QACE;IAdJ;EAgBD;;EAEDI,UAAU,GAAG;IACX,OAAO1D,cAAc,CAAC,KAAKkD,QAAN,CAArB;EACD;;EAEDS,iBAAiB,CAACN,IAAD,EAAO;IACtB,MAAMG,SAAS,GAAGzD,aAAa,CAACyD,SAAhC;IACA,MAAMK,aAAa,GAAG,uBAAtB;;IAEA,IAAI,CAACL,SAAS,CAACM,oBAAf,EAAqC;MACnC;MACA,OAAON,SAAS,CAACK,aAAD,CAAT,CAAyBE,QAAzB,CAAkCV,IAAlC,CAAP;IACD,CAPqB,CAStB;;;IACA,OAAOG,SAAS,CAACM,oBAAV,CAA+BD,aAA/B,EAA8CE,QAA9C,CAAuDV,IAAvD,CAAP;EACD;;EAEDO,kBAAkB,CAACP,IAAD,EAAO;IACvB,OAAOtD,aAAa,CAAE,uBAAF,CAAb,CAAuCsD,IAAvC,CAAP;EACD;;AApGgD;;AAuGnDlB,oBAAoB,CAAC/B,SAArB,GAAiCA,SAAjC;AAEA,IAAI4D,qBAAqB,GAAGpE,sBAAsB,CAAE,uBAAF,EAA0BuC,oBAA1B,CAAlD;AAEA,SAASA,oBAAT"}
@@ -0,0 +1,361 @@
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); }
2
+
3
+ import PropTypes from 'prop-types';
4
+ import React from 'react';
5
+ import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
6
+ import { requireNativeComponent, Platform, NativeModules, findNodeHandle } from 'react-native';
7
+ const CameraShape = PropTypes.shape({
8
+ target: PropTypes.shape({
9
+ latitude: PropTypes.number.isRequired,
10
+ longitude: PropTypes.number.isRequired
11
+ }),
12
+ zoom: PropTypes.number.isRequired,
13
+ bearing: PropTypes.number.isRequired,
14
+ tilt: PropTypes.number.isRequired
15
+ }); // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
16
+
17
+ const viewPropTypes = ViewPropTypes || View.propTypes;
18
+ const propTypes = { ...viewPropTypes,
19
+
20
+ /**
21
+ * An opaque identifier for a custom map configuration.
22
+ */
23
+ mapID: PropTypes.string,
24
+
25
+ /**
26
+ * Map style by string for a custom map configuration.
27
+ */
28
+ mapStyle: PropTypes.string,
29
+
30
+ /**
31
+ * If `false` hide the button to move map to the current user's location.
32
+ * Default value is `false`.
33
+ */
34
+ showsMyLocationButton: PropTypes.bool,
35
+
36
+ /**
37
+ * If `true` the app will ask for the user's location.
38
+ * Default value is `false`.
39
+ */
40
+ showsMyLocation: PropTypes.bool,
41
+
42
+ /**
43
+ * A Boolean indicating whether the map displays buildings.
44
+ * Default value is `true`.
45
+ */
46
+ showsBuildings: PropTypes.bool,
47
+
48
+ /**
49
+ * A Boolean indicating whether the map displays POIs.
50
+ * Default value is `true`.
51
+ */
52
+ showsPOIs: PropTypes.bool,
53
+
54
+ /**
55
+ * If `false` the user won't be able to zoom the map.
56
+ * Default value is `true`.
57
+ */
58
+ zoomGesturesEnabled: PropTypes.bool,
59
+
60
+ /**
61
+ * If `false` the user won't be able to scroll the map.
62
+ * Default value is `true`.
63
+ */
64
+ scrollGesturesEnabled: PropTypes.bool,
65
+
66
+ /**
67
+ * If `false` the user won't be able to pinch/rotate the map.
68
+ * Default value is `true`.
69
+ */
70
+ rotateGesturesEnabled: PropTypes.bool,
71
+
72
+ /**
73
+ * If `false` the user won't be able to tilt the map.
74
+ * Default value is `true`.
75
+ */
76
+ tiltGesturesEnabled: PropTypes.bool,
77
+
78
+ /**
79
+ * The camera view position.
80
+ */
81
+ camera: CameraShape,
82
+
83
+ /**
84
+ * Type of map tiles to be rendered.
85
+ */
86
+ mapType: PropTypes.oneOf(['roadmap', 'satellite', 'hybrid']),
87
+
88
+ /**
89
+ * Callback that is called once the map is fully loaded.
90
+ * @platform android
91
+ */
92
+ onMapReady: PropTypes.func,
93
+
94
+ /**
95
+ * Callback that is called when user taps on the map.
96
+ */
97
+ onPress: PropTypes.func,
98
+
99
+ /**
100
+ * Callback that is called when user taps on the POIs
101
+ */
102
+ onPoiPress: PropTypes.func,
103
+
104
+ /**
105
+ * Callback that is called when user taps on the Buildings
106
+ */
107
+ onBuildingPress: PropTypes.func,
108
+
109
+ /**
110
+ * Callback that is called when user taps on the Places
111
+ */
112
+ onPlacePress: PropTypes.func,
113
+
114
+ /**
115
+ * Callback that is called when user taps on the Data Source Features
116
+ */
117
+ onDataSourceFeaturePress: PropTypes.func,
118
+
119
+ /**
120
+ * Callback that is called when moving camera
121
+ */
122
+ onCameraMove: PropTypes.func,
123
+
124
+ /**
125
+ * Callback that is called when camera start moving
126
+ */
127
+ onCameraMoveStart: PropTypes.func,
128
+
129
+ /**
130
+ * Callback that is called when camera idle
131
+ */
132
+ onCameraIdle: PropTypes.func,
133
+
134
+ /**
135
+ * Callback that is called when user taps on location Button
136
+ */
137
+ onMyLocationButtonPress: PropTypes.func
138
+ };
139
+
140
+ class MFMapView extends React.Component {
141
+ constructor(props) {
142
+ super(props);
143
+ this.state = {
144
+ isReady: Platform.OS === 'ios'
145
+ };
146
+ this._onMapReady = this._onMapReady.bind(this);
147
+ this._ref = this._ref.bind(this);
148
+ }
149
+
150
+ _onMapReady() {
151
+ const {
152
+ onMapReady
153
+ } = this.props;
154
+ this.setState({
155
+ isReady: true
156
+ }, () => {
157
+ if (onMapReady) {
158
+ onMapReady();
159
+ }
160
+ });
161
+ }
162
+
163
+ _ref(ref) {
164
+ this.map = ref;
165
+ }
166
+
167
+ getCamera() {
168
+ if (Platform.OS === 'android') {
169
+ return NativeModules.Map4dMap.getCamera(this._getHandle());
170
+ } else if (Platform.OS === 'ios') {
171
+ return this._runCommand('getCamera', []);
172
+ }
173
+
174
+ return Promise.reject('Function not supported on this platform');
175
+ }
176
+
177
+ getBounds() {
178
+ if (Platform.OS === 'android') {
179
+ return NativeModules.Map4dMap.getBounds(this._getHandle());
180
+ } else if (Platform.OS === 'ios') {
181
+ return this._runCommand('getBounds', []);
182
+ }
183
+
184
+ return Promise.reject('Function not supported on this platform');
185
+ }
186
+
187
+ getMyLocation() {
188
+ if (Platform.OS === 'android') {
189
+ return NativeModules.Map4dMap.getMyLocation(this._getHandle());
190
+ } else if (Platform.OS === 'ios') {
191
+ return this._runCommand('getMyLocation', []);
192
+ }
193
+
194
+ return Promise.reject('Function not supported on this platform');
195
+ }
196
+
197
+ animateCamera(camera) {
198
+ this._runCommand('animateCamera', [camera]);
199
+ }
200
+
201
+ moveCamera(camera) {
202
+ this._runCommand('moveCamera', [camera]);
203
+ }
204
+
205
+ setMyLocationEnabled(enable) {
206
+ this._runCommand('setMyLocationEnabled', [enable]);
207
+ }
208
+
209
+ showsMyLocationButton(enable) {
210
+ this._runCommand('showsMyLocationButton', [enable]);
211
+ }
212
+
213
+ setPOIsEnabled(enable) {
214
+ this._runCommand('setPOIsEnabled', [enable]);
215
+ }
216
+
217
+ setZoomGesturesEnabled(enable) {
218
+ this._runCommand('setZoomGesturesEnabled', [enable]);
219
+ }
220
+
221
+ setScrollGesturesEnabled(enable) {
222
+ this._runCommand('setScrollGesturesEnabled', [enable]);
223
+ }
224
+
225
+ setRotateGesturesEnabled(enable) {
226
+ this._runCommand('setRotateGesturesEnabled', [enable]);
227
+ }
228
+
229
+ setTiltGesturesEnabled(enable) {
230
+ this._runCommand('setTiltGesturesEnabled', [enable]);
231
+ }
232
+
233
+ setAllGesturesEnabled(enable) {
234
+ this._runCommand('setAllGesturesEnabled', [enable]);
235
+ }
236
+
237
+ setTime(time) {
238
+ let t = Date.parse(time);
239
+
240
+ if (isNaN(t)) {
241
+ console.log('time invalid');
242
+ } else {
243
+ this._runCommand('setTime', [t]);
244
+ }
245
+ }
246
+
247
+ fitBounds(boundsData) {
248
+ this._runCommand("fitBounds", [boundsData]);
249
+ }
250
+
251
+ cameraForBounds(boundsData) {
252
+ if (Platform.OS === 'android') {
253
+ return NativeModules.Map4dMap.cameraForBounds(this._getHandle(), boundsData);
254
+ } else if (Platform.OS === 'ios') {
255
+ return this._runCommand('cameraForBounds', [boundsData]);
256
+ }
257
+
258
+ return Promise.reject('cameraForBounds not supported on this platform');
259
+ }
260
+ /**
261
+ * Convert a map coordinate to screen point
262
+ *
263
+ * @param coordinate Coordinate
264
+ * @param [coordinate.latitude] Latitude
265
+ * @param [coordinate.longitude] Longitude
266
+ *
267
+ * @return Promise Promise with the point ({ x: Number, y: Number })
268
+ */
269
+
270
+
271
+ pointForCoordinate(coordinate) {
272
+ if (Platform.OS === 'android') {
273
+ return NativeModules.Map4dMap.pointForCoordinate(this._getHandle(), coordinate);
274
+ } else if (Platform.OS === 'ios') {
275
+ return this._runCommand('pointForCoordinate', [coordinate]);
276
+ }
277
+
278
+ return Promise.reject('pointForCoordinate not supported on this platform');
279
+ }
280
+ /**
281
+ * Convert a screen point to a map coordinate
282
+ *
283
+ * @param point Point
284
+ * @param [point.x] X
285
+ * @param [point.x] Y
286
+ *
287
+ * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
288
+ */
289
+
290
+
291
+ coordinateForPoint(point) {
292
+ if (Platform.OS === 'android') {
293
+ return NativeModules.Map4dMap.coordinateForPoint(this._getHandle(), point);
294
+ } else if (Platform.OS === 'ios') {
295
+ return this._runCommand('coordinateForPoint', [point]);
296
+ }
297
+
298
+ return Promise.reject('coordinateForPoint not supported on this platform');
299
+ }
300
+
301
+ _getHandle() {
302
+ return findNodeHandle(this.map);
303
+ }
304
+
305
+ _runCommand(name, args) {
306
+ switch (Platform.OS) {
307
+ case 'android':
308
+ return NativeModules.UIManager.dispatchViewManagerCommand(this._getHandle(), this._uiManagerCommand(name), args);
309
+
310
+ case 'ios':
311
+ return this._mapManagerCommand(name)(this._getHandle(), ...args);
312
+
313
+ default:
314
+ return Promise.reject(`Invalid platform was passed: ${Platform.OS}`);
315
+ }
316
+ }
317
+
318
+ _uiManagerCommand(name) {
319
+ const UIManager = NativeModules.UIManager;
320
+ const componentName = "RMFMapView";
321
+
322
+ if (!UIManager.getViewManagerConfig) {
323
+ // RN < 0.58
324
+ return UIManager[componentName].Commands[name];
325
+ } // RN >= 0.58
326
+
327
+
328
+ return UIManager.getViewManagerConfig(componentName).Commands[name];
329
+ }
330
+
331
+ _mapManagerCommand(name) {
332
+ return NativeModules[`RMFMapView`][name];
333
+ }
334
+
335
+ render() {
336
+ let props;
337
+
338
+ if (this.state.isReady) {
339
+ props = {
340
+ style: this.props.style,
341
+ onMapReady: this._onMapReady,
342
+ ...this.props
343
+ };
344
+ } else {
345
+ props = {
346
+ style: this.props.style,
347
+ onMapReady: this._onMapReady
348
+ };
349
+ }
350
+
351
+ return /*#__PURE__*/React.createElement(RMFMapView, _extends({}, props, {
352
+ ref: this._ref
353
+ }));
354
+ }
355
+
356
+ }
357
+
358
+ MFMapView.propTypes = propTypes;
359
+ var RMFMapView = requireNativeComponent(`RMFMapView`, MFMapView);
360
+ export { MFMapView };
361
+ //# sourceMappingURL=MFMapView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","NativeModules","findNodeHandle","CameraShape","shape","target","latitude","number","isRequired","longitude","zoom","bearing","tilt","viewPropTypes","View","propTypes","mapID","string","mapStyle","showsMyLocationButton","bool","showsMyLocation","showsBuildings","showsPOIs","zoomGesturesEnabled","scrollGesturesEnabled","rotateGesturesEnabled","tiltGesturesEnabled","camera","mapType","oneOf","onMapReady","func","onPress","onPoiPress","onBuildingPress","onPlacePress","onDataSourceFeaturePress","onCameraMove","onCameraMoveStart","onCameraIdle","onMyLocationButtonPress","MFMapView","Component","constructor","props","state","isReady","OS","_onMapReady","bind","_ref","setState","ref","map","getCamera","Map4dMap","_getHandle","_runCommand","Promise","reject","getBounds","getMyLocation","animateCamera","moveCamera","setMyLocationEnabled","enable","setPOIsEnabled","setZoomGesturesEnabled","setScrollGesturesEnabled","setRotateGesturesEnabled","setTiltGesturesEnabled","setAllGesturesEnabled","setTime","time","t","Date","parse","isNaN","console","log","fitBounds","boundsData","cameraForBounds","pointForCoordinate","coordinate","coordinateForPoint","point","name","args","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","render","style","RMFMapView"],"sources":["MFMapView.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} from 'react-native';\n\nconst CameraShape = PropTypes.shape({\n target: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n zoom: PropTypes.number.isRequired,\n bearing: PropTypes.number.isRequired,\n tilt: PropTypes.number.isRequired,\n});\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 * An opaque identifier for a custom map configuration.\n */\n mapID: PropTypes.string,\n\n /**\n * Map style by string for a custom map configuration.\n */\n mapStyle: PropTypes.string,\n\n /**\n * If `false` hide the button to move map to the current user's location.\n * Default value is `false`.\n */\n showsMyLocationButton: PropTypes.bool,\n\n /**\n * If `true` the app will ask for the user's location.\n * Default value is `false`.\n */\n showsMyLocation: PropTypes.bool,\n\n /**\n * A Boolean indicating whether the map displays buildings.\n * Default value is `true`.\n */\n showsBuildings: PropTypes.bool,\n\n /**\n * A Boolean indicating whether the map displays POIs.\n * Default value is `true`.\n */\n showsPOIs: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to zoom the map.\n * Default value is `true`.\n */\n zoomGesturesEnabled: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to scroll the map.\n * Default value is `true`.\n */\n scrollGesturesEnabled: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to pinch/rotate the map.\n * Default value is `true`.\n */\n rotateGesturesEnabled: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to tilt the map.\n * Default value is `true`.\n */\n tiltGesturesEnabled: PropTypes.bool,\n\n /**\n * The camera view position.\n */\n camera: CameraShape,\n\n /**\n * Type of map tiles to be rendered.\n */\n mapType: PropTypes.oneOf(['roadmap', 'satellite', 'hybrid']),\n\n /**\n * Callback that is called once the map is fully loaded.\n * @platform android\n */\n onMapReady: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the map.\n */\n onPress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the POIs\n */\n onPoiPress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the Buildings\n */\n onBuildingPress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the Places\n */\n onPlacePress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the Data Source Features\n */\n onDataSourceFeaturePress: PropTypes.func,\n\n /**\n * Callback that is called when moving camera\n */\n onCameraMove: PropTypes.func,\n\n /**\n * Callback that is called when camera start moving\n */\n onCameraMoveStart: PropTypes.func,\n\n /**\n * Callback that is called when camera idle\n */\n onCameraIdle: PropTypes.func,\n\n /**\n * Callback that is called when user taps on location Button\n */\n onMyLocationButtonPress: PropTypes.func,\n};\n\n\nclass MFMapView extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isReady: Platform.OS === 'ios',\n };\n\n this._onMapReady = this._onMapReady.bind(this);\n this._ref = this._ref.bind(this);\n }\n\n _onMapReady() {\n const { onMapReady } = this.props;\n this.setState({ isReady: true }, () => {\n if (onMapReady) {\n onMapReady();\n }\n });\n }\n\n _ref(ref) {\n this.map = ref;\n }\n\n getCamera() {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.getCamera(this._getHandle());\n } else if (Platform.OS === 'ios') {\n return this._runCommand('getCamera', []);\n }\n return Promise.reject('Function not supported on this platform');\n }\n\n getBounds() {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.getBounds(this._getHandle());\n } else if (Platform.OS === 'ios') {\n return this._runCommand('getBounds', []);\n }\n return Promise.reject('Function not supported on this platform');\n }\n\n getMyLocation() {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.getMyLocation(this._getHandle());\n } else if (Platform.OS === 'ios') {\n return this._runCommand('getMyLocation', []);\n }\n return Promise.reject('Function not supported on this platform');\n }\n\n animateCamera(camera) {\n this._runCommand('animateCamera', [camera]);\n }\n\n moveCamera(camera) {\n this._runCommand('moveCamera', [camera]);\n }\n\n setMyLocationEnabled(enable) {\n this._runCommand('setMyLocationEnabled', [enable]);\n }\n\n showsMyLocationButton(enable) {\n this._runCommand('showsMyLocationButton', [enable]);\n }\n\n setPOIsEnabled(enable) {\n this._runCommand('setPOIsEnabled', [enable]);\n }\n\n setZoomGesturesEnabled(enable) {\n this._runCommand('setZoomGesturesEnabled', [enable]);\n }\n\n setScrollGesturesEnabled(enable) {\n this._runCommand('setScrollGesturesEnabled', [enable]);\n }\n\n setRotateGesturesEnabled(enable) {\n this._runCommand('setRotateGesturesEnabled', [enable]);\n }\n\n setTiltGesturesEnabled(enable) {\n this._runCommand('setTiltGesturesEnabled', [enable]);\n }\n\n setAllGesturesEnabled(enable) {\n this._runCommand('setAllGesturesEnabled', [enable]);\n }\n\n setTime(time) {\n let t = Date.parse(time)\n if (isNaN(t)) {\n console.log('time invalid')\n }\n else {\n this._runCommand('setTime', [t]);\n }\n }\n\n fitBounds(boundsData) {\n this._runCommand(\"fitBounds\", [boundsData])\n }\n\n cameraForBounds(boundsData) {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.cameraForBounds(\n this._getHandle(),\n boundsData\n );\n } else if (Platform.OS === 'ios') {\n return this._runCommand('cameraForBounds', [boundsData]);\n }\n return Promise.reject('cameraForBounds not supported on this platform');\n }\n\n\n /**\n * Convert a map coordinate to screen point\n *\n * @param coordinate Coordinate\n * @param [coordinate.latitude] Latitude\n * @param [coordinate.longitude] Longitude\n *\n * @return Promise Promise with the point ({ x: Number, y: Number })\n */\n pointForCoordinate(coordinate) {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.pointForCoordinate(\n this._getHandle(),\n coordinate\n );\n } else if (Platform.OS === 'ios') {\n return this._runCommand('pointForCoordinate', [coordinate]);\n }\n return Promise.reject('pointForCoordinate not supported on this platform');\n }\n\n /**\n * Convert a screen point to a map coordinate\n *\n * @param point Point\n * @param [point.x] X\n * @param [point.x] Y\n *\n * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })\n */\n coordinateForPoint(point) {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.coordinateForPoint(\n this._getHandle(),\n point\n );\n } else if (Platform.OS === 'ios') {\n return this._runCommand('coordinateForPoint', [point]);\n }\n return Promise.reject('coordinateForPoint not supported on this platform');\n }\n\n _getHandle() {\n return findNodeHandle(this.map);\n }\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n return NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n\n case 'ios':\n return this._mapManagerCommand(name)(this._getHandle(), ...args);\n\n default:\n return Promise.reject(`Invalid platform was passed: ${Platform.OS}`);\n }\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFMapView\";\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[`RMFMapView`][name];\n }\n\n\n render() {\n let props;\n\n if (this.state.isReady) {\n props = {\n style: this.props.style,\n onMapReady: this._onMapReady,\n ...this.props,\n };\n } else {\n props = {\n style: this.props.style,\n onMapReady: this._onMapReady\n };\n }\n\n return <RMFMapView\n {...props}\n ref={this._ref}\n />;\n }\n}\n\nMFMapView.propTypes = propTypes;\nvar RMFMapView = requireNativeComponent(`RMFMapView`, MFMapView);\n\n\nexport { MFMapView }"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,aAHF,EAIEC,cAJF,QAKO,cALP;AAOA,MAAMC,WAAW,GAAGR,SAAS,CAACS,KAAV,CAAgB;EAClCC,MAAM,EAAEV,SAAS,CAACS,KAAV,CAAgB;IACtBE,QAAQ,EAAEX,SAAS,CAACY,MAAV,CAAiBC,UADL;IAEtBC,SAAS,EAAEd,SAAS,CAACY,MAAV,CAAiBC;EAFN,CAAhB,CAD0B;EAKlCE,IAAI,EAAEf,SAAS,CAACY,MAAV,CAAiBC,UALW;EAMlCG,OAAO,EAAEhB,SAAS,CAACY,MAAV,CAAiBC,UANQ;EAOlCI,IAAI,EAAEjB,SAAS,CAACY,MAAV,CAAiBC;AAPW,CAAhB,CAApB,C,CAUA;;AACA,MAAMK,aAAa,GAAGhB,aAAa,IAAIiB,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,KAAK,EAAErB,SAAS,CAACsB,MAND;;EAQhB;AACF;AACA;EACEC,QAAQ,EAAEvB,SAAS,CAACsB,MAXJ;;EAahB;AACF;AACA;AACA;EACEE,qBAAqB,EAAExB,SAAS,CAACyB,IAjBjB;;EAmBhB;AACF;AACA;AACA;EACEC,eAAe,EAAE1B,SAAS,CAACyB,IAvBX;;EAyBhB;AACF;AACA;AACA;EACEE,cAAc,EAAE3B,SAAS,CAACyB,IA7BV;;EA+BhB;AACF;AACA;AACA;EACEG,SAAS,EAAE5B,SAAS,CAACyB,IAnCL;;EAqChB;AACF;AACA;AACA;EACEI,mBAAmB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