react-native-map4d-map-dtqg 0.1.0 → 0.1.2

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 (210) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +133 -41
  3. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  4. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.9/gc.properties +0 -0
  8. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  9. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  10. package/android/.gradle/vcs-1/gc.properties +0 -0
  11. package/android/build.gradle +60 -60
  12. package/android/src/main/AndroidManifest.xml +4 -4
  13. package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -87
  14. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -298
  15. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -35
  16. package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -31
  17. package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -167
  18. package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -121
  19. package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -105
  20. package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +121 -121
  21. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -502
  22. package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -143
  23. package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +17 -17
  24. package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -1172
  25. package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +231 -226
  26. package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -412
  27. package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +211 -211
  28. package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -222
  29. package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -119
  30. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +172 -172
  31. package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +147 -147
  32. package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -146
  33. package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +137 -137
  34. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -95
  35. package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +64 -64
  36. package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -31
  37. package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -31
  38. package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -70
  39. package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -9
  40. package/ios/Map4dMap.h +7 -7
  41. package/ios/Map4dMap.m +14 -14
  42. package/ios/Map4dMapViewManager.m +34 -34
  43. package/ios/RCTConvert+Map4dMap.h +33 -33
  44. package/ios/RCTConvert+Map4dMap.m +112 -112
  45. package/ios/RMFCircle.h +37 -37
  46. package/ios/RMFCircle.m +100 -100
  47. package/ios/RMFCircleManager.h +18 -18
  48. package/ios/RMFCircleManager.m +155 -155
  49. package/ios/RMFCircleMap4d.h +23 -23
  50. package/ios/RMFCircleMap4d.m +13 -13
  51. package/ios/RMFCoordinate.h +22 -22
  52. package/ios/RMFCoordinate.m +13 -13
  53. package/ios/RMFDirectionsMarkerOptions.h +24 -24
  54. package/ios/RMFDirectionsMarkerOptions.m +23 -23
  55. package/ios/RMFDirectionsRenderer.h +47 -47
  56. package/ios/RMFDirectionsRenderer.m +182 -182
  57. package/ios/RMFDirectionsRendererManager.h +17 -17
  58. package/ios/RMFDirectionsRendererManager.m +84 -84
  59. package/ios/RMFDirectionsRendererMap4d.h +21 -21
  60. package/ios/RMFDirectionsRendererMap4d.m +12 -12
  61. package/ios/RMFDummyView.h +6 -6
  62. package/ios/RMFDummyView.m +12 -12
  63. package/ios/RMFEventResponse.h +39 -39
  64. package/ios/RMFEventResponse.m +98 -98
  65. package/ios/RMFIcon.h +24 -24
  66. package/ios/RMFIcon.m +35 -35
  67. package/ios/RMFMapView.h +84 -84
  68. package/ios/RMFMapView.m +376 -376
  69. package/ios/RMFMapViewManager.h +17 -17
  70. package/ios/RMFMapViewManager.m +508 -493
  71. package/ios/RMFMarker.h +57 -57
  72. package/ios/RMFMarker.m +267 -267
  73. package/ios/RMFMarkerManager.h +17 -17
  74. package/ios/RMFMarkerManager.m +156 -156
  75. package/ios/RMFMarkerMap4d.h +19 -19
  76. package/ios/RMFMarkerMap4d.m +13 -13
  77. package/ios/RMFPOI.h +38 -38
  78. package/ios/RMFPOI.m +123 -123
  79. package/ios/RMFPOIManager.h +18 -18
  80. package/ios/RMFPOIManager.m +168 -168
  81. package/ios/RMFPOIMap4d.h +22 -22
  82. package/ios/RMFPOIMap4d.m +12 -12
  83. package/ios/RMFPolygon.h +41 -41
  84. package/ios/RMFPolygon.m +106 -106
  85. package/ios/RMFPolygonManager.h +18 -18
  86. package/ios/RMFPolygonManager.m +141 -141
  87. package/ios/RMFPolygonMap4d.h +23 -23
  88. package/ios/RMFPolygonMap4d.m +15 -15
  89. package/ios/RMFPolyline.h +38 -38
  90. package/ios/RMFPolyline.m +101 -101
  91. package/ios/RMFPolylineManager.h +18 -18
  92. package/ios/RMFPolylineManager.m +139 -139
  93. package/ios/RMFPolylineMap4d.h +22 -22
  94. package/ios/RMFPolylineMap4d.m +15 -15
  95. package/ios/building/RMFBuilding.h +41 -41
  96. package/ios/building/RMFBuilding.m +104 -104
  97. package/ios/building/RMFBuildingManager.h +19 -19
  98. package/ios/building/RMFBuildingManager.m +133 -133
  99. package/ios/building/RMFBuildingMap4d.h +23 -23
  100. package/ios/building/RMFBuildingMap4d.m +15 -15
  101. package/ios/overlays/RMFTileOverlay.h +36 -36
  102. package/ios/overlays/RMFTileOverlay.m +64 -64
  103. package/ios/overlays/RMFTileOverlayManager.h +17 -17
  104. package/ios/overlays/RMFTileOverlayManager.m +27 -27
  105. package/lib/commonjs/components/MFBanDoSo.js +109 -0
  106. package/lib/commonjs/components/MFBanDoSo.js.map +1 -0
  107. package/lib/commonjs/components/MFBuilding.js +26 -26
  108. package/lib/commonjs/components/MFBuilding.js.map +1 -1
  109. package/lib/commonjs/components/MFCircle.js +20 -20
  110. package/lib/commonjs/components/MFCircle.js.map +1 -1
  111. package/lib/commonjs/components/MFDirectionsRenderer.js +32 -32
  112. package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
  113. package/lib/commonjs/components/MFMapView.js +152 -71
  114. package/lib/commonjs/components/MFMapView.js.map +1 -1
  115. package/lib/commonjs/components/MFMarker.js +35 -35
  116. package/lib/commonjs/components/MFMarker.js.map +1 -1
  117. package/lib/commonjs/components/MFPOI.js +20 -20
  118. package/lib/commonjs/components/MFPOI.js.map +1 -1
  119. package/lib/commonjs/components/MFPolygon.js +22 -22
  120. package/lib/commonjs/components/MFPolygon.js.map +1 -1
  121. package/lib/commonjs/components/MFPolyline.js +18 -18
  122. package/lib/commonjs/components/MFPolyline.js.map +1 -1
  123. package/lib/commonjs/components/MFTileOverlay.js +9 -9
  124. package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
  125. package/lib/commonjs/components/Map4dMapView.js.map +1 -1
  126. package/lib/commonjs/components/extends/AreaFocusManager.js +205 -0
  127. package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -0
  128. package/lib/commonjs/components/extends/AreaFocuser.js +73 -0
  129. package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -0
  130. package/lib/commonjs/components/extends/BoundHelper.js +36 -0
  131. package/lib/commonjs/components/extends/BoundHelper.js.map +1 -0
  132. package/lib/commonjs/components/extends/area/AreaFocusAreas.js +167 -0
  133. package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -0
  134. package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js +164 -0
  135. package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -0
  136. package/lib/commonjs/components/extends/area/AreaFocusSession.js +100 -0
  137. package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -0
  138. package/lib/commonjs/components/extends/area/AreaFocusTypes.js +40 -0
  139. package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -0
  140. package/lib/commonjs/components/internal/DefaultRoadmapStyle.js +2288 -0
  141. package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -0
  142. package/lib/commonjs/components/internal/GeojsonStyleUtils.js +139 -0
  143. package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -0
  144. package/lib/commonjs/index.js +16 -0
  145. package/lib/commonjs/index.js.map +1 -1
  146. package/lib/module/components/MFBanDoSo.js +92 -0
  147. package/lib/module/components/MFBanDoSo.js.map +1 -0
  148. package/lib/module/components/MFBuilding.js +26 -26
  149. package/lib/module/components/MFBuilding.js.map +1 -1
  150. package/lib/module/components/MFCircle.js +20 -20
  151. package/lib/module/components/MFCircle.js.map +1 -1
  152. package/lib/module/components/MFDirectionsRenderer.js +32 -32
  153. package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
  154. package/lib/module/components/MFMapView.js +149 -71
  155. package/lib/module/components/MFMapView.js.map +1 -1
  156. package/lib/module/components/MFMarker.js +35 -35
  157. package/lib/module/components/MFMarker.js.map +1 -1
  158. package/lib/module/components/MFPOI.js +20 -20
  159. package/lib/module/components/MFPOI.js.map +1 -1
  160. package/lib/module/components/MFPolygon.js +22 -22
  161. package/lib/module/components/MFPolygon.js.map +1 -1
  162. package/lib/module/components/MFPolyline.js +18 -18
  163. package/lib/module/components/MFPolyline.js.map +1 -1
  164. package/lib/module/components/MFTileOverlay.js +9 -9
  165. package/lib/module/components/MFTileOverlay.js.map +1 -1
  166. package/lib/module/components/Map4dMapView.js.map +1 -1
  167. package/lib/module/components/extends/AreaFocusManager.js +193 -0
  168. package/lib/module/components/extends/AreaFocusManager.js.map +1 -0
  169. package/lib/module/components/extends/AreaFocuser.js +64 -0
  170. package/lib/module/components/extends/AreaFocuser.js.map +1 -0
  171. package/lib/module/components/extends/BoundHelper.js +29 -0
  172. package/lib/module/components/extends/BoundHelper.js.map +1 -0
  173. package/lib/module/components/extends/area/AreaFocusAreas.js +156 -0
  174. package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -0
  175. package/lib/module/components/extends/area/AreaFocusGeometryUtils.js +153 -0
  176. package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -0
  177. package/lib/module/components/extends/area/AreaFocusSession.js +93 -0
  178. package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -0
  179. package/lib/module/components/extends/area/AreaFocusTypes.js +33 -0
  180. package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -0
  181. package/lib/module/components/internal/DefaultRoadmapStyle.js +2281 -0
  182. package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -0
  183. package/lib/module/components/internal/GeojsonStyleUtils.js +130 -0
  184. package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -0
  185. package/lib/module/index.js +3 -1
  186. package/lib/module/index.js.map +1 -1
  187. package/lib/typescript/components/Map4dMapView.d.ts +7 -7
  188. package/package.json +152 -152
  189. package/react-native-map4d-map.podspec +20 -20
  190. package/src/components/MFBanDoSo.js +124 -0
  191. package/src/components/MFBuilding.js +187 -187
  192. package/src/components/MFCircle.js +173 -173
  193. package/src/components/MFDirectionsRenderer.js +237 -237
  194. package/src/components/MFMapView.js +464 -373
  195. package/src/components/MFMarker.js +246 -246
  196. package/src/components/MFPOI.js +184 -184
  197. package/src/components/MFPolygon.js +186 -186
  198. package/src/components/MFPolyline.js +172 -172
  199. package/src/components/MFTileOverlay.js +45 -45
  200. package/src/components/Map4dMapView.tsx +26 -26
  201. package/src/components/extends/AreaFocusManager.js +196 -0
  202. package/src/components/extends/AreaFocuser.js +62 -0
  203. package/src/components/extends/BoundHelper.js +32 -0
  204. package/src/components/extends/area/AreaFocusAreas.js +164 -0
  205. package/src/components/extends/area/AreaFocusGeometryUtils.js +164 -0
  206. package/src/components/extends/area/AreaFocusSession.js +100 -0
  207. package/src/components/extends/area/AreaFocusTypes.js +36 -0
  208. package/src/components/internal/DefaultRoadmapStyle.js +3365 -0
  209. package/src/components/internal/GeojsonStyleUtils.js +143 -0
  210. package/src/index.js +25 -21
@@ -3,6 +3,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
3
3
  import PropTypes from 'prop-types';
4
4
  import React from 'react';
5
5
  import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
6
+ import { AreaFocusManager } from './extends/AreaFocusManager';
7
+ import { AreaFocuser } from './extends/AreaFocuser';
8
+ import { MFPolygon } from './MFPolygon';
6
9
  import { requireNativeComponent, Platform, NativeModules, findNodeHandle } from 'react-native';
7
10
  const CameraShape = PropTypes.shape({
8
11
  target: PropTypes.shape({
@@ -17,122 +20,122 @@ const CameraShape = PropTypes.shape({
17
20
  const viewPropTypes = ViewPropTypes || View.propTypes;
18
21
  const propTypes = { ...viewPropTypes,
19
22
 
20
- /**
21
- * An opaque identifier for a custom map configuration.
23
+ /**
24
+ * An opaque identifier for a custom map configuration.
22
25
  */
23
26
  mapID: PropTypes.string,
24
27
 
25
- /**
26
- * Map style by string for a custom map configuration.
28
+ /**
29
+ * Map style by string for a custom map configuration.
27
30
  */
28
31
  mapStyle: PropTypes.string,
29
32
 
30
- /**
31
- * If `false` hide the button to move map to the current user's location.
32
- * Default value is `false`.
33
+ /**
34
+ * If `false` hide the button to move map to the current user's location.
35
+ * Default value is `false`.
33
36
  */
34
37
  showsMyLocationButton: PropTypes.bool,
35
38
 
36
- /**
37
- * If `true` the app will ask for the user's location.
38
- * Default value is `false`.
39
+ /**
40
+ * If `true` the app will ask for the user's location.
41
+ * Default value is `false`.
39
42
  */
40
43
  showsMyLocation: PropTypes.bool,
41
44
 
42
- /**
43
- * A Boolean indicating whether the map displays buildings.
44
- * Default value is `true`.
45
+ /**
46
+ * A Boolean indicating whether the map displays buildings.
47
+ * Default value is `true`.
45
48
  */
46
49
  showsBuildings: PropTypes.bool,
47
50
 
48
- /**
49
- * A Boolean indicating whether the map displays POIs.
50
- * Default value is `true`.
51
+ /**
52
+ * A Boolean indicating whether the map displays POIs.
53
+ * Default value is `true`.
51
54
  */
52
55
  showsPOIs: PropTypes.bool,
53
56
 
54
- /**
55
- * If `false` the user won't be able to zoom the map.
56
- * Default value is `true`.
57
+ /**
58
+ * If `false` the user won't be able to zoom the map.
59
+ * Default value is `true`.
57
60
  */
58
61
  zoomGesturesEnabled: PropTypes.bool,
59
62
 
60
- /**
61
- * If `false` the user won't be able to scroll the map.
62
- * Default value is `true`.
63
+ /**
64
+ * If `false` the user won't be able to scroll the map.
65
+ * Default value is `true`.
63
66
  */
64
67
  scrollGesturesEnabled: PropTypes.bool,
65
68
 
66
- /**
67
- * If `false` the user won't be able to pinch/rotate the map.
68
- * Default value is `true`.
69
+ /**
70
+ * If `false` the user won't be able to pinch/rotate the map.
71
+ * Default value is `true`.
69
72
  */
70
73
  rotateGesturesEnabled: PropTypes.bool,
71
74
 
72
- /**
73
- * If `false` the user won't be able to tilt the map.
74
- * Default value is `true`.
75
+ /**
76
+ * If `false` the user won't be able to tilt the map.
77
+ * Default value is `true`.
75
78
  */
76
79
  tiltGesturesEnabled: PropTypes.bool,
77
80
 
78
- /**
79
- * The camera view position.
81
+ /**
82
+ * The camera view position.
80
83
  */
81
84
  camera: CameraShape,
82
85
 
83
- /**
84
- * Type of map tiles to be rendered.
86
+ /**
87
+ * Type of map tiles to be rendered.
85
88
  */
86
89
  mapType: PropTypes.oneOf(['roadmap', 'satellite', 'hybrid']),
87
90
 
88
- /**
89
- * Callback that is called once the map is fully loaded.
90
- * @platform android
91
+ /**
92
+ * Callback that is called once the map is fully loaded.
93
+ * @platform android
91
94
  */
92
95
  onMapReady: PropTypes.func,
93
96
 
94
- /**
95
- * Callback that is called when user taps on the map.
97
+ /**
98
+ * Callback that is called when user taps on the map.
96
99
  */
97
100
  onPress: PropTypes.func,
98
101
 
99
- /**
100
- * Callback that is called when user taps on the POIs
102
+ /**
103
+ * Callback that is called when user taps on the POIs
101
104
  */
102
105
  onPoiPress: PropTypes.func,
103
106
 
104
- /**
105
- * Callback that is called when user taps on the Buildings
107
+ /**
108
+ * Callback that is called when user taps on the Buildings
106
109
  */
107
110
  onBuildingPress: PropTypes.func,
108
111
 
109
- /**
110
- * Callback that is called when user taps on the Places
112
+ /**
113
+ * Callback that is called when user taps on the Places
111
114
  */
112
115
  onPlacePress: PropTypes.func,
113
116
 
114
- /**
115
- * Callback that is called when user taps on the Data Source Features
117
+ /**
118
+ * Callback that is called when user taps on the Data Source Features
116
119
  */
117
120
  onDataSourceFeaturePress: PropTypes.func,
118
121
 
119
- /**
120
- * Callback that is called when moving camera
122
+ /**
123
+ * Callback that is called when moving camera
121
124
  */
122
125
  onCameraMove: PropTypes.func,
123
126
 
124
- /**
125
- * Callback that is called when camera start moving
127
+ /**
128
+ * Callback that is called when camera start moving
126
129
  */
127
130
  onCameraMoveStart: PropTypes.func,
128
131
 
129
- /**
130
- * Callback that is called when camera idle
132
+ /**
133
+ * Callback that is called when camera idle
131
134
  */
132
135
  onCameraIdle: PropTypes.func,
133
136
 
134
- /**
135
- * Callback that is called when user taps on location Button
137
+ /**
138
+ * Callback that is called when user taps on location Button
136
139
  */
137
140
  onMyLocationButtonPress: PropTypes.func
138
141
  };
@@ -140,13 +143,58 @@ const propTypes = { ...viewPropTypes,
140
143
  class MFMapView extends React.Component {
141
144
  constructor(props) {
142
145
  super(props);
146
+ this.areaFocusManager = new AreaFocusManager(this);
147
+ this.areaFocuser = new AreaFocuser(this.areaFocusManager);
143
148
  this.state = {
144
- isReady: Platform.OS === 'ios'
149
+ isReady: Platform.OS === 'ios',
150
+ managedPolygons: {}
145
151
  };
146
152
  this._onMapReady = this._onMapReady.bind(this);
147
153
  this._ref = this._ref.bind(this);
148
154
  }
149
155
 
156
+ _addPolygon(polygon) {
157
+ if (polygon == null || typeof polygon !== 'object') {
158
+ return null;
159
+ }
160
+
161
+ const id = typeof polygon.id === 'string' && polygon.id.trim().length > 0 ? polygon.id : 'polygon-highlight-id-default';
162
+ const _polygon = { ...polygon,
163
+ id
164
+ };
165
+ this.setState(prevState => ({
166
+ managedPolygons: { ...prevState.managedPolygons,
167
+ [id]: _polygon
168
+ }
169
+ }));
170
+ return id;
171
+ }
172
+
173
+ _removePolygon(id) {
174
+ if (typeof id !== 'string' || id.trim().length === 0) {
175
+ return;
176
+ }
177
+
178
+ this.setState(prevState => {
179
+ if (!prevState.managedPolygons[id]) {
180
+ return null;
181
+ }
182
+
183
+ const managedPolygons = { ...prevState.managedPolygons
184
+ };
185
+ delete managedPolygons[id];
186
+ return {
187
+ managedPolygons
188
+ };
189
+ });
190
+ }
191
+
192
+ _clearManagedPolygons() {
193
+ this.setState({
194
+ managedPolygons: {}
195
+ });
196
+ }
197
+
150
198
  _onMapReady() {
151
199
  const {
152
200
  onMapReady
@@ -257,14 +305,14 @@ class MFMapView extends React.Component {
257
305
 
258
306
  return Promise.reject('cameraForBounds not supported on this platform');
259
307
  }
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 })
308
+ /**
309
+ * Convert a map coordinate to screen point
310
+ *
311
+ * @param coordinate Coordinate
312
+ * @param [coordinate.latitude] Latitude
313
+ * @param [coordinate.longitude] Longitude
314
+ *
315
+ * @return Promise Promise with the point ({ x: Number, y: Number })
268
316
  */
269
317
 
270
318
 
@@ -277,14 +325,14 @@ class MFMapView extends React.Component {
277
325
 
278
326
  return Promise.reject('pointForCoordinate not supported on this platform');
279
327
  }
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 })
328
+ /**
329
+ * Convert a screen point to a map coordinate
330
+ *
331
+ * @param point Point
332
+ * @param [point.x] X
333
+ * @param [point.x] Y
334
+ *
335
+ * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
288
336
  */
289
337
 
290
338
 
@@ -298,6 +346,22 @@ class MFMapView extends React.Component {
298
346
  return Promise.reject('coordinateForPoint not supported on this platform');
299
347
  }
300
348
 
349
+ focusArea(focusOptions) {
350
+ if (!this.areaFocusManager) {
351
+ return Promise.resolve(null);
352
+ }
353
+
354
+ return this.areaFocusManager.focus(focusOptions);
355
+ }
356
+
357
+ clearFocusedArea() {
358
+ if (!this.areaFocusManager) {
359
+ return;
360
+ }
361
+
362
+ this.areaFocusManager.clear();
363
+ }
364
+
301
365
  _getHandle() {
302
366
  return findNodeHandle(this.map);
303
367
  }
@@ -334,12 +398,26 @@ class MFMapView extends React.Component {
334
398
 
335
399
  render() {
336
400
  let props;
401
+ const {
402
+ children,
403
+ ...restProps
404
+ } = this.props;
405
+ const managedPolygons = Object.values(this.state.managedPolygons);
337
406
 
338
407
  if (this.state.isReady) {
339
408
  props = {
340
409
  style: this.props.style,
341
410
  onMapReady: this._onMapReady,
342
- ...this.props
411
+ ...restProps,
412
+ children: /*#__PURE__*/React.createElement(React.Fragment, null, children, managedPolygons.map(polygon => /*#__PURE__*/React.createElement(MFPolygon, {
413
+ key: polygon.id,
414
+ coordinates: polygon.coordinates,
415
+ holes: polygon.holes,
416
+ fillColor: polygon.fillColor,
417
+ strokeColor: polygon.strokeColor,
418
+ strokeWidth: polygon.strokeWidth,
419
+ zIndex: polygon.zIndex
420
+ })))
343
421
  };
344
422
  } else {
345
423
  props = {
@@ -1 +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,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ApD,CAAP;;MAEF;QACE,OAAO9B,OAAO,CAACC,MAAR,CAAgB,gCAA+B5D,QAAQ,CAACgD,EAAG,EAA3D,CAAP;IAZJ;EAcD;;EAED4C,iBAAiB,CAACJ,IAAD,EAAO;IACtB,MAAME,SAAS,GAAGzF,aAAa,CAACyF,SAAhC;IACA,MAAMI,aAAa,GAAG,YAAtB;;IAEA,IAAI,CAACJ,SAAS,CAACK,oBAAf,EAAqC;MACnC;MACA,OAAOL,SAAS,CAACI,aAAD,CAAT,CAAyBE,QAAzB,CAAkCR,IAAlC,CAAP;IACD,CAPqB,CAStB;;;IACA,OAAOE,SAAS,CAACK,oBAAV,CAA+BD,aAA/B,EAA8CE,QAA9C,CAAuDR,IAAvD,CAAP;EACD;;EAEDK,kBAAkB,CAACL,IAAD,EAAO;IACvB,OAAOvF,aAAa,CAAE,YAAF,CAAb,CAA4BuF,IAA5B,CAAP;EACD;;EAGDS,MAAM,GAAG;IACP,IAAIpD,KAAJ;;IAEA,IAAI,KAAKC,KAAL,CAAWC,OAAf,EAAwB;MACtBF,KAAK,GAAG;QACNqD,KAAK,EAAE,KAAKrD,KAAL,CAAWqD,KADZ;QAENnE,UAAU,EAAE,KAAKkB,WAFX;QAGN,GAAG,KAAKJ;MAHF,CAAR;IAKD,CAND,MAMO;MACLA,KAAK,GAAG;QACNqD,KAAK,EAAE,KAAKrD,KAAL,CAAWqD,KADZ;QAENnE,UAAU,EAAE,KAAKkB;MAFX,CAAR;IAID;;IAED,oBAAO,oBAAC,UAAD,eACDJ,KADC;MAEL,GAAG,EAAE,KAAKM;IAFL,GAAP;EAID;;AA3NqC;;AA8NxCT,SAAS,CAAC3B,SAAV,GAAsBA,SAAtB;AACA,IAAIoF,UAAU,GAAGpG,sBAAsB,CAAE,YAAF,EAAe2C,SAAf,CAAvC;AAGA,SAASA,SAAT"}
1
+ {"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","AreaFocusManager","AreaFocuser","MFPolygon","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","areaFocusManager","areaFocuser","state","isReady","OS","managedPolygons","_onMapReady","bind","_ref","_addPolygon","polygon","id","trim","length","_polygon","setState","prevState","_removePolygon","_clearManagedPolygons","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","focusArea","focusOptions","resolve","focus","clearFocusedArea","clear","name","args","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","render","children","restProps","Object","values","style","coordinates","holes","fillColor","strokeColor","strokeWidth","zIndex","RMFMapView"],"sources":["MFMapView.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {AreaFocusManager} from './extends/AreaFocusManager';\r\nimport {AreaFocuser} from './extends/AreaFocuser';\r\nimport {MFPolygon} from './MFPolygon';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n NativeModules,\r\n findNodeHandle\r\n} from 'react-native';\r\n\r\nconst CameraShape = PropTypes.shape({\r\n target: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n zoom: PropTypes.number.isRequired,\r\n bearing: PropTypes.number.isRequired,\r\n tilt: PropTypes.number.isRequired,\r\n});\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 opaque identifier for a custom map configuration.\r\n */\r\n mapID: PropTypes.string,\r\n\r\n /**\r\n * Map style by string for a custom map configuration.\r\n */\r\n mapStyle: PropTypes.string,\r\n\r\n /**\r\n * If `false` hide the button to move map to the current user's location.\r\n * Default value is `false`.\r\n */\r\n showsMyLocationButton: PropTypes.bool,\r\n\r\n /**\r\n * If `true` the app will ask for the user's location.\r\n * Default value is `false`.\r\n */\r\n showsMyLocation: PropTypes.bool,\r\n\r\n /**\r\n * A Boolean indicating whether the map displays buildings.\r\n * Default value is `true`.\r\n */\r\n showsBuildings: PropTypes.bool,\r\n\r\n /**\r\n * A Boolean indicating whether the map displays POIs.\r\n * Default value is `true`.\r\n */\r\n showsPOIs: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to zoom the map.\r\n * Default value is `true`.\r\n */\r\n zoomGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to scroll the map.\r\n * Default value is `true`.\r\n */\r\n scrollGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to pinch/rotate the map.\r\n * Default value is `true`.\r\n */\r\n rotateGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to tilt the map.\r\n * Default value is `true`.\r\n */\r\n tiltGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * The camera view position.\r\n */\r\n camera: CameraShape,\r\n\r\n /**\r\n * Type of map tiles to be rendered.\r\n */\r\n mapType: PropTypes.oneOf(['roadmap', 'satellite', 'hybrid']),\r\n\r\n /**\r\n * Callback that is called once the map is fully loaded.\r\n * @platform android\r\n */\r\n onMapReady: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the map.\r\n */\r\n onPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the POIs\r\n */\r\n onPoiPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the Buildings\r\n */\r\n onBuildingPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the Places\r\n */\r\n onPlacePress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the Data Source Features\r\n */\r\n onDataSourceFeaturePress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when moving camera\r\n */\r\n onCameraMove: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when camera start moving\r\n */\r\n onCameraMoveStart: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when camera idle\r\n */\r\n onCameraIdle: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on location Button\r\n */\r\n onMyLocationButtonPress: PropTypes.func,\r\n\r\n};\r\n\r\n\r\nclass MFMapView extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.areaFocusManager = new AreaFocusManager(this);\r\n this.areaFocuser = new AreaFocuser(this.areaFocusManager);\r\n this.state = {\r\n isReady: Platform.OS === 'ios',\r\n managedPolygons: {},\r\n };\r\n\r\n this._onMapReady = this._onMapReady.bind(this);\r\n this._ref = this._ref.bind(this);\r\n }\r\n\r\n _addPolygon(polygon) {\r\n if (polygon == null || typeof polygon !== 'object') {\r\n return null;\r\n }\r\n\r\n const id =\r\n typeof polygon.id === 'string' && polygon.id.trim().length > 0\r\n ? polygon.id\r\n : 'polygon-highlight-id-default';\r\n\r\n const _polygon = {\r\n ...polygon,\r\n id,\r\n };\r\n\r\n this.setState((prevState) => ({\r\n managedPolygons: {\r\n ...prevState.managedPolygons,\r\n [id]: _polygon,\r\n },\r\n }));\r\n\r\n return id;\r\n }\r\n\r\n _removePolygon(id) {\r\n if (typeof id !== 'string' || id.trim().length === 0) {\r\n return;\r\n }\r\n\r\n this.setState((prevState) => {\r\n if (!prevState.managedPolygons[id]) {\r\n return null;\r\n }\r\n\r\n const managedPolygons = {\r\n ...prevState.managedPolygons,\r\n };\r\n delete managedPolygons[id];\r\n\r\n return {\r\n managedPolygons,\r\n };\r\n });\r\n }\r\n\r\n _clearManagedPolygons() {\r\n this.setState({\r\n managedPolygons: {},\r\n });\r\n }\r\n\r\n _onMapReady() {\r\n const { onMapReady } = this.props;\r\n this.setState({ isReady: true }, () => {\r\n if (onMapReady) {\r\n onMapReady();\r\n }\r\n });\r\n }\r\n\r\n _ref(ref) {\r\n this.map = ref;\r\n }\r\n\r\n getCamera() {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.getCamera(this._getHandle());\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('getCamera', []);\r\n }\r\n return Promise.reject('Function not supported on this platform');\r\n }\r\n\r\n getBounds() {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.getBounds(this._getHandle());\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('getBounds', []);\r\n }\r\n return Promise.reject('Function not supported on this platform');\r\n }\r\n\r\n getMyLocation() {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.getMyLocation(this._getHandle());\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('getMyLocation', []);\r\n }\r\n return Promise.reject('Function not supported on this platform');\r\n }\r\n\r\n animateCamera(camera) {\r\n this._runCommand('animateCamera', [camera]);\r\n }\r\n\r\n moveCamera(camera) {\r\n this._runCommand('moveCamera', [camera]);\r\n }\r\n\r\n setMyLocationEnabled(enable) {\r\n this._runCommand('setMyLocationEnabled', [enable]);\r\n }\r\n\r\n showsMyLocationButton(enable) {\r\n this._runCommand('showsMyLocationButton', [enable]);\r\n }\r\n\r\n setPOIsEnabled(enable) {\r\n this._runCommand('setPOIsEnabled', [enable]);\r\n }\r\n\r\n setZoomGesturesEnabled(enable) {\r\n this._runCommand('setZoomGesturesEnabled', [enable]);\r\n }\r\n\r\n setScrollGesturesEnabled(enable) {\r\n this._runCommand('setScrollGesturesEnabled', [enable]);\r\n }\r\n\r\n setRotateGesturesEnabled(enable) {\r\n this._runCommand('setRotateGesturesEnabled', [enable]);\r\n }\r\n\r\n setTiltGesturesEnabled(enable) {\r\n this._runCommand('setTiltGesturesEnabled', [enable]);\r\n }\r\n\r\n setAllGesturesEnabled(enable) {\r\n this._runCommand('setAllGesturesEnabled', [enable]);\r\n }\r\n\r\n setTime(time) {\r\n let t = Date.parse(time)\r\n if (isNaN(t)) {\r\n console.log('time invalid')\r\n }\r\n else {\r\n this._runCommand('setTime', [t]);\r\n }\r\n }\r\n\r\n fitBounds(boundsData) {\r\n this._runCommand(\"fitBounds\", [boundsData])\r\n }\r\n\r\n cameraForBounds(boundsData) {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.cameraForBounds(\r\n this._getHandle(),\r\n boundsData\r\n );\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('cameraForBounds', [boundsData]);\r\n }\r\n return Promise.reject('cameraForBounds not supported on this platform');\r\n }\r\n\r\n\r\n /**\r\n * Convert a map coordinate to screen point\r\n *\r\n * @param coordinate Coordinate\r\n * @param [coordinate.latitude] Latitude\r\n * @param [coordinate.longitude] Longitude\r\n *\r\n * @return Promise Promise with the point ({ x: Number, y: Number })\r\n */\r\n pointForCoordinate(coordinate) {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.pointForCoordinate(\r\n this._getHandle(),\r\n coordinate\r\n );\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('pointForCoordinate', [coordinate]);\r\n }\r\n return Promise.reject('pointForCoordinate not supported on this platform');\r\n }\r\n\r\n /**\r\n * Convert a screen point to a map coordinate\r\n *\r\n * @param point Point\r\n * @param [point.x] X\r\n * @param [point.x] Y\r\n *\r\n * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })\r\n */\r\n coordinateForPoint(point) {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.coordinateForPoint(\r\n this._getHandle(),\r\n point\r\n );\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('coordinateForPoint', [point]);\r\n }\r\n return Promise.reject('coordinateForPoint not supported on this platform');\r\n }\r\n\r\n focusArea(focusOptions) {\r\n if (!this.areaFocusManager) {\r\n return Promise.resolve(null)\r\n }\r\n\r\n return this.areaFocusManager.focus(focusOptions)\r\n }\r\n\r\n clearFocusedArea() {\r\n if (!this.areaFocusManager) {\r\n return\r\n }\r\n this.areaFocusManager.clear()\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.map);\r\n }\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android':\r\n return NativeModules.UIManager.dispatchViewManagerCommand(\r\n this._getHandle(),\r\n this._uiManagerCommand(name),\r\n args\r\n );\r\n\r\n case 'ios':\r\n return this._mapManagerCommand(name)(this._getHandle(), ...args);\r\n\r\n default:\r\n return Promise.reject(`Invalid platform was passed: ${Platform.OS}`);\r\n }\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const UIManager = NativeModules.UIManager;\r\n const componentName = \"RMFMapView\";\r\n\r\n if (!UIManager.getViewManagerConfig) {\r\n // RN < 0.58\r\n return UIManager[componentName].Commands[name];\r\n }\r\n\r\n // RN >= 0.58 \r\n return UIManager.getViewManagerConfig(componentName).Commands[name];\r\n }\r\n\r\n _mapManagerCommand(name) {\r\n return NativeModules[`RMFMapView`][name];\r\n }\r\n\r\n render() {\r\n let props;\r\n const { children, ...restProps } = this.props;\r\n const managedPolygons = Object.values(this.state.managedPolygons);\r\n\r\n if (this.state.isReady) {\r\n props = {\r\n style: this.props.style,\r\n onMapReady: this._onMapReady,\r\n ...restProps,\r\n children: (\r\n <React.Fragment>\r\n {children}\r\n {managedPolygons.map((polygon) => (\r\n <MFPolygon\r\n key={polygon.id}\r\n coordinates={polygon.coordinates}\r\n holes={polygon.holes}\r\n fillColor={polygon.fillColor}\r\n strokeColor={polygon.strokeColor}\r\n strokeWidth={polygon.strokeWidth}\r\n zIndex={polygon.zIndex}\r\n />\r\n ))}\r\n </React.Fragment>\r\n ),\r\n };\r\n } else {\r\n props = {\r\n style: this.props.style,\r\n onMapReady: this._onMapReady\r\n };\r\n }\r\n\r\n return <RMFMapView\r\n {...props}\r\n ref={this._ref}\r\n />;\r\n }\r\n}\r\n\r\nMFMapView.propTypes = propTypes;\r\nvar RMFMapView = requireNativeComponent(`RMFMapView`, MFMapView);\r\n\r\n\r\nexport { MFMapView }"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SAAQC,gBAAR,QAA+B,4BAA/B;AACA,SAAQC,WAAR,QAA0B,uBAA1B;AACA,SAAQC,SAAR,QAAwB,aAAxB;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,aAHF,EAIEC,cAJF,QAKO,cALP;AAOA,MAAMC,WAAW,GAAGX,SAAS,CAACY,KAAV,CAAgB;EAClCC,MAAM,EAAEb,SAAS,CAACY,KAAV,CAAgB;IACtBE,QAAQ,EAAEd,SAAS,CAACe,MAAV,CAAiBC,UADL;IAEtBC,SAAS,EAAEjB,SAAS,CAACe,MAAV,CAAiBC;EAFN,CAAhB,CAD0B;EAKlCE,IAAI,EAAElB,SAAS,CAACe,MAAV,CAAiBC,UALW;EAMlCG,OAAO,EAAEnB,SAAS,CAACe,MAAV,CAAiBC,UANQ;EAOlCI,IAAI,EAAEpB,SAAS,CAACe,MAAV,CAAiBC;AAPW,CAAhB,CAApB,C,CAUA;;AACA,MAAMK,aAAa,GAAGnB,aAAa,IAAIoB,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,KAAK,EAAExB,SAAS,CAACyB,MAND;;EAQhB;AAC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AAhB,CAAqBV,OAAD,iBACnB,oBAAC,SAAD;UACE,GAAG,EAAEA,OAAO,CAACC,EADf;UAEE,WAAW,EAAED,OAAO,CAACiE,WAFvB;UAGE,KAAK,EAAEjE,OAAO,CAACkE,KAHjB;UAIE,SAAS,EAAElE,OAAO,CAACmE,SAJrB;UAKE,WAAW,EAAEnE,OAAO,CAACoE,WALvB;UAME,WAAW,EAAEpE,OAAO,CAACqE,WANvB;UAOE,MAAM,EAAErE,OAAO,CAACsE;QAPlB,EADD,CAFH;MALI,CAAR;IAqBD,CAtBD,MAsBO;MACLjF,KAAK,GAAG;QACN2E,KAAK,EAAE,KAAK3E,KAAL,CAAW2E,KADZ;QAENzF,UAAU,EAAE,KAAKqB;MAFX,CAAR;IAID;;IAED,oBAAO,oBAAC,UAAD,eACDP,KADC;MAEL,GAAG,EAAE,KAAKS;IAFL,GAAP;EAID;;AAlTqC;;AAqTxCZ,SAAS,CAAC3B,SAAV,GAAsBA,SAAtB;AACA,IAAIgH,UAAU,GAAGhI,sBAAsB,CAAE,YAAF,EAAe2C,SAAf,CAAvC;AAGA,SAASA,SAAT"}
@@ -8,57 +8,57 @@ import { requireNativeComponent, StyleSheet, Platform, Image, NativeModules, fin
8
8
  const viewPropTypes = ViewPropTypes || View.propTypes;
9
9
  const propTypes = { ...viewPropTypes,
10
10
 
11
- /**
12
- * The coordinate for the marker.
11
+ /**
12
+ * The coordinate for the marker.
13
13
  */
14
14
  coordinate: PropTypes.shape({
15
15
  latitude: PropTypes.number.isRequired,
16
16
  longitude: PropTypes.number.isRequired
17
17
  }).isRequired,
18
18
 
19
- /**
20
- * Default value is `false`
19
+ /**
20
+ * Default value is `false`
21
21
  */
22
22
  draggable: PropTypes.bool,
23
23
 
24
- /**
25
- * Sets the ground anchor point for the marker.
24
+ /**
25
+ * Sets the ground anchor point for the marker.
26
26
  */
27
27
  anchor: PropTypes.shape({
28
28
  x: PropTypes.number.isRequired,
29
29
  y: PropTypes.number.isRequired
30
30
  }),
31
31
 
32
- /**
33
- *
32
+ /**
33
+ *
34
34
  */
35
35
  elevation: PropTypes.number,
36
36
 
37
- /**
38
- *
37
+ /**
38
+ *
39
39
  */
40
40
  rotation: PropTypes.number,
41
41
 
42
- /**
43
- * Sets the infor window anchor point for the marker.
42
+ /**
43
+ * Sets the infor window anchor point for the marker.
44
44
  */
45
45
  infoWindowAnchor: PropTypes.shape({
46
46
  x: PropTypes.number.isRequired,
47
47
  y: PropTypes.number.isRequired
48
48
  }),
49
49
 
50
- /**
51
- * The title of the marker.
50
+ /**
51
+ * The title of the marker.
52
52
  */
53
53
  title: PropTypes.string,
54
54
 
55
- /**
56
- * The snippet of the marker.
55
+ /**
56
+ * The snippet of the marker.
57
57
  */
58
58
  snippet: PropTypes.string,
59
59
 
60
- /**
61
- * Marker icon to render.
60
+ /**
61
+ * Marker icon to render.
62
62
  */
63
63
  icon: PropTypes.shape({
64
64
  uri: PropTypes.any.isRequired,
@@ -66,44 +66,44 @@ const propTypes = { ...viewPropTypes,
66
66
  height: PropTypes.number.isRequired
67
67
  }),
68
68
 
69
- /**
70
- * zIndex
69
+ /**
70
+ * zIndex
71
71
  */
72
72
  zIndex: PropTypes.number,
73
73
 
74
- /**
75
- * visible
74
+ /**
75
+ * visible
76
76
  */
77
77
  visible: PropTypes.bool,
78
78
 
79
- /**
80
- * userData
79
+ /**
80
+ * userData
81
81
  */
82
82
  userData: PropTypes.object,
83
83
 
84
- /**
85
- * Callback that is called when the user presses on the marker
84
+ /**
85
+ * Callback that is called when the user presses on the marker
86
86
  */
87
87
  onPress: PropTypes.func,
88
88
 
89
- /**
90
- * Callback that is called when the user presses on the info window
89
+ /**
90
+ * Callback that is called when the user presses on the info window
91
91
  */
92
92
  onPressInfoWindow: PropTypes.func,
93
93
 
94
- /**
95
- * Callback that is called when the user initiates a drag on this marker (if it is draggable)
94
+ /**
95
+ * Callback that is called when the user initiates a drag on this marker (if it is draggable)
96
96
  */
97
97
  onDragStart: PropTypes.func,
98
98
 
99
- /**
100
- * Callback called continuously as the marker is dragged
99
+ /**
100
+ * Callback called continuously as the marker is dragged
101
101
  */
102
102
  onDrag: PropTypes.func,
103
103
 
104
- /**
105
- * Callback that is called when a drag on this marker finishes. This is usually the point you
106
- * will want to setState on the marker's coordinate again
104
+ /**
105
+ * Callback that is called when a drag on this marker finishes. This is usually the point you
106
+ * will want to setState on the marker's coordinate again
107
107
  */
108
108
  onDragEnd: PropTypes.func
109
109
  };
@@ -1 +1 @@
1
- {"version":3,"names":["PropTypes","React","ViewPropTypes","requireNativeComponent","StyleSheet","Platform","Image","NativeModules","findNodeHandle","viewPropTypes","View","propTypes","coordinate","shape","latitude","number","isRequired","longitude","draggable","bool","anchor","x","y","elevation","rotation","infoWindowAnchor","title","string","snippet","icon","uri","any","width","height","zIndex","visible","userData","object","onPress","func","onPressInfoWindow","onDragStart","onDrag","onDragEnd","MFMarker","Component","constructor","props","_onPress","bind","_ref","setCoordinate","location","_runCommand","setRotation","setTitle","setSnippet","setDraggable","setZIndex","setVisible","setInfoWindowAnchor","setElevation","setUserData","_getHandle","marker","name","args","OS","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","event","stopPropagation","ref","render","resolveAssetSource","styles","style","RMFMarker","create","position"],"sources":["MFMarker.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n StyleSheet,\n Platform,\n Image,\n NativeModules,\n findNodeHandle\n} from 'react-native';\n\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The coordinate for the marker.\n */\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }).isRequired,\n\n /**\n * Default value is `false`\n */\n draggable: PropTypes.bool,\n\n /**\n * Sets the ground anchor point for the marker.\n */\n anchor: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n }),\n\n /**\n * \n */\n elevation: PropTypes.number,\n\n /**\n * \n */\n rotation: PropTypes.number,\n\n /**\n * Sets the infor window anchor point for the marker.\n */\n infoWindowAnchor: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n }),\n\n /**\n * The title of the marker.\n */\n title: PropTypes.string,\n\n /**\n * The snippet of the marker.\n */\n snippet: PropTypes.string,\n\n /**\n * Marker icon to render.\n */\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n }),\n\n\n /**\n * zIndex\n */\n zIndex: PropTypes.number,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * userData\n */\n userData:PropTypes.object,\n\n /**\n * Callback that is called when the user presses on the marker\n */\n onPress: PropTypes.func,\n\n /**\n * Callback that is called when the user presses on the info window\n */\n onPressInfoWindow: PropTypes.func,\n\n /**\n * Callback that is called when the user initiates a drag on this marker (if it is draggable)\n */\n onDragStart: PropTypes.func,\n\n /**\n * Callback called continuously as the marker is dragged\n */\n onDrag: PropTypes.func,\n\n /**\n * Callback that is called when a drag on this marker finishes. This is usually the point you\n * will want to setState on the marker's coordinate again\n */\n onDragEnd: PropTypes.func,\n};\n\n\nclass MFMarker extends React.Component {\n constructor(props) {\n super(props); \n this._onPress = this._onPress.bind(this)\n this._ref = this._ref.bind(this)\n }\n\n setCoordinate(location) {\n this._runCommand(\"setCoordinate\", [location])\n }\n\n setRotation(rotation) {\n this._runCommand(\"setRotation\", [rotation])\n }\n\n setTitle(title) {\n this._runCommand(\"setTitle\", [title])\n }\n\n setSnippet(snippet) {\n this._runCommand(\"setSnippet\", [snippet])\n }\n\n setDraggable(draggable) {\n this._runCommand(\"setDraggable\", [draggable])\n }\n\n setZIndex(zIndex) {\n this._runCommand(\"setZIndex\", [zIndex])\n }\n\n setVisible(visible) {\n this._runCommand(\"setVisible\", [visible])\n }\n\n setInfoWindowAnchor(anchor) {\n this._runCommand(\"setInfoWindowAnchor\", [anchor])\n }\n\n setElevation(elevation) {\n this._runCommand(\"setElevation\", [elevation])\n }\n\n setUserData(userData) {\n this._runCommand(\"setUserData\", [userData])\n }\n\n _getHandle() {\n return findNodeHandle(this.marker);\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.getMapManagerCommand(name)(this._getHandle(), ...args);\n this._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n \n default:\n break;\n }\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFMarker\";\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[`RMFMarker`][name];\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _ref(ref) {\n this.marker = ref;\n }\n\n render() {\n let icon = {};\n if (this.props.icon) {\n let uri = Image.resolveAssetSource(this.props.icon.uri) || {uri: this.props.icon.uri};\n icon = {uri: uri.uri, width: this.props.icon.width, height: this.props.icon.height}\n }\n return <RMFMarker\n {...this.props}\n icon={icon}\n ref={this._ref}\n style={[styles.marker, this.props.style]}\n onPress={this._onPress}\n />;\n }\n}\n\nMFMarker.propTypes = propTypes;\nvar RMFMarker = requireNativeComponent(`RMFMarker`, MFMarker);\n\nconst styles = StyleSheet.create({\n marker: {\n position: 'absolute'\n },\n});\n\nexport {MFMarker}\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,QAA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;IALT,GAAP;EAOD;;AAjHgC;;AAoHvCJ,QAAQ,CAACjC,SAAT,GAAqBA,SAArB;AACA,IAAIuE,SAAS,GAAG/E,sBAAsB,CAAE,WAAF,EAAcyC,QAAd,CAAtC;AAEA,MAAMoC,MAAM,GAAG5E,UAAU,CAAC+E,MAAX,CAAkB;EAC/BnB,MAAM,EAAE;IACNoB,QAAQ,EAAE;EADJ;AADuB,CAAlB,CAAf;AAMA,SAAQxC,QAAR"}
1
+ {"version":3,"names":["PropTypes","React","ViewPropTypes","requireNativeComponent","StyleSheet","Platform","Image","NativeModules","findNodeHandle","viewPropTypes","View","propTypes","coordinate","shape","latitude","number","isRequired","longitude","draggable","bool","anchor","x","y","elevation","rotation","infoWindowAnchor","title","string","snippet","icon","uri","any","width","height","zIndex","visible","userData","object","onPress","func","onPressInfoWindow","onDragStart","onDrag","onDragEnd","MFMarker","Component","constructor","props","_onPress","bind","_ref","setCoordinate","location","_runCommand","setRotation","setTitle","setSnippet","setDraggable","setZIndex","setVisible","setInfoWindowAnchor","setElevation","setUserData","_getHandle","marker","name","args","OS","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","event","stopPropagation","ref","render","resolveAssetSource","styles","style","RMFMarker","create","position"],"sources":["MFMarker.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 StyleSheet,\r\n Platform,\r\n Image,\r\n NativeModules,\r\n findNodeHandle\r\n} from 'react-native';\r\n\r\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The coordinate for the marker.\r\n */\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }).isRequired,\r\n\r\n /**\r\n * Default value is `false`\r\n */\r\n draggable: PropTypes.bool,\r\n\r\n /**\r\n * Sets the ground anchor point for the marker.\r\n */\r\n anchor: PropTypes.shape({\r\n x: PropTypes.number.isRequired,\r\n y: PropTypes.number.isRequired,\r\n }),\r\n\r\n /**\r\n * \r\n */\r\n elevation: PropTypes.number,\r\n\r\n /**\r\n * \r\n */\r\n rotation: PropTypes.number,\r\n\r\n /**\r\n * Sets the infor window anchor point for the marker.\r\n */\r\n infoWindowAnchor: PropTypes.shape({\r\n x: PropTypes.number.isRequired,\r\n y: PropTypes.number.isRequired,\r\n }),\r\n\r\n /**\r\n * The title of the marker.\r\n */\r\n title: PropTypes.string,\r\n\r\n /**\r\n * The snippet of the marker.\r\n */\r\n snippet: PropTypes.string,\r\n\r\n /**\r\n * Marker icon to render.\r\n */\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired,\r\n width: PropTypes.number.isRequired,\r\n height: PropTypes.number.isRequired,\r\n }),\r\n\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 marker\r\n */\r\n onPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when the user presses on the info window\r\n */\r\n onPressInfoWindow: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when the user initiates a drag on this marker (if it is draggable)\r\n */\r\n onDragStart: PropTypes.func,\r\n\r\n /**\r\n * Callback called continuously as the marker is dragged\r\n */\r\n onDrag: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when a drag on this marker finishes. This is usually the point you\r\n * will want to setState on the marker's coordinate again\r\n */\r\n onDragEnd: PropTypes.func,\r\n};\r\n\r\n\r\nclass MFMarker 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 setCoordinate(location) {\r\n this._runCommand(\"setCoordinate\", [location])\r\n }\r\n\r\n setRotation(rotation) {\r\n this._runCommand(\"setRotation\", [rotation])\r\n }\r\n\r\n setTitle(title) {\r\n this._runCommand(\"setTitle\", [title])\r\n }\r\n\r\n setSnippet(snippet) {\r\n this._runCommand(\"setSnippet\", [snippet])\r\n }\r\n\r\n setDraggable(draggable) {\r\n this._runCommand(\"setDraggable\", [draggable])\r\n }\r\n\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n setInfoWindowAnchor(anchor) {\r\n this._runCommand(\"setInfoWindowAnchor\", [anchor])\r\n }\r\n\r\n setElevation(elevation) {\r\n this._runCommand(\"setElevation\", [elevation])\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.marker);\r\n }\r\n\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android':\r\n NativeModules.UIManager.dispatchViewManagerCommand(\r\n this._getHandle(),\r\n this._uiManagerCommand(name),\r\n args\r\n );\r\n break;\r\n \r\n case 'ios':\r\n //this.getMapManagerCommand(name)(this._getHandle(), ...args);\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 = NativeModules.UIManager;\r\n const componentName = \"RMFMarker\";\r\n \r\n if (!UIManager.getViewManagerConfig) {\r\n // RN < 0.58\r\n return UIManager[componentName].Commands[name];\r\n }\r\n \r\n // RN >= 0.58 \r\n return UIManager.getViewManagerConfig(componentName).Commands[name];\r\n }\r\n \r\n _mapManagerCommand(name) {\r\n return NativeModules[`RMFMarker`][name];\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _ref(ref) {\r\n this.marker = ref;\r\n }\r\n\r\n render() {\r\n let icon = {};\r\n if (this.props.icon) {\r\n let uri = Image.resolveAssetSource(this.props.icon.uri) || {uri: this.props.icon.uri};\r\n icon = {uri: uri.uri, width: this.props.icon.width, height: this.props.icon.height}\r\n }\r\n return <RMFMarker\r\n {...this.props}\r\n icon={icon}\r\n ref={this._ref}\r\n style={[styles.marker, this.props.style]}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFMarker.propTypes = propTypes;\r\nvar RMFMarker = requireNativeComponent(`RMFMarker`, MFMarker);\r\n\r\nconst styles = StyleSheet.create({\r\n marker: {\r\n position: 'absolute'\r\n },\r\n});\r\n\r\nexport {MFMarker}\r\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,QAA4B,oCAA5B;AACA,SACEC,sBADF,EAEEC,UAFF,EAGEC,QAHF,EAIEC,KAJF,EAKEC,aALF,EAMEC,cANF,QAOO,cAPP,C,CASA;;AACA,MAAMC,aAAa,GAAGP,aAAa,IAAIQ,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,UAAU,EAAEZ,SAAS,CAACa,KAAV,CAAgB;IAC1BC,QAAQ,EAAEd,SAAS,CAACe,MAAV,CAAiBC,UADD;IAE1BC,SAAS,EAAEjB,SAAS,CAACe,MAAV,CAAiBC;EAFF,CAAhB,EAGTA,UATa;;EAWhB;AACF;AACA;EACEE,SAAS,EAAElB,SAAS,CAACmB,IAdL;;EAgBhB;AACF;AACA;EACEC,MAAM,EAAEpB,SAAS,CAACa,KAAV,CAAgB;IACtBQ,CAAC,EAAErB,SAAS,CAACe,MAAV,CAAiBC,UADE;IAEtBM,CAAC,EAAEtB,SAAS,CAACe,MAAV,CAAiBC;EAFE,CA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