react-native-maps 1.21.0-alpha.99 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +9 -4
  2. package/android/build.gradle +65 -72
  3. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  4. package/android/src/main/RCTAppDependencyProvider.h +25 -0
  5. package/android/src/main/RCTAppDependencyProvider.mm +55 -0
  6. package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
  7. package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
  8. package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
  9. package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
  10. package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
  11. package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
  12. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
  13. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
  14. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
  15. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
  16. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
  17. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
  18. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +209 -0
  19. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
  20. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
  21. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
  22. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +45 -0
  23. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +22 -0
  24. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
  25. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
  26. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerDelegate.java +62 -0
  27. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +27 -0
  28. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerDelegate.java +56 -0
  29. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +25 -0
  30. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +5 -1
  31. package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +1 -1
  32. package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +9 -3
  33. package/android/src/main/java/com/rnmaps/fabric/UrlTileManager.java +124 -0
  34. package/android/src/main/java/com/rnmaps/fabric/WMSTileManager.java +114 -0
  35. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +19 -3
  36. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +608 -603
  37. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
  38. package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +2 -22
  39. package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +23 -1
  40. package/android/src/main/java/com/rnmaps/maps/MapUrlTile.java +18 -18
  41. package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +10 -14
  42. package/android/src/main/java/com/rnmaps/maps/MapView.java +58 -49
  43. package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +3 -3
  44. package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +10 -10
  45. package/android/src/main/jni/CMakeLists.txt +36 -0
  46. package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
  47. package/android/src/main/jni/RNMapsSpecs.h +31 -0
  48. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +31 -0
  49. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +33 -0
  50. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +979 -0
  51. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +860 -0
  52. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +227 -0
  53. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1297 -0
  54. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
  55. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
  56. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +26 -0
  57. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +131 -0
  58. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
  59. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +137 -0
  60. package/ios/AirGoogleMaps/AIRGoogleMap.h +13 -13
  61. package/ios/AirGoogleMaps/{AIRGoogleMap.m → AIRGoogleMap.mm} +32 -34
  62. package/ios/AirGoogleMaps/AIRGoogleMapManager.h +1 -0
  63. package/ios/AirGoogleMaps/AIRGoogleMapManager.mm +543 -0
  64. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +3 -3
  65. package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
  66. package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
  67. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
  68. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +5 -2
  69. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +41 -33
  70. package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
  71. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +23 -14
  72. package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +1 -0
  73. package/ios/AirMaps/AIRMap.h +8 -9
  74. package/ios/AirMaps/{AIRMap.m → AIRMap.mm} +18 -14
  75. package/ios/AirMaps/AIRMapManager.m +8 -19
  76. package/ios/AirMaps/AIRMapMarker.m +57 -44
  77. package/ios/AirMaps/AIRMapOverlay.m +2 -2
  78. package/ios/AirMaps/AIRMapWMSTile.m +8 -8
  79. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +25 -0
  80. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +77 -0
  81. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
  82. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +51 -0
  83. package/ios/AirMaps/RNMapsAirModule.h +2 -3
  84. package/ios/AirMaps/RNMapsAirModule.mm +14 -0
  85. package/ios/AirMaps/RNMapsDefines.h +1 -0
  86. package/ios/AirMaps/RNMapsMapView.h +5 -2
  87. package/ios/AirMaps/RNMapsMapView.mm +16 -6
  88. package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
  89. package/ios/AirMaps/RNMapsMarkerView.mm +12 -4
  90. package/ios/AirMaps/RNMapsMarkerViewManager.mm +7 -0
  91. package/ios/AirMaps/module.modulemap +6 -0
  92. package/ios/AirMaps.xcodeproj/project.pbxproj +15 -55
  93. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  94. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  95. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  96. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  97. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  98. package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  99. package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +1 -1
  100. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  101. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
  102. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
  103. package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
  104. package/ios/generated/RNMapsSpecs/Props.cpp +194 -0
  105. package/ios/generated/RNMapsSpecs/Props.h +1224 -0
  106. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
  107. package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
  108. package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
  109. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
  110. package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
  111. package/ios/generated/RNMapsSpecs/States.cpp +16 -0
  112. package/ios/generated/RNMapsSpecs/States.h +113 -0
  113. package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
  114. package/ios/generated/RNMapsSpecsJSI.h +268 -0
  115. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  116. package/ios/generated/module.modulemap +15 -0
  117. package/package.json +30 -26
  118. package/react-native-google-maps.podspec +27 -0
  119. package/react-native-maps-generated.podspec +31 -0
  120. package/react-native-maps.podspec +52 -46
  121. package/react-native.config.js +16 -0
  122. package/src/AnimatedRegion.ts +169 -0
  123. package/src/Geojson.tsx +541 -0
  124. package/src/MapCallout.tsx +77 -0
  125. package/src/MapCalloutSubview.tsx +64 -0
  126. package/src/MapCircle.tsx +162 -0
  127. package/src/MapHeatmap.tsx +125 -0
  128. package/src/MapLocalTile.tsx +60 -0
  129. package/src/MapMarker.tsx +531 -0
  130. package/src/MapMarkerNativeComponent.ts +51 -0
  131. package/src/MapOverlay.tsx +178 -0
  132. package/src/MapPolygon.tsx +188 -0
  133. package/src/MapPolygon.types.ts +25 -0
  134. package/src/MapPolyline.tsx +215 -0
  135. package/src/MapUrlTile.tsx +169 -0
  136. package/src/MapView.tsx +1230 -0
  137. package/src/MapView.types.ts +212 -0
  138. package/src/MapView.web.ts +2 -0
  139. package/src/MapViewNativeComponent.ts +86 -0
  140. package/src/MapWMSTile.tsx +148 -0
  141. package/src/ProviderConstants.ts +2 -0
  142. package/src/createFabricMap.tsx +253 -0
  143. package/src/decorateMapComponent.ts +227 -0
  144. package/src/fixImageProp.ts +17 -0
  145. package/src/index.ts +52 -0
  146. package/src/sharedTypes.ts +101 -0
  147. package/{specs → src/specs}/NativeComponentCircle.ts +3 -4
  148. package/{specs → src/specs}/NativeComponentGoogleMapView.ts +15 -9
  149. package/{specs → src/specs}/NativeComponentMapView.ts +61 -32
  150. package/{specs → src/specs}/NativeComponentOverlay.ts +11 -2
  151. package/{specs → src/specs}/NativeComponentPolyline.ts +1 -1
  152. package/src/specs/NativeComponentUrlTile.ts +128 -0
  153. package/src/specs/NativeComponentWMSTile.ts +107 -0
  154. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -533
  155. package/lib/AnimatedRegion.d.ts +0 -19
  156. package/lib/AnimatedRegion.js +0 -134
  157. package/lib/Geojson.d.ts +0 -204
  158. package/lib/Geojson.js +0 -166
  159. package/lib/MapCallout.d.ts +0 -40
  160. package/lib/MapCallout.js +0 -51
  161. package/lib/MapCalloutSubview.d.ts +0 -34
  162. package/lib/MapCalloutSubview.js +0 -48
  163. package/lib/MapCircle.d.ts +0 -117
  164. package/lib/MapCircle.js +0 -53
  165. package/lib/MapHeatmap.d.ts +0 -78
  166. package/lib/MapHeatmap.js +0 -59
  167. package/lib/MapLocalTile.d.ts +0 -35
  168. package/lib/MapLocalTile.js +0 -44
  169. package/lib/MapMarker.d.ts +0 -322
  170. package/lib/MapMarker.js +0 -158
  171. package/lib/MapMarkerNativeComponent.d.ts +0 -15
  172. package/lib/MapMarkerNativeComponent.js +0 -15
  173. package/lib/MapOverlay.d.ts +0 -88
  174. package/lib/MapOverlay.js +0 -65
  175. package/lib/MapPolygon.d.ts +0 -140
  176. package/lib/MapPolygon.js +0 -53
  177. package/lib/MapPolygon.types.d.ts +0 -18
  178. package/lib/MapPolygon.types.js +0 -2
  179. package/lib/MapPolyline.d.ts +0 -156
  180. package/lib/MapPolyline.js +0 -53
  181. package/lib/MapUrlTile.d.ts +0 -134
  182. package/lib/MapUrlTile.js +0 -44
  183. package/lib/MapView.d.ts +0 -703
  184. package/lib/MapView.js +0 -427
  185. package/lib/MapView.types.d.ts +0 -161
  186. package/lib/MapView.types.js +0 -2
  187. package/lib/MapView.web.d.ts +0 -1
  188. package/lib/MapView.web.js +0 -9
  189. package/lib/MapViewNativeComponent.d.ts +0 -18
  190. package/lib/MapViewNativeComponent.js +0 -19
  191. package/lib/MapWMSTile.d.ts +0 -116
  192. package/lib/MapWMSTile.js +0 -44
  193. package/lib/ProviderConstants.d.ts +0 -2
  194. package/lib/ProviderConstants.js +0 -5
  195. package/lib/createFabricMap.d.ts +0 -24
  196. package/lib/createFabricMap.js +0 -188
  197. package/lib/decorateMapComponent.d.ts +0 -36
  198. package/lib/decorateMapComponent.js +0 -120
  199. package/lib/fixImageProp.d.ts +0 -4
  200. package/lib/fixImageProp.js +0 -16
  201. package/lib/index.d.ts +0 -38
  202. package/lib/index.js +0 -81
  203. package/lib/sharedTypes.d.ts +0 -81
  204. package/lib/sharedTypes.js +0 -2
  205. package/lib/sharedTypesInternal.js +0 -2
  206. package/lib/specs/NativeAirMapsModule.d.ts +0 -31
  207. package/lib/specs/NativeAirMapsModule.js +0 -4
  208. package/lib/specs/NativeComponentCallout.d.ts +0 -46
  209. package/lib/specs/NativeComponentCallout.js +0 -9
  210. package/lib/specs/NativeComponentCircle.d.ts +0 -74
  211. package/lib/specs/NativeComponentCircle.js +0 -7
  212. package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
  213. package/lib/specs/NativeComponentGoogleMapView.js +0 -22
  214. package/lib/specs/NativeComponentGooglePolygon.d.ts +0 -75
  215. package/lib/specs/NativeComponentGooglePolygon.js +0 -7
  216. package/lib/specs/NativeComponentMapView.d.ts +0 -847
  217. package/lib/specs/NativeComponentMapView.js +0 -20
  218. package/lib/specs/NativeComponentMarker.d.ts +0 -258
  219. package/lib/specs/NativeComponentMarker.js +0 -19
  220. package/lib/specs/NativeComponentOverlay.d.ts +0 -67
  221. package/lib/specs/NativeComponentOverlay.js +0 -7
  222. package/lib/specs/NativeComponentPolyline.d.ts +0 -101
  223. package/lib/specs/NativeComponentPolyline.js +0 -7
  224. /package/ios/AirMaps/{UIView +AirMap.m → UIView+AirMap.m} +0 -0
  225. /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
  226. /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
  227. /package/{specs → src/specs}/NativeAirMapsModule.ts +0 -0
  228. /package/{specs → src/specs}/NativeComponentCallout.ts +0 -0
  229. /package/{specs → src/specs}/NativeComponentGooglePolygon.ts +0 -0
  230. /package/{specs → src/specs}/NativeComponentMarker.ts +0 -0
@@ -0,0 +1,1224 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GeneratePropsH.js
9
+ */
10
+ #pragma once
11
+
12
+ #include <react/renderer/components/view/ViewProps.h>
13
+ #include <react/renderer/core/PropsParserContext.h>
14
+ #include <react/renderer/core/propsConversions.h>
15
+ #include <react/renderer/graphics/Color.h>
16
+ #include <react/renderer/imagemanager/primitives.h>
17
+ #include <vector>
18
+
19
+ namespace facebook::react {
20
+
21
+ class RNMapsCalloutProps final : public ViewProps {
22
+ public:
23
+ RNMapsCalloutProps() = default;
24
+ RNMapsCalloutProps(const PropsParserContext& context, const RNMapsCalloutProps &sourceProps, const RawProps &rawProps);
25
+
26
+ #pragma mark - Props
27
+
28
+ bool alphaHitTest{false};
29
+ bool tooltip{false};
30
+ };
31
+
32
+ struct RNMapsCircleCenterStruct {
33
+ double latitude{0.0};
34
+ double longitude{0.0};
35
+ };
36
+
37
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsCircleCenterStruct &result) {
38
+ auto map = (std::unordered_map<std::string, RawValue>)value;
39
+
40
+ auto tmp_latitude = map.find("latitude");
41
+ if (tmp_latitude != map.end()) {
42
+ fromRawValue(context, tmp_latitude->second, result.latitude);
43
+ }
44
+ auto tmp_longitude = map.find("longitude");
45
+ if (tmp_longitude != map.end()) {
46
+ fromRawValue(context, tmp_longitude->second, result.longitude);
47
+ }
48
+ }
49
+
50
+ static inline std::string toString(const RNMapsCircleCenterStruct &value) {
51
+ return "[Object RNMapsCircleCenterStruct]";
52
+ }
53
+ class RNMapsCircleProps final : public ViewProps {
54
+ public:
55
+ RNMapsCircleProps() = default;
56
+ RNMapsCircleProps(const PropsParserContext& context, const RNMapsCircleProps &sourceProps, const RawProps &rawProps);
57
+
58
+ #pragma mark - Props
59
+
60
+ RNMapsCircleCenterStruct center{};
61
+ SharedColor fillColor{};
62
+ double radius{0.0};
63
+ SharedColor strokeColor{};
64
+ Float strokeWidth{0.0};
65
+ bool tappable{false};
66
+ };
67
+
68
+ enum class RNMapsGoogleMapViewMapType { Hybrid, MutedStandard, None, Satellite, Standard, Terrain, SatelliteFlyover, HybridFlyover };
69
+
70
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewMapType &result) {
71
+ auto string = (std::string)value;
72
+ if (string == "hybrid") { result = RNMapsGoogleMapViewMapType::Hybrid; return; }
73
+ if (string == "mutedStandard") { result = RNMapsGoogleMapViewMapType::MutedStandard; return; }
74
+ if (string == "none") { result = RNMapsGoogleMapViewMapType::None; return; }
75
+ if (string == "satellite") { result = RNMapsGoogleMapViewMapType::Satellite; return; }
76
+ if (string == "standard") { result = RNMapsGoogleMapViewMapType::Standard; return; }
77
+ if (string == "terrain") { result = RNMapsGoogleMapViewMapType::Terrain; return; }
78
+ if (string == "satelliteFlyover") { result = RNMapsGoogleMapViewMapType::SatelliteFlyover; return; }
79
+ if (string == "hybridFlyover") { result = RNMapsGoogleMapViewMapType::HybridFlyover; return; }
80
+ abort();
81
+ }
82
+
83
+ static inline std::string toString(const RNMapsGoogleMapViewMapType &value) {
84
+ switch (value) {
85
+ case RNMapsGoogleMapViewMapType::Hybrid: return "hybrid";
86
+ case RNMapsGoogleMapViewMapType::MutedStandard: return "mutedStandard";
87
+ case RNMapsGoogleMapViewMapType::None: return "none";
88
+ case RNMapsGoogleMapViewMapType::Satellite: return "satellite";
89
+ case RNMapsGoogleMapViewMapType::Standard: return "standard";
90
+ case RNMapsGoogleMapViewMapType::Terrain: return "terrain";
91
+ case RNMapsGoogleMapViewMapType::SatelliteFlyover: return "satelliteFlyover";
92
+ case RNMapsGoogleMapViewMapType::HybridFlyover: return "hybridFlyover";
93
+ }
94
+ }
95
+ enum class RNMapsGoogleMapViewPaddingAdjustmentBehavior { Always, Automatic, Never };
96
+
97
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewPaddingAdjustmentBehavior &result) {
98
+ auto string = (std::string)value;
99
+ if (string == "always") { result = RNMapsGoogleMapViewPaddingAdjustmentBehavior::Always; return; }
100
+ if (string == "automatic") { result = RNMapsGoogleMapViewPaddingAdjustmentBehavior::Automatic; return; }
101
+ if (string == "never") { result = RNMapsGoogleMapViewPaddingAdjustmentBehavior::Never; return; }
102
+ abort();
103
+ }
104
+
105
+ static inline std::string toString(const RNMapsGoogleMapViewPaddingAdjustmentBehavior &value) {
106
+ switch (value) {
107
+ case RNMapsGoogleMapViewPaddingAdjustmentBehavior::Always: return "always";
108
+ case RNMapsGoogleMapViewPaddingAdjustmentBehavior::Automatic: return "automatic";
109
+ case RNMapsGoogleMapViewPaddingAdjustmentBehavior::Never: return "never";
110
+ }
111
+ }
112
+ enum class RNMapsGoogleMapViewUserInterfaceStyle { System, Light, Dark };
113
+
114
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewUserInterfaceStyle &result) {
115
+ auto string = (std::string)value;
116
+ if (string == "system") { result = RNMapsGoogleMapViewUserInterfaceStyle::System; return; }
117
+ if (string == "light") { result = RNMapsGoogleMapViewUserInterfaceStyle::Light; return; }
118
+ if (string == "dark") { result = RNMapsGoogleMapViewUserInterfaceStyle::Dark; return; }
119
+ abort();
120
+ }
121
+
122
+ static inline std::string toString(const RNMapsGoogleMapViewUserInterfaceStyle &value) {
123
+ switch (value) {
124
+ case RNMapsGoogleMapViewUserInterfaceStyle::System: return "system";
125
+ case RNMapsGoogleMapViewUserInterfaceStyle::Light: return "light";
126
+ case RNMapsGoogleMapViewUserInterfaceStyle::Dark: return "dark";
127
+ }
128
+ }
129
+ enum class RNMapsGoogleMapViewUserLocationPriority { Balanced, High, Low, Passive };
130
+
131
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewUserLocationPriority &result) {
132
+ auto string = (std::string)value;
133
+ if (string == "balanced") { result = RNMapsGoogleMapViewUserLocationPriority::Balanced; return; }
134
+ if (string == "high") { result = RNMapsGoogleMapViewUserLocationPriority::High; return; }
135
+ if (string == "low") { result = RNMapsGoogleMapViewUserLocationPriority::Low; return; }
136
+ if (string == "passive") { result = RNMapsGoogleMapViewUserLocationPriority::Passive; return; }
137
+ abort();
138
+ }
139
+
140
+ static inline std::string toString(const RNMapsGoogleMapViewUserLocationPriority &value) {
141
+ switch (value) {
142
+ case RNMapsGoogleMapViewUserLocationPriority::Balanced: return "balanced";
143
+ case RNMapsGoogleMapViewUserLocationPriority::High: return "high";
144
+ case RNMapsGoogleMapViewUserLocationPriority::Low: return "low";
145
+ case RNMapsGoogleMapViewUserLocationPriority::Passive: return "passive";
146
+ }
147
+ }
148
+ struct RNMapsGoogleMapViewCameraCenterStruct {
149
+ double latitude{0.0};
150
+ double longitude{0.0};
151
+ };
152
+
153
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewCameraCenterStruct &result) {
154
+ auto map = (std::unordered_map<std::string, RawValue>)value;
155
+
156
+ auto tmp_latitude = map.find("latitude");
157
+ if (tmp_latitude != map.end()) {
158
+ fromRawValue(context, tmp_latitude->second, result.latitude);
159
+ }
160
+ auto tmp_longitude = map.find("longitude");
161
+ if (tmp_longitude != map.end()) {
162
+ fromRawValue(context, tmp_longitude->second, result.longitude);
163
+ }
164
+ }
165
+
166
+ static inline std::string toString(const RNMapsGoogleMapViewCameraCenterStruct &value) {
167
+ return "[Object RNMapsGoogleMapViewCameraCenterStruct]";
168
+ }
169
+
170
+ struct RNMapsGoogleMapViewCameraStruct {
171
+ double altitude{0.0};
172
+ RNMapsGoogleMapViewCameraCenterStruct center{};
173
+ double heading{0.0};
174
+ double pitch{0.0};
175
+ Float zoom{0.0};
176
+ };
177
+
178
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewCameraStruct &result) {
179
+ auto map = (std::unordered_map<std::string, RawValue>)value;
180
+
181
+ auto tmp_altitude = map.find("altitude");
182
+ if (tmp_altitude != map.end()) {
183
+ fromRawValue(context, tmp_altitude->second, result.altitude);
184
+ }
185
+ auto tmp_center = map.find("center");
186
+ if (tmp_center != map.end()) {
187
+ fromRawValue(context, tmp_center->second, result.center);
188
+ }
189
+ auto tmp_heading = map.find("heading");
190
+ if (tmp_heading != map.end()) {
191
+ fromRawValue(context, tmp_heading->second, result.heading);
192
+ }
193
+ auto tmp_pitch = map.find("pitch");
194
+ if (tmp_pitch != map.end()) {
195
+ fromRawValue(context, tmp_pitch->second, result.pitch);
196
+ }
197
+ auto tmp_zoom = map.find("zoom");
198
+ if (tmp_zoom != map.end()) {
199
+ fromRawValue(context, tmp_zoom->second, result.zoom);
200
+ }
201
+ }
202
+
203
+ static inline std::string toString(const RNMapsGoogleMapViewCameraStruct &value) {
204
+ return "[Object RNMapsGoogleMapViewCameraStruct]";
205
+ }
206
+
207
+ struct RNMapsGoogleMapViewInitialCameraCenterStruct {
208
+ double latitude{0.0};
209
+ double longitude{0.0};
210
+ };
211
+
212
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewInitialCameraCenterStruct &result) {
213
+ auto map = (std::unordered_map<std::string, RawValue>)value;
214
+
215
+ auto tmp_latitude = map.find("latitude");
216
+ if (tmp_latitude != map.end()) {
217
+ fromRawValue(context, tmp_latitude->second, result.latitude);
218
+ }
219
+ auto tmp_longitude = map.find("longitude");
220
+ if (tmp_longitude != map.end()) {
221
+ fromRawValue(context, tmp_longitude->second, result.longitude);
222
+ }
223
+ }
224
+
225
+ static inline std::string toString(const RNMapsGoogleMapViewInitialCameraCenterStruct &value) {
226
+ return "[Object RNMapsGoogleMapViewInitialCameraCenterStruct]";
227
+ }
228
+
229
+ struct RNMapsGoogleMapViewInitialCameraStruct {
230
+ double altitude{0.0};
231
+ RNMapsGoogleMapViewInitialCameraCenterStruct center{};
232
+ double heading{0.0};
233
+ double pitch{0.0};
234
+ Float zoom{0.0};
235
+ };
236
+
237
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewInitialCameraStruct &result) {
238
+ auto map = (std::unordered_map<std::string, RawValue>)value;
239
+
240
+ auto tmp_altitude = map.find("altitude");
241
+ if (tmp_altitude != map.end()) {
242
+ fromRawValue(context, tmp_altitude->second, result.altitude);
243
+ }
244
+ auto tmp_center = map.find("center");
245
+ if (tmp_center != map.end()) {
246
+ fromRawValue(context, tmp_center->second, result.center);
247
+ }
248
+ auto tmp_heading = map.find("heading");
249
+ if (tmp_heading != map.end()) {
250
+ fromRawValue(context, tmp_heading->second, result.heading);
251
+ }
252
+ auto tmp_pitch = map.find("pitch");
253
+ if (tmp_pitch != map.end()) {
254
+ fromRawValue(context, tmp_pitch->second, result.pitch);
255
+ }
256
+ auto tmp_zoom = map.find("zoom");
257
+ if (tmp_zoom != map.end()) {
258
+ fromRawValue(context, tmp_zoom->second, result.zoom);
259
+ }
260
+ }
261
+
262
+ static inline std::string toString(const RNMapsGoogleMapViewInitialCameraStruct &value) {
263
+ return "[Object RNMapsGoogleMapViewInitialCameraStruct]";
264
+ }
265
+
266
+ struct RNMapsGoogleMapViewInitialRegionStruct {
267
+ double latitude{0.0};
268
+ double longitude{0.0};
269
+ double latitudeDelta{0.0};
270
+ double longitudeDelta{0.0};
271
+ };
272
+
273
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewInitialRegionStruct &result) {
274
+ auto map = (std::unordered_map<std::string, RawValue>)value;
275
+
276
+ auto tmp_latitude = map.find("latitude");
277
+ if (tmp_latitude != map.end()) {
278
+ fromRawValue(context, tmp_latitude->second, result.latitude);
279
+ }
280
+ auto tmp_longitude = map.find("longitude");
281
+ if (tmp_longitude != map.end()) {
282
+ fromRawValue(context, tmp_longitude->second, result.longitude);
283
+ }
284
+ auto tmp_latitudeDelta = map.find("latitudeDelta");
285
+ if (tmp_latitudeDelta != map.end()) {
286
+ fromRawValue(context, tmp_latitudeDelta->second, result.latitudeDelta);
287
+ }
288
+ auto tmp_longitudeDelta = map.find("longitudeDelta");
289
+ if (tmp_longitudeDelta != map.end()) {
290
+ fromRawValue(context, tmp_longitudeDelta->second, result.longitudeDelta);
291
+ }
292
+ }
293
+
294
+ static inline std::string toString(const RNMapsGoogleMapViewInitialRegionStruct &value) {
295
+ return "[Object RNMapsGoogleMapViewInitialRegionStruct]";
296
+ }
297
+
298
+ struct RNMapsGoogleMapViewMapPaddingStruct {
299
+ double top{0.0};
300
+ double right{0.0};
301
+ double bottom{0.0};
302
+ double left{0.0};
303
+ };
304
+
305
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewMapPaddingStruct &result) {
306
+ auto map = (std::unordered_map<std::string, RawValue>)value;
307
+
308
+ auto tmp_top = map.find("top");
309
+ if (tmp_top != map.end()) {
310
+ fromRawValue(context, tmp_top->second, result.top);
311
+ }
312
+ auto tmp_right = map.find("right");
313
+ if (tmp_right != map.end()) {
314
+ fromRawValue(context, tmp_right->second, result.right);
315
+ }
316
+ auto tmp_bottom = map.find("bottom");
317
+ if (tmp_bottom != map.end()) {
318
+ fromRawValue(context, tmp_bottom->second, result.bottom);
319
+ }
320
+ auto tmp_left = map.find("left");
321
+ if (tmp_left != map.end()) {
322
+ fromRawValue(context, tmp_left->second, result.left);
323
+ }
324
+ }
325
+
326
+ static inline std::string toString(const RNMapsGoogleMapViewMapPaddingStruct &value) {
327
+ return "[Object RNMapsGoogleMapViewMapPaddingStruct]";
328
+ }
329
+
330
+ struct RNMapsGoogleMapViewRegionStruct {
331
+ double latitude{0.0};
332
+ double longitude{0.0};
333
+ double latitudeDelta{0.0};
334
+ double longitudeDelta{0.0};
335
+ };
336
+
337
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMapViewRegionStruct &result) {
338
+ auto map = (std::unordered_map<std::string, RawValue>)value;
339
+
340
+ auto tmp_latitude = map.find("latitude");
341
+ if (tmp_latitude != map.end()) {
342
+ fromRawValue(context, tmp_latitude->second, result.latitude);
343
+ }
344
+ auto tmp_longitude = map.find("longitude");
345
+ if (tmp_longitude != map.end()) {
346
+ fromRawValue(context, tmp_longitude->second, result.longitude);
347
+ }
348
+ auto tmp_latitudeDelta = map.find("latitudeDelta");
349
+ if (tmp_latitudeDelta != map.end()) {
350
+ fromRawValue(context, tmp_latitudeDelta->second, result.latitudeDelta);
351
+ }
352
+ auto tmp_longitudeDelta = map.find("longitudeDelta");
353
+ if (tmp_longitudeDelta != map.end()) {
354
+ fromRawValue(context, tmp_longitudeDelta->second, result.longitudeDelta);
355
+ }
356
+ }
357
+
358
+ static inline std::string toString(const RNMapsGoogleMapViewRegionStruct &value) {
359
+ return "[Object RNMapsGoogleMapViewRegionStruct]";
360
+ }
361
+ class RNMapsGoogleMapViewProps final : public ViewProps {
362
+ public:
363
+ RNMapsGoogleMapViewProps() = default;
364
+ RNMapsGoogleMapViewProps(const PropsParserContext& context, const RNMapsGoogleMapViewProps &sourceProps, const RawProps &rawProps);
365
+
366
+ #pragma mark - Props
367
+
368
+ RNMapsGoogleMapViewCameraStruct camera{};
369
+ RNMapsGoogleMapViewInitialCameraStruct initialCamera{};
370
+ RNMapsGoogleMapViewInitialRegionStruct initialRegion{};
371
+ std::string kmlSrc{};
372
+ std::string googleMapId{};
373
+ SharedColor loadingBackgroundColor{};
374
+ RNMapsGoogleMapViewMapPaddingStruct mapPadding{};
375
+ RNMapsGoogleMapViewMapType mapType{RNMapsGoogleMapViewMapType::Standard};
376
+ Float maxZoom{0.0};
377
+ Float minZoom{0.0};
378
+ RNMapsGoogleMapViewPaddingAdjustmentBehavior paddingAdjustmentBehavior{RNMapsGoogleMapViewPaddingAdjustmentBehavior::Never};
379
+ bool pitchEnabled{true};
380
+ RNMapsGoogleMapViewRegionStruct region{};
381
+ bool rotateEnabled{true};
382
+ bool scrollDuringRotateOrZoomEnabled{true};
383
+ bool scrollEnabled{true};
384
+ bool showsBuildings{true};
385
+ bool showsCompass{true};
386
+ bool showsIndoorLevelPicker{false};
387
+ bool showsIndoors{true};
388
+ bool showsMyLocationButton{true};
389
+ bool showsPointsOfInterest{false};
390
+ bool showsScale{false};
391
+ bool showsTraffic{false};
392
+ bool showsUserLocation{false};
393
+ RNMapsGoogleMapViewUserInterfaceStyle userInterfaceStyle{RNMapsGoogleMapViewUserInterfaceStyle::System};
394
+ std::string customMapStyleString{};
395
+ bool userLocationCalloutEnabled{false};
396
+ int userLocationFastestInterval{0};
397
+ RNMapsGoogleMapViewUserLocationPriority userLocationPriority{RNMapsGoogleMapViewUserLocationPriority::High};
398
+ int userLocationUpdateInterval{0};
399
+ bool zoomControlEnabled{false};
400
+ bool zoomEnabled{true};
401
+ bool zoomTapEnabled{true};
402
+ };
403
+
404
+ struct RNMapsGooglePolygonCoordinatesStruct {
405
+ double latitude{0.0};
406
+ double longitude{0.0};
407
+ };
408
+
409
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGooglePolygonCoordinatesStruct &result) {
410
+ auto map = (std::unordered_map<std::string, RawValue>)value;
411
+
412
+ auto tmp_latitude = map.find("latitude");
413
+ if (tmp_latitude != map.end()) {
414
+ fromRawValue(context, tmp_latitude->second, result.latitude);
415
+ }
416
+ auto tmp_longitude = map.find("longitude");
417
+ if (tmp_longitude != map.end()) {
418
+ fromRawValue(context, tmp_longitude->second, result.longitude);
419
+ }
420
+ }
421
+
422
+ static inline std::string toString(const RNMapsGooglePolygonCoordinatesStruct &value) {
423
+ return "[Object RNMapsGooglePolygonCoordinatesStruct]";
424
+ }
425
+
426
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<RNMapsGooglePolygonCoordinatesStruct> &result) {
427
+ auto items = (std::vector<RawValue>)value;
428
+ for (const auto &item : items) {
429
+ RNMapsGooglePolygonCoordinatesStruct newItem;
430
+ fromRawValue(context, item, newItem);
431
+ result.emplace_back(newItem);
432
+ }
433
+ }
434
+
435
+
436
+ struct RNMapsGooglePolygonHolesStruct {
437
+ double latitude{0.0};
438
+ double longitude{0.0};
439
+ };
440
+
441
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGooglePolygonHolesStruct &result) {
442
+ auto map = (std::unordered_map<std::string, RawValue>)value;
443
+
444
+ auto tmp_latitude = map.find("latitude");
445
+ if (tmp_latitude != map.end()) {
446
+ fromRawValue(context, tmp_latitude->second, result.latitude);
447
+ }
448
+ auto tmp_longitude = map.find("longitude");
449
+ if (tmp_longitude != map.end()) {
450
+ fromRawValue(context, tmp_longitude->second, result.longitude);
451
+ }
452
+ }
453
+
454
+ static inline std::string toString(const RNMapsGooglePolygonHolesStruct &value) {
455
+ return "[Object RNMapsGooglePolygonHolesStruct]";
456
+ }
457
+
458
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<std::vector<RNMapsGooglePolygonHolesStruct>> &result) {
459
+ auto items = (std::vector<std::vector<RawValue>>)value;
460
+ for (const std::vector<RawValue> &item : items) {
461
+ auto nestedArray = std::vector<RNMapsGooglePolygonHolesStruct>{};
462
+ for (const RawValue &nestedItem : item) {
463
+ RNMapsGooglePolygonHolesStruct newItem;
464
+ fromRawValue(context, nestedItem, newItem);
465
+ nestedArray.emplace_back(newItem);
466
+ }
467
+ result.emplace_back(nestedArray);
468
+ }
469
+ }
470
+
471
+ class RNMapsGooglePolygonProps final : public ViewProps {
472
+ public:
473
+ RNMapsGooglePolygonProps() = default;
474
+ RNMapsGooglePolygonProps(const PropsParserContext& context, const RNMapsGooglePolygonProps &sourceProps, const RawProps &rawProps);
475
+
476
+ #pragma mark - Props
477
+
478
+ std::vector<RNMapsGooglePolygonCoordinatesStruct> coordinates{};
479
+ SharedColor fillColor{};
480
+ SharedColor strokeColor{};
481
+ bool geodesic{false};
482
+ std::vector<std::vector<RNMapsGooglePolygonHolesStruct>> holes{};
483
+ bool tappable{false};
484
+ };
485
+
486
+ enum class RNMapsMapViewGoogleRenderer { LATEST, LEGACY };
487
+
488
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewGoogleRenderer &result) {
489
+ auto string = (std::string)value;
490
+ if (string == "LATEST") { result = RNMapsMapViewGoogleRenderer::LATEST; return; }
491
+ if (string == "LEGACY") { result = RNMapsMapViewGoogleRenderer::LEGACY; return; }
492
+ abort();
493
+ }
494
+
495
+ static inline std::string toString(const RNMapsMapViewGoogleRenderer &value) {
496
+ switch (value) {
497
+ case RNMapsMapViewGoogleRenderer::LATEST: return "LATEST";
498
+ case RNMapsMapViewGoogleRenderer::LEGACY: return "LEGACY";
499
+ }
500
+ }
501
+ enum class RNMapsMapViewMapType { Hybrid, MutedStandard, None, Satellite, Standard, Terrain, SatelliteFlyover, HybridFlyover };
502
+
503
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewMapType &result) {
504
+ auto string = (std::string)value;
505
+ if (string == "hybrid") { result = RNMapsMapViewMapType::Hybrid; return; }
506
+ if (string == "mutedStandard") { result = RNMapsMapViewMapType::MutedStandard; return; }
507
+ if (string == "none") { result = RNMapsMapViewMapType::None; return; }
508
+ if (string == "satellite") { result = RNMapsMapViewMapType::Satellite; return; }
509
+ if (string == "standard") { result = RNMapsMapViewMapType::Standard; return; }
510
+ if (string == "terrain") { result = RNMapsMapViewMapType::Terrain; return; }
511
+ if (string == "satelliteFlyover") { result = RNMapsMapViewMapType::SatelliteFlyover; return; }
512
+ if (string == "hybridFlyover") { result = RNMapsMapViewMapType::HybridFlyover; return; }
513
+ abort();
514
+ }
515
+
516
+ static inline std::string toString(const RNMapsMapViewMapType &value) {
517
+ switch (value) {
518
+ case RNMapsMapViewMapType::Hybrid: return "hybrid";
519
+ case RNMapsMapViewMapType::MutedStandard: return "mutedStandard";
520
+ case RNMapsMapViewMapType::None: return "none";
521
+ case RNMapsMapViewMapType::Satellite: return "satellite";
522
+ case RNMapsMapViewMapType::Standard: return "standard";
523
+ case RNMapsMapViewMapType::Terrain: return "terrain";
524
+ case RNMapsMapViewMapType::SatelliteFlyover: return "satelliteFlyover";
525
+ case RNMapsMapViewMapType::HybridFlyover: return "hybridFlyover";
526
+ }
527
+ }
528
+ enum class RNMapsMapViewPaddingAdjustmentBehavior { Always, Automatic, Never };
529
+
530
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewPaddingAdjustmentBehavior &result) {
531
+ auto string = (std::string)value;
532
+ if (string == "always") { result = RNMapsMapViewPaddingAdjustmentBehavior::Always; return; }
533
+ if (string == "automatic") { result = RNMapsMapViewPaddingAdjustmentBehavior::Automatic; return; }
534
+ if (string == "never") { result = RNMapsMapViewPaddingAdjustmentBehavior::Never; return; }
535
+ abort();
536
+ }
537
+
538
+ static inline std::string toString(const RNMapsMapViewPaddingAdjustmentBehavior &value) {
539
+ switch (value) {
540
+ case RNMapsMapViewPaddingAdjustmentBehavior::Always: return "always";
541
+ case RNMapsMapViewPaddingAdjustmentBehavior::Automatic: return "automatic";
542
+ case RNMapsMapViewPaddingAdjustmentBehavior::Never: return "never";
543
+ }
544
+ }
545
+ enum class RNMapsMapViewUserInterfaceStyle { System, Light, Dark };
546
+
547
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewUserInterfaceStyle &result) {
548
+ auto string = (std::string)value;
549
+ if (string == "system") { result = RNMapsMapViewUserInterfaceStyle::System; return; }
550
+ if (string == "light") { result = RNMapsMapViewUserInterfaceStyle::Light; return; }
551
+ if (string == "dark") { result = RNMapsMapViewUserInterfaceStyle::Dark; return; }
552
+ abort();
553
+ }
554
+
555
+ static inline std::string toString(const RNMapsMapViewUserInterfaceStyle &value) {
556
+ switch (value) {
557
+ case RNMapsMapViewUserInterfaceStyle::System: return "system";
558
+ case RNMapsMapViewUserInterfaceStyle::Light: return "light";
559
+ case RNMapsMapViewUserInterfaceStyle::Dark: return "dark";
560
+ }
561
+ }
562
+ enum class RNMapsMapViewUserLocationPriority { Balanced, High, Low, Passive };
563
+
564
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewUserLocationPriority &result) {
565
+ auto string = (std::string)value;
566
+ if (string == "balanced") { result = RNMapsMapViewUserLocationPriority::Balanced; return; }
567
+ if (string == "high") { result = RNMapsMapViewUserLocationPriority::High; return; }
568
+ if (string == "low") { result = RNMapsMapViewUserLocationPriority::Low; return; }
569
+ if (string == "passive") { result = RNMapsMapViewUserLocationPriority::Passive; return; }
570
+ abort();
571
+ }
572
+
573
+ static inline std::string toString(const RNMapsMapViewUserLocationPriority &value) {
574
+ switch (value) {
575
+ case RNMapsMapViewUserLocationPriority::Balanced: return "balanced";
576
+ case RNMapsMapViewUserLocationPriority::High: return "high";
577
+ case RNMapsMapViewUserLocationPriority::Low: return "low";
578
+ case RNMapsMapViewUserLocationPriority::Passive: return "passive";
579
+ }
580
+ }
581
+ struct RNMapsMapViewCameraCenterStruct {
582
+ double latitude{0.0};
583
+ double longitude{0.0};
584
+ };
585
+
586
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewCameraCenterStruct &result) {
587
+ auto map = (std::unordered_map<std::string, RawValue>)value;
588
+
589
+ auto tmp_latitude = map.find("latitude");
590
+ if (tmp_latitude != map.end()) {
591
+ fromRawValue(context, tmp_latitude->second, result.latitude);
592
+ }
593
+ auto tmp_longitude = map.find("longitude");
594
+ if (tmp_longitude != map.end()) {
595
+ fromRawValue(context, tmp_longitude->second, result.longitude);
596
+ }
597
+ }
598
+
599
+ static inline std::string toString(const RNMapsMapViewCameraCenterStruct &value) {
600
+ return "[Object RNMapsMapViewCameraCenterStruct]";
601
+ }
602
+
603
+ struct RNMapsMapViewCameraStruct {
604
+ double altitude{0.0};
605
+ RNMapsMapViewCameraCenterStruct center{};
606
+ double heading{0.0};
607
+ double pitch{0.0};
608
+ Float zoom{0.0};
609
+ };
610
+
611
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewCameraStruct &result) {
612
+ auto map = (std::unordered_map<std::string, RawValue>)value;
613
+
614
+ auto tmp_altitude = map.find("altitude");
615
+ if (tmp_altitude != map.end()) {
616
+ fromRawValue(context, tmp_altitude->second, result.altitude);
617
+ }
618
+ auto tmp_center = map.find("center");
619
+ if (tmp_center != map.end()) {
620
+ fromRawValue(context, tmp_center->second, result.center);
621
+ }
622
+ auto tmp_heading = map.find("heading");
623
+ if (tmp_heading != map.end()) {
624
+ fromRawValue(context, tmp_heading->second, result.heading);
625
+ }
626
+ auto tmp_pitch = map.find("pitch");
627
+ if (tmp_pitch != map.end()) {
628
+ fromRawValue(context, tmp_pitch->second, result.pitch);
629
+ }
630
+ auto tmp_zoom = map.find("zoom");
631
+ if (tmp_zoom != map.end()) {
632
+ fromRawValue(context, tmp_zoom->second, result.zoom);
633
+ }
634
+ }
635
+
636
+ static inline std::string toString(const RNMapsMapViewCameraStruct &value) {
637
+ return "[Object RNMapsMapViewCameraStruct]";
638
+ }
639
+
640
+ struct RNMapsMapViewCompassOffsetStruct {
641
+ double x{0.0};
642
+ double y{0.0};
643
+ };
644
+
645
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewCompassOffsetStruct &result) {
646
+ auto map = (std::unordered_map<std::string, RawValue>)value;
647
+
648
+ auto tmp_x = map.find("x");
649
+ if (tmp_x != map.end()) {
650
+ fromRawValue(context, tmp_x->second, result.x);
651
+ }
652
+ auto tmp_y = map.find("y");
653
+ if (tmp_y != map.end()) {
654
+ fromRawValue(context, tmp_y->second, result.y);
655
+ }
656
+ }
657
+
658
+ static inline std::string toString(const RNMapsMapViewCompassOffsetStruct &value) {
659
+ return "[Object RNMapsMapViewCompassOffsetStruct]";
660
+ }
661
+
662
+ struct RNMapsMapViewInitialCameraCenterStruct {
663
+ double latitude{0.0};
664
+ double longitude{0.0};
665
+ };
666
+
667
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewInitialCameraCenterStruct &result) {
668
+ auto map = (std::unordered_map<std::string, RawValue>)value;
669
+
670
+ auto tmp_latitude = map.find("latitude");
671
+ if (tmp_latitude != map.end()) {
672
+ fromRawValue(context, tmp_latitude->second, result.latitude);
673
+ }
674
+ auto tmp_longitude = map.find("longitude");
675
+ if (tmp_longitude != map.end()) {
676
+ fromRawValue(context, tmp_longitude->second, result.longitude);
677
+ }
678
+ }
679
+
680
+ static inline std::string toString(const RNMapsMapViewInitialCameraCenterStruct &value) {
681
+ return "[Object RNMapsMapViewInitialCameraCenterStruct]";
682
+ }
683
+
684
+ struct RNMapsMapViewInitialCameraStruct {
685
+ double altitude{0.0};
686
+ RNMapsMapViewInitialCameraCenterStruct center{};
687
+ double heading{0.0};
688
+ double pitch{0.0};
689
+ Float zoom{0.0};
690
+ };
691
+
692
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewInitialCameraStruct &result) {
693
+ auto map = (std::unordered_map<std::string, RawValue>)value;
694
+
695
+ auto tmp_altitude = map.find("altitude");
696
+ if (tmp_altitude != map.end()) {
697
+ fromRawValue(context, tmp_altitude->second, result.altitude);
698
+ }
699
+ auto tmp_center = map.find("center");
700
+ if (tmp_center != map.end()) {
701
+ fromRawValue(context, tmp_center->second, result.center);
702
+ }
703
+ auto tmp_heading = map.find("heading");
704
+ if (tmp_heading != map.end()) {
705
+ fromRawValue(context, tmp_heading->second, result.heading);
706
+ }
707
+ auto tmp_pitch = map.find("pitch");
708
+ if (tmp_pitch != map.end()) {
709
+ fromRawValue(context, tmp_pitch->second, result.pitch);
710
+ }
711
+ auto tmp_zoom = map.find("zoom");
712
+ if (tmp_zoom != map.end()) {
713
+ fromRawValue(context, tmp_zoom->second, result.zoom);
714
+ }
715
+ }
716
+
717
+ static inline std::string toString(const RNMapsMapViewInitialCameraStruct &value) {
718
+ return "[Object RNMapsMapViewInitialCameraStruct]";
719
+ }
720
+
721
+ struct RNMapsMapViewInitialRegionStruct {
722
+ double latitude{0.0};
723
+ double longitude{0.0};
724
+ double latitudeDelta{0.0};
725
+ double longitudeDelta{0.0};
726
+ };
727
+
728
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewInitialRegionStruct &result) {
729
+ auto map = (std::unordered_map<std::string, RawValue>)value;
730
+
731
+ auto tmp_latitude = map.find("latitude");
732
+ if (tmp_latitude != map.end()) {
733
+ fromRawValue(context, tmp_latitude->second, result.latitude);
734
+ }
735
+ auto tmp_longitude = map.find("longitude");
736
+ if (tmp_longitude != map.end()) {
737
+ fromRawValue(context, tmp_longitude->second, result.longitude);
738
+ }
739
+ auto tmp_latitudeDelta = map.find("latitudeDelta");
740
+ if (tmp_latitudeDelta != map.end()) {
741
+ fromRawValue(context, tmp_latitudeDelta->second, result.latitudeDelta);
742
+ }
743
+ auto tmp_longitudeDelta = map.find("longitudeDelta");
744
+ if (tmp_longitudeDelta != map.end()) {
745
+ fromRawValue(context, tmp_longitudeDelta->second, result.longitudeDelta);
746
+ }
747
+ }
748
+
749
+ static inline std::string toString(const RNMapsMapViewInitialRegionStruct &value) {
750
+ return "[Object RNMapsMapViewInitialRegionStruct]";
751
+ }
752
+
753
+ struct RNMapsMapViewLegalLabelInsetsStruct {
754
+ double top{0.0};
755
+ double right{0.0};
756
+ double bottom{0.0};
757
+ double left{0.0};
758
+ };
759
+
760
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewLegalLabelInsetsStruct &result) {
761
+ auto map = (std::unordered_map<std::string, RawValue>)value;
762
+
763
+ auto tmp_top = map.find("top");
764
+ if (tmp_top != map.end()) {
765
+ fromRawValue(context, tmp_top->second, result.top);
766
+ }
767
+ auto tmp_right = map.find("right");
768
+ if (tmp_right != map.end()) {
769
+ fromRawValue(context, tmp_right->second, result.right);
770
+ }
771
+ auto tmp_bottom = map.find("bottom");
772
+ if (tmp_bottom != map.end()) {
773
+ fromRawValue(context, tmp_bottom->second, result.bottom);
774
+ }
775
+ auto tmp_left = map.find("left");
776
+ if (tmp_left != map.end()) {
777
+ fromRawValue(context, tmp_left->second, result.left);
778
+ }
779
+ }
780
+
781
+ static inline std::string toString(const RNMapsMapViewLegalLabelInsetsStruct &value) {
782
+ return "[Object RNMapsMapViewLegalLabelInsetsStruct]";
783
+ }
784
+
785
+ struct RNMapsMapViewMapPaddingStruct {
786
+ double top{0.0};
787
+ double right{0.0};
788
+ double bottom{0.0};
789
+ double left{0.0};
790
+ };
791
+
792
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewMapPaddingStruct &result) {
793
+ auto map = (std::unordered_map<std::string, RawValue>)value;
794
+
795
+ auto tmp_top = map.find("top");
796
+ if (tmp_top != map.end()) {
797
+ fromRawValue(context, tmp_top->second, result.top);
798
+ }
799
+ auto tmp_right = map.find("right");
800
+ if (tmp_right != map.end()) {
801
+ fromRawValue(context, tmp_right->second, result.right);
802
+ }
803
+ auto tmp_bottom = map.find("bottom");
804
+ if (tmp_bottom != map.end()) {
805
+ fromRawValue(context, tmp_bottom->second, result.bottom);
806
+ }
807
+ auto tmp_left = map.find("left");
808
+ if (tmp_left != map.end()) {
809
+ fromRawValue(context, tmp_left->second, result.left);
810
+ }
811
+ }
812
+
813
+ static inline std::string toString(const RNMapsMapViewMapPaddingStruct &value) {
814
+ return "[Object RNMapsMapViewMapPaddingStruct]";
815
+ }
816
+
817
+ struct RNMapsMapViewRegionStruct {
818
+ double latitude{0.0};
819
+ double longitude{0.0};
820
+ double latitudeDelta{0.0};
821
+ double longitudeDelta{0.0};
822
+ };
823
+
824
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewRegionStruct &result) {
825
+ auto map = (std::unordered_map<std::string, RawValue>)value;
826
+
827
+ auto tmp_latitude = map.find("latitude");
828
+ if (tmp_latitude != map.end()) {
829
+ fromRawValue(context, tmp_latitude->second, result.latitude);
830
+ }
831
+ auto tmp_longitude = map.find("longitude");
832
+ if (tmp_longitude != map.end()) {
833
+ fromRawValue(context, tmp_longitude->second, result.longitude);
834
+ }
835
+ auto tmp_latitudeDelta = map.find("latitudeDelta");
836
+ if (tmp_latitudeDelta != map.end()) {
837
+ fromRawValue(context, tmp_latitudeDelta->second, result.latitudeDelta);
838
+ }
839
+ auto tmp_longitudeDelta = map.find("longitudeDelta");
840
+ if (tmp_longitudeDelta != map.end()) {
841
+ fromRawValue(context, tmp_longitudeDelta->second, result.longitudeDelta);
842
+ }
843
+ }
844
+
845
+ static inline std::string toString(const RNMapsMapViewRegionStruct &value) {
846
+ return "[Object RNMapsMapViewRegionStruct]";
847
+ }
848
+
849
+ struct RNMapsMapViewCameraZoomRangeStruct {
850
+ double minCenterCoordinateDistance{0.0};
851
+ double maxCenterCoordinateDistance{0.0};
852
+ bool animated{false};
853
+ };
854
+
855
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewCameraZoomRangeStruct &result) {
856
+ auto map = (std::unordered_map<std::string, RawValue>)value;
857
+
858
+ auto tmp_minCenterCoordinateDistance = map.find("minCenterCoordinateDistance");
859
+ if (tmp_minCenterCoordinateDistance != map.end()) {
860
+ fromRawValue(context, tmp_minCenterCoordinateDistance->second, result.minCenterCoordinateDistance);
861
+ }
862
+ auto tmp_maxCenterCoordinateDistance = map.find("maxCenterCoordinateDistance");
863
+ if (tmp_maxCenterCoordinateDistance != map.end()) {
864
+ fromRawValue(context, tmp_maxCenterCoordinateDistance->second, result.maxCenterCoordinateDistance);
865
+ }
866
+ auto tmp_animated = map.find("animated");
867
+ if (tmp_animated != map.end()) {
868
+ fromRawValue(context, tmp_animated->second, result.animated);
869
+ }
870
+ }
871
+
872
+ static inline std::string toString(const RNMapsMapViewCameraZoomRangeStruct &value) {
873
+ return "[Object RNMapsMapViewCameraZoomRangeStruct]";
874
+ }
875
+ class RNMapsMapViewProps final : public ViewProps {
876
+ public:
877
+ RNMapsMapViewProps() = default;
878
+ RNMapsMapViewProps(const PropsParserContext& context, const RNMapsMapViewProps &sourceProps, const RawProps &rawProps);
879
+
880
+ #pragma mark - Props
881
+
882
+ bool cacheEnabled{false};
883
+ RNMapsMapViewCameraStruct camera{};
884
+ RNMapsMapViewCompassOffsetStruct compassOffset{};
885
+ bool followsUserLocation{false};
886
+ bool poiClickEnabled{false};
887
+ RNMapsMapViewInitialCameraStruct initialCamera{};
888
+ RNMapsMapViewInitialRegionStruct initialRegion{};
889
+ std::string kmlSrc{};
890
+ RNMapsMapViewLegalLabelInsetsStruct legalLabelInsets{};
891
+ bool liteMode{false};
892
+ std::string googleMapId{};
893
+ RNMapsMapViewGoogleRenderer googleRenderer{RNMapsMapViewGoogleRenderer::LATEST};
894
+ SharedColor loadingBackgroundColor{};
895
+ bool loadingEnabled{false};
896
+ SharedColor loadingIndicatorColor{};
897
+ RNMapsMapViewMapPaddingStruct mapPadding{};
898
+ RNMapsMapViewMapType mapType{RNMapsMapViewMapType::Standard};
899
+ double maxDelta{0.0};
900
+ Float maxZoom{0.0};
901
+ double minDelta{0.0};
902
+ Float minZoom{0.0};
903
+ bool moveOnMarkerPress{true};
904
+ bool handlePanDrag{false};
905
+ RNMapsMapViewPaddingAdjustmentBehavior paddingAdjustmentBehavior{RNMapsMapViewPaddingAdjustmentBehavior::Never};
906
+ bool pitchEnabled{true};
907
+ RNMapsMapViewRegionStruct region{};
908
+ bool rotateEnabled{true};
909
+ bool scrollDuringRotateOrZoomEnabled{true};
910
+ bool scrollEnabled{true};
911
+ bool showsBuildings{true};
912
+ bool showsCompass{true};
913
+ bool showsIndoorLevelPicker{false};
914
+ bool showsIndoors{true};
915
+ bool showsMyLocationButton{true};
916
+ bool showsScale{false};
917
+ bool showsUserLocation{false};
918
+ SharedColor tintColor{};
919
+ bool toolbarEnabled{true};
920
+ RNMapsMapViewUserInterfaceStyle userInterfaceStyle{RNMapsMapViewUserInterfaceStyle::System};
921
+ std::string userLocationAnnotationTitle{};
922
+ bool userLocationCalloutEnabled{false};
923
+ int userLocationFastestInterval{5000};
924
+ RNMapsMapViewUserLocationPriority userLocationPriority{RNMapsMapViewUserLocationPriority::High};
925
+ int userLocationUpdateInterval{5000};
926
+ bool zoomControlEnabled{true};
927
+ bool zoomEnabled{true};
928
+ bool showsTraffic{false};
929
+ bool zoomTapEnabled{true};
930
+ RNMapsMapViewCameraZoomRangeStruct cameraZoomRange{};
931
+ };
932
+
933
+ enum class RNMapsMarkerDisplayPriority { Required, High, Low };
934
+
935
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerDisplayPriority &result) {
936
+ auto string = (std::string)value;
937
+ if (string == "required") { result = RNMapsMarkerDisplayPriority::Required; return; }
938
+ if (string == "high") { result = RNMapsMarkerDisplayPriority::High; return; }
939
+ if (string == "low") { result = RNMapsMarkerDisplayPriority::Low; return; }
940
+ abort();
941
+ }
942
+
943
+ static inline std::string toString(const RNMapsMarkerDisplayPriority &value) {
944
+ switch (value) {
945
+ case RNMapsMarkerDisplayPriority::Required: return "required";
946
+ case RNMapsMarkerDisplayPriority::High: return "high";
947
+ case RNMapsMarkerDisplayPriority::Low: return "low";
948
+ }
949
+ }
950
+ enum class RNMapsMarkerTitleVisibility { Hidden, Adaptive, Visible };
951
+
952
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerTitleVisibility &result) {
953
+ auto string = (std::string)value;
954
+ if (string == "hidden") { result = RNMapsMarkerTitleVisibility::Hidden; return; }
955
+ if (string == "adaptive") { result = RNMapsMarkerTitleVisibility::Adaptive; return; }
956
+ if (string == "visible") { result = RNMapsMarkerTitleVisibility::Visible; return; }
957
+ abort();
958
+ }
959
+
960
+ static inline std::string toString(const RNMapsMarkerTitleVisibility &value) {
961
+ switch (value) {
962
+ case RNMapsMarkerTitleVisibility::Hidden: return "hidden";
963
+ case RNMapsMarkerTitleVisibility::Adaptive: return "adaptive";
964
+ case RNMapsMarkerTitleVisibility::Visible: return "visible";
965
+ }
966
+ }
967
+ enum class RNMapsMarkerSubtitleVisibility { Hidden, Adaptive, Visible };
968
+
969
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerSubtitleVisibility &result) {
970
+ auto string = (std::string)value;
971
+ if (string == "hidden") { result = RNMapsMarkerSubtitleVisibility::Hidden; return; }
972
+ if (string == "adaptive") { result = RNMapsMarkerSubtitleVisibility::Adaptive; return; }
973
+ if (string == "visible") { result = RNMapsMarkerSubtitleVisibility::Visible; return; }
974
+ abort();
975
+ }
976
+
977
+ static inline std::string toString(const RNMapsMarkerSubtitleVisibility &value) {
978
+ switch (value) {
979
+ case RNMapsMarkerSubtitleVisibility::Hidden: return "hidden";
980
+ case RNMapsMarkerSubtitleVisibility::Adaptive: return "adaptive";
981
+ case RNMapsMarkerSubtitleVisibility::Visible: return "visible";
982
+ }
983
+ }
984
+ struct RNMapsMarkerAnchorStruct {
985
+ double x{0.0};
986
+ double y{0.0};
987
+ };
988
+
989
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerAnchorStruct &result) {
990
+ auto map = (std::unordered_map<std::string, RawValue>)value;
991
+
992
+ auto tmp_x = map.find("x");
993
+ if (tmp_x != map.end()) {
994
+ fromRawValue(context, tmp_x->second, result.x);
995
+ }
996
+ auto tmp_y = map.find("y");
997
+ if (tmp_y != map.end()) {
998
+ fromRawValue(context, tmp_y->second, result.y);
999
+ }
1000
+ }
1001
+
1002
+ static inline std::string toString(const RNMapsMarkerAnchorStruct &value) {
1003
+ return "[Object RNMapsMarkerAnchorStruct]";
1004
+ }
1005
+
1006
+ struct RNMapsMarkerCalloutAnchorStruct {
1007
+ double x{0.0};
1008
+ double y{0.0};
1009
+ };
1010
+
1011
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerCalloutAnchorStruct &result) {
1012
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1013
+
1014
+ auto tmp_x = map.find("x");
1015
+ if (tmp_x != map.end()) {
1016
+ fromRawValue(context, tmp_x->second, result.x);
1017
+ }
1018
+ auto tmp_y = map.find("y");
1019
+ if (tmp_y != map.end()) {
1020
+ fromRawValue(context, tmp_y->second, result.y);
1021
+ }
1022
+ }
1023
+
1024
+ static inline std::string toString(const RNMapsMarkerCalloutAnchorStruct &value) {
1025
+ return "[Object RNMapsMarkerCalloutAnchorStruct]";
1026
+ }
1027
+
1028
+ struct RNMapsMarkerCalloutOffsetStruct {
1029
+ double x{0.0};
1030
+ double y{0.0};
1031
+ };
1032
+
1033
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerCalloutOffsetStruct &result) {
1034
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1035
+
1036
+ auto tmp_x = map.find("x");
1037
+ if (tmp_x != map.end()) {
1038
+ fromRawValue(context, tmp_x->second, result.x);
1039
+ }
1040
+ auto tmp_y = map.find("y");
1041
+ if (tmp_y != map.end()) {
1042
+ fromRawValue(context, tmp_y->second, result.y);
1043
+ }
1044
+ }
1045
+
1046
+ static inline std::string toString(const RNMapsMarkerCalloutOffsetStruct &value) {
1047
+ return "[Object RNMapsMarkerCalloutOffsetStruct]";
1048
+ }
1049
+
1050
+ struct RNMapsMarkerCoordinateStruct {
1051
+ double latitude{0.0};
1052
+ double longitude{0.0};
1053
+ };
1054
+
1055
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerCoordinateStruct &result) {
1056
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1057
+
1058
+ auto tmp_latitude = map.find("latitude");
1059
+ if (tmp_latitude != map.end()) {
1060
+ fromRawValue(context, tmp_latitude->second, result.latitude);
1061
+ }
1062
+ auto tmp_longitude = map.find("longitude");
1063
+ if (tmp_longitude != map.end()) {
1064
+ fromRawValue(context, tmp_longitude->second, result.longitude);
1065
+ }
1066
+ }
1067
+
1068
+ static inline std::string toString(const RNMapsMarkerCoordinateStruct &value) {
1069
+ return "[Object RNMapsMarkerCoordinateStruct]";
1070
+ }
1071
+ class RNMapsMarkerProps final : public ViewProps {
1072
+ public:
1073
+ RNMapsMarkerProps() = default;
1074
+ RNMapsMarkerProps(const PropsParserContext& context, const RNMapsMarkerProps &sourceProps, const RawProps &rawProps);
1075
+
1076
+ #pragma mark - Props
1077
+
1078
+ RNMapsMarkerAnchorStruct anchor{};
1079
+ RNMapsMarkerCalloutAnchorStruct calloutAnchor{};
1080
+ ImageSource image{};
1081
+ RNMapsMarkerCalloutOffsetStruct calloutOffset{};
1082
+ RNMapsMarkerDisplayPriority displayPriority{RNMapsMarkerDisplayPriority::Required};
1083
+ RNMapsMarkerCoordinateStruct coordinate{};
1084
+ std::string description{};
1085
+ bool draggable{false};
1086
+ std::string title{};
1087
+ std::string identifier{};
1088
+ bool isPreselected{false};
1089
+ double opacity{1.0};
1090
+ SharedColor pinColor{};
1091
+ RNMapsMarkerTitleVisibility titleVisibility{RNMapsMarkerTitleVisibility::Visible};
1092
+ RNMapsMarkerSubtitleVisibility subtitleVisibility{RNMapsMarkerSubtitleVisibility::Adaptive};
1093
+ bool useLegacyPinView{false};
1094
+ };
1095
+
1096
+ struct RNMapsOverlayBoundsStruct {
1097
+ double latitude{0.0};
1098
+ double longitude{0.0};
1099
+ };
1100
+
1101
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsStruct &result) {
1102
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1103
+
1104
+ auto tmp_latitude = map.find("latitude");
1105
+ if (tmp_latitude != map.end()) {
1106
+ fromRawValue(context, tmp_latitude->second, result.latitude);
1107
+ }
1108
+ auto tmp_longitude = map.find("longitude");
1109
+ if (tmp_longitude != map.end()) {
1110
+ fromRawValue(context, tmp_longitude->second, result.longitude);
1111
+ }
1112
+ }
1113
+
1114
+ static inline std::string toString(const RNMapsOverlayBoundsStruct &value) {
1115
+ return "[Object RNMapsOverlayBoundsStruct]";
1116
+ }
1117
+
1118
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<RNMapsOverlayBoundsStruct> &result) {
1119
+ auto items = (std::vector<RawValue>)value;
1120
+ for (const auto &item : items) {
1121
+ RNMapsOverlayBoundsStruct newItem;
1122
+ fromRawValue(context, item, newItem);
1123
+ result.emplace_back(newItem);
1124
+ }
1125
+ }
1126
+
1127
+ class RNMapsOverlayProps final : public ViewProps {
1128
+ public:
1129
+ RNMapsOverlayProps() = default;
1130
+ RNMapsOverlayProps(const PropsParserContext& context, const RNMapsOverlayProps &sourceProps, const RawProps &rawProps);
1131
+
1132
+ #pragma mark - Props
1133
+
1134
+ Float bearing{0.0};
1135
+ std::vector<RNMapsOverlayBoundsStruct> bounds{};
1136
+ ImageSource image{};
1137
+ Float opacity{1.0};
1138
+ bool tappable{false};
1139
+ };
1140
+
1141
+ enum class RNMapsPolylineLineCap { Butt, Round, Square };
1142
+
1143
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsPolylineLineCap &result) {
1144
+ auto string = (std::string)value;
1145
+ if (string == "butt") { result = RNMapsPolylineLineCap::Butt; return; }
1146
+ if (string == "round") { result = RNMapsPolylineLineCap::Round; return; }
1147
+ if (string == "square") { result = RNMapsPolylineLineCap::Square; return; }
1148
+ abort();
1149
+ }
1150
+
1151
+ static inline std::string toString(const RNMapsPolylineLineCap &value) {
1152
+ switch (value) {
1153
+ case RNMapsPolylineLineCap::Butt: return "butt";
1154
+ case RNMapsPolylineLineCap::Round: return "round";
1155
+ case RNMapsPolylineLineCap::Square: return "square";
1156
+ }
1157
+ }
1158
+ enum class RNMapsPolylineLineJoin { Miter, Round, Bevel };
1159
+
1160
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsPolylineLineJoin &result) {
1161
+ auto string = (std::string)value;
1162
+ if (string == "miter") { result = RNMapsPolylineLineJoin::Miter; return; }
1163
+ if (string == "round") { result = RNMapsPolylineLineJoin::Round; return; }
1164
+ if (string == "bevel") { result = RNMapsPolylineLineJoin::Bevel; return; }
1165
+ abort();
1166
+ }
1167
+
1168
+ static inline std::string toString(const RNMapsPolylineLineJoin &value) {
1169
+ switch (value) {
1170
+ case RNMapsPolylineLineJoin::Miter: return "miter";
1171
+ case RNMapsPolylineLineJoin::Round: return "round";
1172
+ case RNMapsPolylineLineJoin::Bevel: return "bevel";
1173
+ }
1174
+ }
1175
+ struct RNMapsPolylineCoordinatesStruct {
1176
+ double latitude{0.0};
1177
+ double longitude{0.0};
1178
+ };
1179
+
1180
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsPolylineCoordinatesStruct &result) {
1181
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1182
+
1183
+ auto tmp_latitude = map.find("latitude");
1184
+ if (tmp_latitude != map.end()) {
1185
+ fromRawValue(context, tmp_latitude->second, result.latitude);
1186
+ }
1187
+ auto tmp_longitude = map.find("longitude");
1188
+ if (tmp_longitude != map.end()) {
1189
+ fromRawValue(context, tmp_longitude->second, result.longitude);
1190
+ }
1191
+ }
1192
+
1193
+ static inline std::string toString(const RNMapsPolylineCoordinatesStruct &value) {
1194
+ return "[Object RNMapsPolylineCoordinatesStruct]";
1195
+ }
1196
+
1197
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<RNMapsPolylineCoordinatesStruct> &result) {
1198
+ auto items = (std::vector<RawValue>)value;
1199
+ for (const auto &item : items) {
1200
+ RNMapsPolylineCoordinatesStruct newItem;
1201
+ fromRawValue(context, item, newItem);
1202
+ result.emplace_back(newItem);
1203
+ }
1204
+ }
1205
+
1206
+ class RNMapsPolylineProps final : public ViewProps {
1207
+ public:
1208
+ RNMapsPolylineProps() = default;
1209
+ RNMapsPolylineProps(const PropsParserContext& context, const RNMapsPolylineProps &sourceProps, const RawProps &rawProps);
1210
+
1211
+ #pragma mark - Props
1212
+
1213
+ std::vector<RNMapsPolylineCoordinatesStruct> coordinates{};
1214
+ bool geodesic{false};
1215
+ RNMapsPolylineLineCap lineCap{RNMapsPolylineLineCap::Butt};
1216
+ std::vector<double> lineDashPattern{};
1217
+ RNMapsPolylineLineJoin lineJoin{RNMapsPolylineLineJoin::Miter};
1218
+ SharedColor strokeColor{};
1219
+ std::vector<SharedColor> strokeColors{};
1220
+ Float strokeWidth{0.0};
1221
+ bool tappable{false};
1222
+ };
1223
+
1224
+ } // namespace facebook::react