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
@@ -21,54 +21,54 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
21
21
  const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
22
22
  const propTypes = { ...viewPropTypes,
23
23
 
24
- /**
25
- * The coordinate of the center of the circle
24
+ /**
25
+ * The coordinate of the center of the circle
26
26
  */
27
27
  center: _propTypes.default.shape({
28
- /**
29
- * Coordinates for the center of the circle.
28
+ /**
29
+ * Coordinates for the center of the circle.
30
30
  */
31
31
  latitude: _propTypes.default.number.isRequired,
32
32
  longitude: _propTypes.default.number.isRequired
33
33
  }).isRequired,
34
34
 
35
- /**
36
- * The radius of the circle to be drawn (in meters)
35
+ /**
36
+ * The radius of the circle to be drawn (in meters)
37
37
  */
38
38
  radius: _propTypes.default.number.isRequired,
39
39
 
40
- /**
41
- * The stroke width to use for the circle.
40
+ /**
41
+ * The stroke width to use for the circle.
42
42
  */
43
43
  strokeWidth: _propTypes.default.number,
44
44
 
45
- /**
46
- * The stroke color to use for the circle.
45
+ /**
46
+ * The stroke color to use for the circle.
47
47
  */
48
48
  strokeColor: _deprecatedReactNativePropTypes.ColorPropType,
49
49
 
50
- /**
51
- * The fill color to use for the circle.
50
+ /**
51
+ * The fill color to use for the circle.
52
52
  */
53
53
  fillColor: _deprecatedReactNativePropTypes.ColorPropType,
54
54
 
55
- /**
56
- * zIndex
55
+ /**
56
+ * zIndex
57
57
  */
58
58
  zIndex: _propTypes.default.number,
59
59
 
60
- /**
61
- * visible
60
+ /**
61
+ * visible
62
62
  */
63
63
  visible: _propTypes.default.bool,
64
64
 
65
- /**
66
- * userData
65
+ /**
66
+ * userData
67
67
  */
68
68
  userData: _propTypes.default.object,
69
69
 
70
- /**
71
- * Callback that is called when the user presses on the circle
70
+ /**
71
+ * Callback that is called when the user presses on the circle
72
72
  */
73
73
  onPress: _propTypes.default.func
74
74
  }; // const defaultProps = {
@@ -1 +1 @@
1
- {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","center","PropTypes","shape","latitude","number","isRequired","longitude","radius","strokeWidth","strokeColor","ColorPropType","fillColor","zIndex","visible","bool","userData","object","onPress","func","MFCircle","React","Component","constructor","props","_onPress","bind","_ref","setCenter","_runCommand","setRadius","setFillColor","color","processColor","setStrokeColor","setStrokeWidth","width","setUserData","setZIndex","setVisible","_getHandle","findNodeHandle","circle","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","event","stopPropagation","ref","render","RMFCircle","requireNativeComponent"],"sources":["MFCircle.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n NativeModules,\n findNodeHandle,\n processColor\n} from 'react-native';\n\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The coordinate of the center of the circle\n */\n center: PropTypes.shape({\n /**\n * Coordinates for the center of the circle.\n */\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }).isRequired,\n\n /**\n * The radius of the circle to be drawn (in meters)\n */\n radius: PropTypes.number.isRequired,\n\n /**\n * The stroke width to use for the circle.\n */\n strokeWidth: PropTypes.number,\n\n /**\n * The stroke color to use for the circle.\n */\n strokeColor: ColorPropType,\n\n /**\n * The fill color to use for the circle.\n */\n fillColor: ColorPropType,\n\n /**\n * zIndex\n */\n zIndex: PropTypes.number,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * userData\n */\n userData:PropTypes.object,\n\n /**\n * Callback that is called when the user presses on the circle\n */\n onPress: PropTypes.func,\n};\n\n// const defaultProps = {\n// strokeColor: '#000',\n// strokeWidth: 1,\n// };\n\nclass MFCircle extends React.Component {\n constructor(props) {\n super(props);\n this._onPress = this._onPress.bind(this)\n this._ref = this._ref.bind(this)\n }\n\n setCenter(center) {\n this._runCommand(\"setCenter\", [center])\n }\n setRadius(radius) {\n this._runCommand(\"setRadius\", [radius])\n }\n setFillColor(color) {\n this._runCommand(\"setFillColor\", [processColor(color)])\n }\n setStrokeColor(color) {\n this._runCommand(\"setStrokeColor\", [processColor(color)])\n }\n setStrokeWidth(width) {\n this._runCommand(\"setStrokeWidth\", [width])\n }\n setUserData(userData) {\n this._runCommand(\"setUserData\", [userData])\n }\n setZIndex(zIndex) {\n this._runCommand(\"setZIndex\", [zIndex])\n }\n setVisible(visible) {\n this._runCommand(\"setVisible\", [visible])\n }\n\n _getHandle() {\n return findNodeHandle(this.circle);\n }\n\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n break;\n\n case 'ios':\n this._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n\n default:\n break;\n }\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFCircle\";\n\n if (!UIManager.getViewManagerConfig) {\n // RN < 0.58\n return UIManager[componentName].Commands[name];\n }\n\n // RN >= 0.58 \n return UIManager.getViewManagerConfig(componentName).Commands[name];\n }\n \n _mapManagerCommand(name) {\n return NativeModules[`RMFCircle`][name];\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _ref(ref) {\n this.circle = ref;\n }\n\n render() {\n return <RMFCircle\n {...this.props}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n}\n\nMFCircle.propTypes = propTypes;\n// MFCircle.defaultProps = defaultProps;\n\nvar RMFCircle = requireNativeComponent(`RMFCircle`, MFCircle);\n\nexport {MFCircle}\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAQA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;EACEI,MAAM,EAAEC,kBAAA,CAAUC,KAAV,CAAgB;IACtB;AACJ;AACA;IACIC,QAAQ,EAAEF,kBAAA,CAAUG,MAAV,CAAiBC,UAJL;IAKtBC,SAAS,EAAEL,kBAAA,CAAUG,MAAV,CAAiBC;EALN,CAAhB,EAMLA,UAZa;;EAchB;AACF;AACA;EACEE,MAAM,EAAEN,kBAAA,CAAUG,MAAV,CAAiBC,UAjBT;;EAmBhB;AACF;AACA;EACEG,WAAW,EAAEP,kBAAA,CAAUG,MAtBP;;EAwBhB;AACF;AACA;EACEK,WAAW,EAAEC,6CA3BG;;EA6BhB;AACF;AACA;EACEC,SAAS,EAAED,6CAhCK;;EAkChB;AACF;AACA;EACEE,MAAM,EAAEX,kBAAA,CAAUG,MArCF;;EAuChB;AACF;AACA;EACES,OAAO,EAAEZ,kBAAA,CAAUa,IA1CH;;EA4ChB;AACF;AACA;EACEC,QAAQ,EAACd,kBAAA,CAAUe,MA/CH;;EAiDhB;AACF;AACA;EACEC,OAAO,EAAEhB,kBAAA,CAAUiB;AApDH,CAAlB,C,CAuDA;AACA;AACA;AACA;;AAEA,MAAMC,QAAN,SAAuBC,cAAA,CAAMC,SAA7B,CAAuC;EACrCC,WAAW,CAACC,KAAD,EAAQ;IACjB,M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center","PropTypes","shape","latitude","number","isRequired","longitude","radius","strokeWidth","strokeColor","ColorPropType","fillColor","zIndex","visible","bool","userData","object","onPress","func","MFCircle","React","Component","constructor","props","_onPress","bind","_ref","setCenter","_runCommand","setRadius","setFillColor","color","processColor","setStrokeColor","setStrokeWidth","width","setUserData","setZIndex","setVisible","_getHandle","findNodeHandle","circle","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","event","stopPropagation","ref","render","RMFCircle","requireNativeComponent"],"sources":["MFCircle.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n NativeModules,\r\n findNodeHandle,\r\n processColor\r\n} from 'react-native';\r\n\r\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The coordinate of the center of the circle\r\n */\r\n center: PropTypes.shape({\r\n /**\r\n * Coordinates for the center of the circle.\r\n */\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }).isRequired,\r\n\r\n /**\r\n * The radius of the circle to be drawn (in meters)\r\n */\r\n radius: PropTypes.number.isRequired,\r\n\r\n /**\r\n * The stroke width to use for the circle.\r\n */\r\n strokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The stroke color to use for the circle.\r\n */\r\n strokeColor: ColorPropType,\r\n\r\n /**\r\n * The fill color to use for the circle.\r\n */\r\n fillColor: ColorPropType,\r\n\r\n /**\r\n * zIndex\r\n */\r\n zIndex: PropTypes.number,\r\n\r\n /**\r\n * visible\r\n */\r\n visible: PropTypes.bool,\r\n\r\n /**\r\n * userData\r\n */\r\n userData:PropTypes.object,\r\n\r\n /**\r\n * Callback that is called when the user presses on the circle\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\n// const defaultProps = {\r\n// strokeColor: '#000',\r\n// strokeWidth: 1,\r\n// };\r\n\r\nclass MFCircle extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this._onPress = this._onPress.bind(this)\r\n this._ref = this._ref.bind(this)\r\n }\r\n\r\n setCenter(center) {\r\n this._runCommand(\"setCenter\", [center])\r\n }\r\n setRadius(radius) {\r\n this._runCommand(\"setRadius\", [radius])\r\n }\r\n setFillColor(color) {\r\n this._runCommand(\"setFillColor\", [processColor(color)])\r\n }\r\n setStrokeColor(color) {\r\n this._runCommand(\"setStrokeColor\", [processColor(color)])\r\n }\r\n setStrokeWidth(width) {\r\n this._runCommand(\"setStrokeWidth\", [width])\r\n }\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.circle);\r\n }\r\n\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android':\r\n 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._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 = \"RMFCircle\";\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[`RMFCircle`][name];\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _ref(ref) {\r\n this.circle = ref;\r\n }\r\n\r\n render() {\r\n return <RMFCircle\r\n {...this.props}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFCircle.propTypes = propTypes;\r\n// MFCircle.defaultProps = defaultProps;\r\n\r\nvar RMFCircle = requireNativeComponent(`RMFCircle`, MFCircle);\r\n\r\nexport {MFCircle}\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAQA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;EACEI,MAAM,EAAEC,kBAAA,CAAUC,KAAV,CAAgB;IACtB;AACJ;AACA;IACIC,QAAQ,EAAEF,kBAAA,CAAUG,MAAV,CAAiBC,UAJL;IAKtBC,SAAS,EAAEL,kBAAA,CAAUG,MAAV,CAAiBC;EALN,CAAhB,EAMLA,UAZa;;EAchB;AACF;AACA;EACEE,MAAM,EAAEN,kBAAA,CAAUG,MAAV,CAAiBC,UAjBT;;EAmBhB;AACF;AACA;EACEG,WAAW,EAAEP,kBAAA,CAAUG,MAtBP;;EAwBhB;AACF;AACA;EACEK,WAAW,EAAEC,6CA3BG;;EA6BhB;AACF;AACA;EACEC,SAAS,EAAED,6CAhCK;;EAkChB;AACF;AACA;EACEE,MAAM,EAAEX,kBAAA,CAAUG,MArCF;;EAuChB;AACF;AACA;EACES,OAAO,EAAEZ,kBAAA,CAAUa,IA1CH;;EA4ChB;AACF;AACA;EACEC,QAAQ,EAACd,kBAAA,CAAUe,MA/CH;;EAiDhB;AACF;AACA;EACEC,OAAO,EAAEhB,kBAAA,CAAUiB;AApDH,CAAlB,C,CAuDA;AACA;AACA;AACA;;AAEA,MAAMC,QAAN,SAAuBC,cAAA,CAAMC,SAA7B,CAAuC;EACrCC,WAAW,CAAC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ends() { _extends = Object.assign || function (target) { for (var i
20
20
  const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
21
21
  const propTypes = { ...viewPropTypes,
22
22
 
23
- /**
24
- * The directions to display on the map,
25
- * retrieved as an array of array of coordinates to describe the routes.
26
- * Similar to directions prop but has higher priority
23
+ /**
24
+ * The directions to display on the map,
25
+ * retrieved as an array of array of coordinates to describe the routes.
26
+ * Similar to directions prop but has higher priority
27
27
  */
28
28
  routes: _propTypes.default.arrayOf(_propTypes.default.arrayOf(_propTypes.default.shape({
29
29
  latitude: _propTypes.default.number.isRequired,
30
30
  longitude: _propTypes.default.number.isRequired
31
31
  }))),
32
32
 
33
- /**
34
- * The directions to display on the map,
35
- * retrieved as a json string from Get route Map4D API (/sdk/route).
36
- * Similar to routes prop but with lower priority
33
+ /**
34
+ * The directions to display on the map,
35
+ * retrieved as a json string from Get route Map4D API (/sdk/route).
36
+ * Similar to routes prop but with lower priority
37
37
  */
38
38
  directions: _propTypes.default.string,
39
39
 
40
- /**
41
- * The index of the main route, default value is 0.
40
+ /**
41
+ * The index of the main route, default value is 0.
42
42
  */
43
43
  activedIndex: _propTypes.default.number,
44
44
 
45
- /**
46
- * The active route stroke width.
45
+ /**
46
+ * The active route stroke width.
47
47
  */
48
48
  activeStrokeWidth: _propTypes.default.number,
49
49
 
50
- /**
51
- * The active route color.
50
+ /**
51
+ * The active route color.
52
52
  */
53
53
  activeStrokeColor: _deprecatedReactNativePropTypes.ColorPropType,
54
54
 
55
- /**
56
- * The active route outline stroke width.
55
+ /**
56
+ * The active route outline stroke width.
57
57
  */
58
58
  activeOutlineWidth: _propTypes.default.number,
59
59
 
60
- /**
61
- * The active route outline color.
60
+ /**
61
+ * The active route outline color.
62
62
  */
63
63
  activeOutlineColor: _deprecatedReactNativePropTypes.ColorPropType,
64
64
 
65
- /**
66
- * The inactive route stroke width.
65
+ /**
66
+ * The inactive route stroke width.
67
67
  */
68
68
  inactiveStrokeWidth: _propTypes.default.number,
69
69
 
70
- /**
71
- * The inactive route color.
70
+ /**
71
+ * The inactive route color.
72
72
  */
73
73
  inactiveStrokeColor: _deprecatedReactNativePropTypes.ColorPropType,
74
74
 
75
- /**
76
- * The inactive route outline stroke width.
75
+ /**
76
+ * The inactive route outline stroke width.
77
77
  */
78
78
  inactiveOutlineWidth: _propTypes.default.number,
79
79
 
80
- /**
81
- * The inactive route outline color.
80
+ /**
81
+ * The inactive route outline color.
82
82
  */
83
83
  inactiveOutlineColor: _deprecatedReactNativePropTypes.ColorPropType,
84
84
 
85
- /**
86
- * The options of the origin POI.
85
+ /**
86
+ * The options of the origin POI.
87
87
  */
88
88
  originPOIOptions: _propTypes.default.shape({
89
89
  coordinate: _propTypes.default.shape({
@@ -98,8 +98,8 @@ const propTypes = { ...viewPropTypes,
98
98
  visible: _propTypes.default.bool
99
99
  }),
100
100
 
101
- /**
102
- * The options of the destination POI.
101
+ /**
102
+ * The options of the destination POI.
103
103
  */
104
104
  destinationPOIOptions: _propTypes.default.shape({
105
105
  coordinate: _propTypes.default.shape({
@@ -114,8 +114,8 @@ const propTypes = { ...viewPropTypes,
114
114
  visible: _propTypes.default.bool
115
115
  }),
116
116
 
117
- /**
118
- * Callback that is called when the user presses on the routes.
117
+ /**
118
+ * Callback that is called when the user presses on the routes.
119
119
  */
120
120
  onPress: _propTypes.default.func
121
121
  };
@@ -1 +1 @@
1
- {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","routes","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","ColorPropType","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","React","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","processColor","Image","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_getHandle","_uiManagerCommand","_mapManagerCommand","findNodeHandle","componentName","getViewManagerConfig","Commands","RMFDirectionsRenderer","requireNativeComponent"],"sources":["MFDirectionsRenderer.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n Image,\n NativeModules,\n findNodeHandle,\n processColor\n} from 'react-native';\n\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The directions to display on the map,\n * retrieved as an array of array of coordinates to describe the routes.\n * Similar to directions prop but has higher priority\n */\n routes: PropTypes.arrayOf(\n PropTypes.arrayOf(\n PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n })\n )\n ),\n\n /**\n * The directions to display on the map,\n * retrieved as a json string from Get route Map4D API (/sdk/route).\n * Similar to routes prop but with lower priority\n */\n directions: PropTypes.string,\n\n /**\n * The index of the main route, default value is 0.\n */\n activedIndex: PropTypes.number,\n\n /**\n * The active route stroke width.\n */\n activeStrokeWidth: PropTypes.number,\n\n /**\n * The active route color.\n */\n activeStrokeColor: ColorPropType,\n\n /**\n * The active route outline stroke width.\n */\n activeOutlineWidth: PropTypes.number,\n\n /**\n * The active route outline color.\n */\n activeOutlineColor: ColorPropType,\n\n /**\n * The inactive route stroke width.\n */\n inactiveStrokeWidth: PropTypes.number,\n\n /**\n * The inactive route color.\n */\n inactiveStrokeColor: ColorPropType,\n\n /**\n * The inactive route outline stroke width.\n */\n inactiveOutlineWidth: PropTypes.number,\n\n /**\n * The inactive route outline color.\n */\n inactiveOutlineColor: ColorPropType,\n\n /**\n * The options of the origin POI.\n */\n originPOIOptions: PropTypes.shape({\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired\n }),\n\n title: PropTypes.string,\n\n titleColor: ColorPropType,\n\n visible: PropTypes.bool,\n }),\n\n /**\n * The options of the destination POI.\n */\n destinationPOIOptions: PropTypes.shape({\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired\n }),\n\n title: PropTypes.string,\n\n titleColor: ColorPropType,\n\n visible: PropTypes.bool,\n }),\n\n /**\n * Callback that is called when the user presses on the routes.\n */\n onPress: PropTypes.func,\n};\n\nclass MFDirectionsRenderer extends React.Component {\n constructor(props) {\n super(props)\n this._ref = this._ref.bind(this)\n this._onPress = this._onPress.bind(this)\n }\n\n setActivedIndex(index) {\n this._runCommand(\"setActivedIndex\", [index])\n }\n\n setRoutes(routes) {\n this._runCommand(\"setRoutes\", [routes])\n }\n\n setDirections(directions) {\n this._runCommand(\"setDirections\", [directions])\n }\n\n render() {\n let originPOIOptions = this.props.originPOIOptions\n if (originPOIOptions) {\n if (originPOIOptions.titleColor) {\n originPOIOptions.titleColor = processColor(originPOIOptions.titleColor)\n }\n if (originPOIOptions.icon) {\n let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {uri: originPOIOptions.icon.uri};\n originPOIOptions.icon = {uri: uri.uri}\n }\n }\n\n let destinationPOIOptions = this.props.destinationPOIOptions\n if (destinationPOIOptions) {\n if (destinationPOIOptions.titleColor) {\n destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor)\n }\n if (destinationPOIOptions.icon) {\n let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {uri: destinationPOIOptions.icon.uri};\n destinationPOIOptions.icon = {uri: uri.uri}\n }\n }\n\n return <RMFDirectionsRenderer\n {...this.props}\n originPOIOptions={originPOIOptions}\n destinationPOIOptions={destinationPOIOptions}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n\n _ref(ref) {\n this.renderer = ref;\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n break;\n\n case 'ios':\n this._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n\n default:\n break;\n }\n }\n\n _getHandle() {\n return findNodeHandle(this.renderer);\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFDirectionsRenderer\";\n\n if (!UIManager.getViewManagerConfig) {\n // RN < 0.58\n return UIManager[componentName].Commands[name];\n }\n\n // RN >= 0.58 \n return UIManager.getViewManagerConfig(componentName).Commands[name];\n }\n\n _mapManagerCommand(name) {\n return NativeModules[`RMFDirectionsRenderer`][name];\n }\n}\n\nMFDirectionsRenderer.propTypes = propTypes;\n\nvar RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);\n\nexport { MFDirectionsRenderer }\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AASA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;AACA;AACA;EACEI,MAAM,EAAEC,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUC,OAAV,CACED,kBAAA,CAAUE,KAAV,CAAgB;IACdC,QAAQ,EAAEH,kBAAA,CAAUI,MAAV,CAAiBC,UADb;IAEdC,SAAS,EAAEN,kBAAA,CAAUI,MAAV,CAAiBC;EAFd,CAAhB,CADF,CADM,CARQ;;EAiBhB;AACF;AACA;AACA;AACA;EACEE,UAAU,EAAEP,kBAAA,CAAUQ,MAtBN;;EAwBhB;AACF;AACA;EACEC,YAAY,EAAET,kBAAA,CAAUI,MA3BR;;EA6BhB;AACF;AACA;EACEM,iBAAiB,EA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AAKC,iBAAL,CAAuBR,IAAvB,CAFF,EAGEC,IAHF;;QAKA;;MAEF,KAAK,KAAL;QACE,KAAKQ,kBAAL,CAAwBT,IAAxB,EAA8B,KAAKO,UAAL,EAA9B,EAAiD,GAAGN,IAApD;;QACA;;MAEF;QACE;IAdJ;EAgBD;;EAEDM,UAAU,GAAG;IACX,OAAO,IAAAG,2BAAA,EAAe,KAAKb,QAApB,CAAP;EACD;;EAEDW,iBAAiB,CAACR,IAAD,EAAO;IACtB,MAAMK,SAAS,GAAGD,0BAAA,CAAcC,SAAhC;IACA,MAAMM,aAAa,GAAG,uBAAtB;;IAEA,IAAI,CAACN,SAAS,CAACO,oBAAf,EAAqC;MACnC;MACA,OAAOP,SAAS,CAACM,aAAD,CAAT,CAAyBE,QAAzB,CAAkCb,IAAlC,CAAP;IACD,CAPqB,CAStB;;;IACA,OAAOK,SAAS,CAACO,oBAAV,CAA+BD,aAA/B,EAA8CE,QAA9C,CAAuDb,IAAvD,CAAP;EACD;;EAEDS,kBAAkB,CAACT,IAAD,EAAO;IACvB,OAAOI,0BAAA,CAAe,uBAAf,EAAuCJ,IAAvC,CAAP;EACD;;AApGgD;;;AAuGnDrB,oBAAoB,CAACjC,SAArB,GAAiCA,SAAjC;AAEA,IAAIoE,qBAAqB,GAAG,IAAAC,mCAAA,EAAwB,uBAAxB,EAAgDpC,oBAAhD,CAA5B"}
1
+ {"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","routes","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","ColorPropType","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","React","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","processColor","Image","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_getHandle","_uiManagerCommand","_mapManagerCommand","findNodeHandle","componentName","getViewManagerConfig","Commands","RMFDirectionsRenderer","requireNativeComponent"],"sources":["MFDirectionsRenderer.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n Image,\r\n NativeModules,\r\n findNodeHandle,\r\n processColor\r\n} from 'react-native';\r\n\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The directions to display on the map,\r\n * retrieved as an array of array of coordinates to describe the routes.\r\n * Similar to directions prop but has higher priority\r\n */\r\n routes: PropTypes.arrayOf(\r\n PropTypes.arrayOf(\r\n PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n })\r\n )\r\n ),\r\n\r\n /**\r\n * The directions to display on the map,\r\n * retrieved as a json string from Get route Map4D API (/sdk/route).\r\n * Similar to routes prop but with lower priority\r\n */\r\n directions: PropTypes.string,\r\n\r\n /**\r\n * The index of the main route, default value is 0.\r\n */\r\n activedIndex: PropTypes.number,\r\n\r\n /**\r\n * The active route stroke width.\r\n */\r\n activeStrokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The active route color.\r\n */\r\n activeStrokeColor: ColorPropType,\r\n\r\n /**\r\n * The active route outline stroke width.\r\n */\r\n activeOutlineWidth: PropTypes.number,\r\n\r\n /**\r\n * The active route outline color.\r\n */\r\n activeOutlineColor: ColorPropType,\r\n\r\n /**\r\n * The inactive route stroke width.\r\n */\r\n inactiveStrokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The inactive route color.\r\n */\r\n inactiveStrokeColor: ColorPropType,\r\n\r\n /**\r\n * The inactive route outline stroke width.\r\n */\r\n inactiveOutlineWidth: PropTypes.number,\r\n\r\n /**\r\n * The inactive route outline color.\r\n */\r\n inactiveOutlineColor: ColorPropType,\r\n\r\n /**\r\n * The options of the origin POI.\r\n */\r\n originPOIOptions: PropTypes.shape({\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired\r\n }),\r\n\r\n title: PropTypes.string,\r\n\r\n titleColor: ColorPropType,\r\n\r\n visible: PropTypes.bool,\r\n }),\r\n\r\n /**\r\n * The options of the destination POI.\r\n */\r\n destinationPOIOptions: PropTypes.shape({\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired\r\n }),\r\n\r\n title: PropTypes.string,\r\n\r\n titleColor: ColorPropType,\r\n\r\n visible: PropTypes.bool,\r\n }),\r\n\r\n /**\r\n * Callback that is called when the user presses on the routes.\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\nclass MFDirectionsRenderer extends React.Component {\r\n constructor(props) {\r\n super(props)\r\n this._ref = this._ref.bind(this)\r\n this._onPress = this._onPress.bind(this)\r\n }\r\n\r\n setActivedIndex(index) {\r\n this._runCommand(\"setActivedIndex\", [index])\r\n }\r\n\r\n setRoutes(routes) {\r\n this._runCommand(\"setRoutes\", [routes])\r\n }\r\n\r\n setDirections(directions) {\r\n this._runCommand(\"setDirections\", [directions])\r\n }\r\n\r\n render() {\r\n let originPOIOptions = this.props.originPOIOptions\r\n if (originPOIOptions) {\r\n if (originPOIOptions.titleColor) {\r\n originPOIOptions.titleColor = processColor(originPOIOptions.titleColor)\r\n }\r\n if (originPOIOptions.icon) {\r\n let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {uri: originPOIOptions.icon.uri};\r\n originPOIOptions.icon = {uri: uri.uri}\r\n }\r\n }\r\n\r\n let destinationPOIOptions = this.props.destinationPOIOptions\r\n if (destinationPOIOptions) {\r\n if (destinationPOIOptions.titleColor) {\r\n destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor)\r\n }\r\n if (destinationPOIOptions.icon) {\r\n let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {uri: destinationPOIOptions.icon.uri};\r\n destinationPOIOptions.icon = {uri: uri.uri}\r\n }\r\n }\r\n\r\n return <RMFDirectionsRenderer\r\n {...this.props}\r\n originPOIOptions={originPOIOptions}\r\n destinationPOIOptions={destinationPOIOptions}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n\r\n _ref(ref) {\r\n this.renderer = ref;\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android':\r\n 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._mapManagerCommand(name)(this._getHandle(), ...args);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.renderer);\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const UIManager = NativeModules.UIManager;\r\n const componentName = \"RMFDirectionsRenderer\";\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[`RMFDirectionsRenderer`][name];\r\n }\r\n}\r\n\r\nMFDirectionsRenderer.propTypes = propTypes;\r\n\r\nvar RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);\r\n\r\nexport { MFDirectionsRenderer }\r\n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OAAOI,0BAAA,CAAe,uBAAf,EAAuCJ,IAAvC,CAAP;EACD;;AApGgD;;;AAuGnDrB,oBAAoB,CAACjC,SAArB,GAAiCA,SAAjC;AAEA,IAAIoE,qBAAqB,GAAG,IAAAC,mCAAA,EAAwB,uBAAxB,EAAgDpC,oBAAhD,CAA5B"}
@@ -11,6 +11,12 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _deprecatedReactNativePropTypes = require("deprecated-react-native-prop-types");
13
13
 
14
+ var _AreaFocusManager = require("./extends/AreaFocusManager");
15
+
16
+ var _AreaFocuser = require("./extends/AreaFocuser");
17
+
18
+ var _MFPolygon = require("./MFPolygon");
19
+
14
20
  var _reactNative = require("react-native");
15
21
 
16
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -31,122 +37,122 @@ const CameraShape = _propTypes.default.shape({
31
37
  const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
32
38
  const propTypes = { ...viewPropTypes,
33
39
 
34
- /**
35
- * An opaque identifier for a custom map configuration.
40
+ /**
41
+ * An opaque identifier for a custom map configuration.
36
42
  */
37
43
  mapID: _propTypes.default.string,
38
44
 
39
- /**
40
- * Map style by string for a custom map configuration.
45
+ /**
46
+ * Map style by string for a custom map configuration.
41
47
  */
42
48
  mapStyle: _propTypes.default.string,
43
49
 
44
- /**
45
- * If `false` hide the button to move map to the current user's location.
46
- * Default value is `false`.
50
+ /**
51
+ * If `false` hide the button to move map to the current user's location.
52
+ * Default value is `false`.
47
53
  */
48
54
  showsMyLocationButton: _propTypes.default.bool,
49
55
 
50
- /**
51
- * If `true` the app will ask for the user's location.
52
- * Default value is `false`.
56
+ /**
57
+ * If `true` the app will ask for the user's location.
58
+ * Default value is `false`.
53
59
  */
54
60
  showsMyLocation: _propTypes.default.bool,
55
61
 
56
- /**
57
- * A Boolean indicating whether the map displays buildings.
58
- * Default value is `true`.
62
+ /**
63
+ * A Boolean indicating whether the map displays buildings.
64
+ * Default value is `true`.
59
65
  */
60
66
  showsBuildings: _propTypes.default.bool,
61
67
 
62
- /**
63
- * A Boolean indicating whether the map displays POIs.
64
- * Default value is `true`.
68
+ /**
69
+ * A Boolean indicating whether the map displays POIs.
70
+ * Default value is `true`.
65
71
  */
66
72
  showsPOIs: _propTypes.default.bool,
67
73
 
68
- /**
69
- * If `false` the user won't be able to zoom the map.
70
- * Default value is `true`.
74
+ /**
75
+ * If `false` the user won't be able to zoom the map.
76
+ * Default value is `true`.
71
77
  */
72
78
  zoomGesturesEnabled: _propTypes.default.bool,
73
79
 
74
- /**
75
- * If `false` the user won't be able to scroll the map.
76
- * Default value is `true`.
80
+ /**
81
+ * If `false` the user won't be able to scroll the map.
82
+ * Default value is `true`.
77
83
  */
78
84
  scrollGesturesEnabled: _propTypes.default.bool,
79
85
 
80
- /**
81
- * If `false` the user won't be able to pinch/rotate the map.
82
- * Default value is `true`.
86
+ /**
87
+ * If `false` the user won't be able to pinch/rotate the map.
88
+ * Default value is `true`.
83
89
  */
84
90
  rotateGesturesEnabled: _propTypes.default.bool,
85
91
 
86
- /**
87
- * If `false` the user won't be able to tilt the map.
88
- * Default value is `true`.
92
+ /**
93
+ * If `false` the user won't be able to tilt the map.
94
+ * Default value is `true`.
89
95
  */
90
96
  tiltGesturesEnabled: _propTypes.default.bool,
91
97
 
92
- /**
93
- * The camera view position.
98
+ /**
99
+ * The camera view position.
94
100
  */
95
101
  camera: CameraShape,
96
102
 
97
- /**
98
- * Type of map tiles to be rendered.
103
+ /**
104
+ * Type of map tiles to be rendered.
99
105
  */
100
106
  mapType: _propTypes.default.oneOf(['roadmap', 'satellite', 'hybrid']),
101
107
 
102
- /**
103
- * Callback that is called once the map is fully loaded.
104
- * @platform android
108
+ /**
109
+ * Callback that is called once the map is fully loaded.
110
+ * @platform android
105
111
  */
106
112
  onMapReady: _propTypes.default.func,
107
113
 
108
- /**
109
- * Callback that is called when user taps on the map.
114
+ /**
115
+ * Callback that is called when user taps on the map.
110
116
  */
111
117
  onPress: _propTypes.default.func,
112
118
 
113
- /**
114
- * Callback that is called when user taps on the POIs
119
+ /**
120
+ * Callback that is called when user taps on the POIs
115
121
  */
116
122
  onPoiPress: _propTypes.default.func,
117
123
 
118
- /**
119
- * Callback that is called when user taps on the Buildings
124
+ /**
125
+ * Callback that is called when user taps on the Buildings
120
126
  */
121
127
  onBuildingPress: _propTypes.default.func,
122
128
 
123
- /**
124
- * Callback that is called when user taps on the Places
129
+ /**
130
+ * Callback that is called when user taps on the Places
125
131
  */
126
132
  onPlacePress: _propTypes.default.func,
127
133
 
128
- /**
129
- * Callback that is called when user taps on the Data Source Features
134
+ /**
135
+ * Callback that is called when user taps on the Data Source Features
130
136
  */
131
137
  onDataSourceFeaturePress: _propTypes.default.func,
132
138
 
133
- /**
134
- * Callback that is called when moving camera
139
+ /**
140
+ * Callback that is called when moving camera
135
141
  */
136
142
  onCameraMove: _propTypes.default.func,
137
143
 
138
- /**
139
- * Callback that is called when camera start moving
144
+ /**
145
+ * Callback that is called when camera start moving
140
146
  */
141
147
  onCameraMoveStart: _propTypes.default.func,
142
148
 
143
- /**
144
- * Callback that is called when camera idle
149
+ /**
150
+ * Callback that is called when camera idle
145
151
  */
146
152
  onCameraIdle: _propTypes.default.func,
147
153
 
148
- /**
149
- * Callback that is called when user taps on location Button
154
+ /**
155
+ * Callback that is called when user taps on location Button
150
156
  */
151
157
  onMyLocationButtonPress: _propTypes.default.func
152
158
  };
@@ -154,13 +160,58 @@ const propTypes = { ...viewPropTypes,
154
160
  class MFMapView extends _react.default.Component {
155
161
  constructor(props) {
156
162
  super(props);
163
+ this.areaFocusManager = new _AreaFocusManager.AreaFocusManager(this);
164
+ this.areaFocuser = new _AreaFocuser.AreaFocuser(this.areaFocusManager);
157
165
  this.state = {
158
- isReady: _reactNative.Platform.OS === 'ios'
166
+ isReady: _reactNative.Platform.OS === 'ios',
167
+ managedPolygons: {}
159
168
  };
160
169
  this._onMapReady = this._onMapReady.bind(this);
161
170
  this._ref = this._ref.bind(this);
162
171
  }
163
172
 
173
+ _addPolygon(polygon) {
174
+ if (polygon == null || typeof polygon !== 'object') {
175
+ return null;
176
+ }
177
+
178
+ const id = typeof polygon.id === 'string' && polygon.id.trim().length > 0 ? polygon.id : 'polygon-highlight-id-default';
179
+ const _polygon = { ...polygon,
180
+ id
181
+ };
182
+ this.setState(prevState => ({
183
+ managedPolygons: { ...prevState.managedPolygons,
184
+ [id]: _polygon
185
+ }
186
+ }));
187
+ return id;
188
+ }
189
+
190
+ _removePolygon(id) {
191
+ if (typeof id !== 'string' || id.trim().length === 0) {
192
+ return;
193
+ }
194
+
195
+ this.setState(prevState => {
196
+ if (!prevState.managedPolygons[id]) {
197
+ return null;
198
+ }
199
+
200
+ const managedPolygons = { ...prevState.managedPolygons
201
+ };
202
+ delete managedPolygons[id];
203
+ return {
204
+ managedPolygons
205
+ };
206
+ });
207
+ }
208
+
209
+ _clearManagedPolygons() {
210
+ this.setState({
211
+ managedPolygons: {}
212
+ });
213
+ }
214
+
164
215
  _onMapReady() {
165
216
  const {
166
217
  onMapReady
@@ -271,14 +322,14 @@ class MFMapView extends _react.default.Component {
271
322
 
272
323
  return Promise.reject('cameraForBounds not supported on this platform');
273
324
  }
274
- /**
275
- * Convert a map coordinate to screen point
276
- *
277
- * @param coordinate Coordinate
278
- * @param [coordinate.latitude] Latitude
279
- * @param [coordinate.longitude] Longitude
280
- *
281
- * @return Promise Promise with the point ({ x: Number, y: Number })
325
+ /**
326
+ * Convert a map coordinate to screen point
327
+ *
328
+ * @param coordinate Coordinate
329
+ * @param [coordinate.latitude] Latitude
330
+ * @param [coordinate.longitude] Longitude
331
+ *
332
+ * @return Promise Promise with the point ({ x: Number, y: Number })
282
333
  */
283
334
 
284
335
 
@@ -291,14 +342,14 @@ class MFMapView extends _react.default.Component {
291
342
 
292
343
  return Promise.reject('pointForCoordinate not supported on this platform');
293
344
  }
294
- /**
295
- * Convert a screen point to a map coordinate
296
- *
297
- * @param point Point
298
- * @param [point.x] X
299
- * @param [point.x] Y
300
- *
301
- * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
345
+ /**
346
+ * Convert a screen point to a map coordinate
347
+ *
348
+ * @param point Point
349
+ * @param [point.x] X
350
+ * @param [point.x] Y
351
+ *
352
+ * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
302
353
  */
303
354
 
304
355
 
@@ -312,6 +363,22 @@ class MFMapView extends _react.default.Component {
312
363
  return Promise.reject('coordinateForPoint not supported on this platform');
313
364
  }
314
365
 
366
+ focusArea(focusOptions) {
367
+ if (!this.areaFocusManager) {
368
+ return Promise.resolve(null);
369
+ }
370
+
371
+ return this.areaFocusManager.focus(focusOptions);
372
+ }
373
+
374
+ clearFocusedArea() {
375
+ if (!this.areaFocusManager) {
376
+ return;
377
+ }
378
+
379
+ this.areaFocusManager.clear();
380
+ }
381
+
315
382
  _getHandle() {
316
383
  return (0, _reactNative.findNodeHandle)(this.map);
317
384
  }
@@ -348,12 +415,26 @@ class MFMapView extends _react.default.Component {
348
415
 
349
416
  render() {
350
417
  let props;
418
+ const {
419
+ children,
420
+ ...restProps
421
+ } = this.props;
422
+ const managedPolygons = Object.values(this.state.managedPolygons);
351
423
 
352
424
  if (this.state.isReady) {
353
425
  props = {
354
426
  style: this.props.style,
355
427
  onMapReady: this._onMapReady,
356
- ...this.props
428
+ ...restProps,
429
+ children: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, managedPolygons.map(polygon => /*#__PURE__*/_react.default.createElement(_MFPolygon.MFPolygon, {
430
+ key: polygon.id,
431
+ coordinates: polygon.coordinates,
432
+ holes: polygon.holes,
433
+ fillColor: polygon.fillColor,
434
+ strokeColor: polygon.strokeColor,
435
+ strokeWidth: polygon.strokeWidth,
436
+ zIndex: polygon.zIndex
437
+ })))
357
438
  };
358
439
  } else {
359
440
  props = {