react-native-maps 1.28.1 → 1.29.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 (40) hide show
  1. package/android/src/main/java/com/rnmaps/maps/MapManager.java +1 -1
  2. package/android/src/main/java/com/rnmaps/maps/MapView.java +5 -0
  3. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
  4. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +2 -0
  5. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +175 -0
  6. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +157 -0
  7. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +183 -0
  8. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +431 -0
  9. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +2 -0
  10. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +22 -0
  11. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +4 -0
  12. package/dist/src/specs/NativeComponentGoogleMarker.d.ts +250 -0
  13. package/dist/src/specs/NativeComponentPolygon.d.ts +108 -0
  14. package/dist/tsconfig.build.tsbuildinfo +1 -1
  15. package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +3 -0
  16. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +6 -2
  17. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +8 -0
  18. package/ios/AirGoogleMaps/RNMapsGoogleMarkerView.h +28 -0
  19. package/ios/AirGoogleMaps/RNMapsGoogleMarkerView.mm +357 -0
  20. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMarkerView.h +24 -0
  21. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMarkerView.mm +64 -0
  22. package/ios/AirMaps/RNMapsMapView.mm +8 -0
  23. package/ios/AirMaps/RNMapsPolygonView.h +26 -0
  24. package/ios/AirMaps/RNMapsPolygonView.mm +240 -0
  25. package/ios/generated/RCTThirdPartyComponentsProvider.mm +2 -0
  26. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
  27. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +2 -0
  28. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +175 -0
  29. package/ios/generated/RNMapsSpecs/EventEmitters.h +157 -0
  30. package/ios/generated/RNMapsSpecs/Props.cpp +178 -0
  31. package/ios/generated/RNMapsSpecs/Props.h +379 -0
  32. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +143 -0
  33. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +2 -0
  34. package/ios/generated/RNMapsSpecs/ShadowNodes.h +22 -0
  35. package/ios/generated/RNMapsSpecs/States.h +4 -0
  36. package/package.json +4 -2
  37. package/src/MapMarker.tsx +4 -3
  38. package/src/decorateMapComponent.ts +29 -15
  39. package/src/specs/NativeComponentGoogleMarker.ts +327 -0
  40. package/src/specs/NativeComponentPolygon.ts +137 -0
@@ -12,6 +12,7 @@
12
12
  #include <react/renderer/components/view/ViewProps.h>
13
13
  #include <react/renderer/core/PropsParserContext.h>
14
14
  #include <react/renderer/core/propsConversions.h>
15
+ #include <react/renderer/debug/DebugStringConvertible.h>
15
16
  #include <react/renderer/graphics/Color.h>
16
17
  #include <react/renderer/imagemanager/primitives.h>
17
18
  #include <vector>
@@ -33,12 +34,15 @@ class RNMapsCalloutProps final : public ViewProps {
33
34
 
34
35
  folly::dynamic getDiffProps(const Props* prevProps) const override;
35
36
  #endif
37
+
38
+
36
39
  };
37
40
 
38
41
  struct RNMapsCircleCenterStruct {
39
42
  double latitude{0.0};
40
43
  double longitude{0.0};
41
44
 
45
+
42
46
  #ifdef RN_SERIALIZABLE_STATE
43
47
  bool operator==(const RNMapsCircleCenterStruct&) const = default;
44
48
 
@@ -92,6 +96,8 @@ class RNMapsCircleProps final : public ViewProps {
92
96
 
93
97
  folly::dynamic getDiffProps(const Props* prevProps) const override;
94
98
  #endif
99
+
100
+
95
101
  };
96
102
 
97
103
  enum class RNMapsGoogleMapViewMapType { Hybrid, MutedStandard, None, Satellite, Standard, Terrain, SatelliteFlyover, HybridFlyover };
@@ -202,6 +208,7 @@ struct RNMapsGoogleMapViewCameraCenterStruct {
202
208
  double latitude{0.0};
203
209
  double longitude{0.0};
204
210
 
211
+
205
212
  #ifdef RN_SERIALIZABLE_STATE
206
213
  bool operator==(const RNMapsGoogleMapViewCameraCenterStruct&) const = default;
207
214
 
@@ -244,6 +251,7 @@ struct RNMapsGoogleMapViewCameraStruct {
244
251
  double pitch{0.0};
245
252
  Float zoom{0.0};
246
253
 
254
+
247
255
  #ifdef RN_SERIALIZABLE_STATE
248
256
  bool operator==(const RNMapsGoogleMapViewCameraStruct&) const = default;
249
257
 
@@ -298,6 +306,7 @@ struct RNMapsGoogleMapViewInitialCameraCenterStruct {
298
306
  double latitude{0.0};
299
307
  double longitude{0.0};
300
308
 
309
+
301
310
  #ifdef RN_SERIALIZABLE_STATE
302
311
  bool operator==(const RNMapsGoogleMapViewInitialCameraCenterStruct&) const = default;
303
312
 
@@ -340,6 +349,7 @@ struct RNMapsGoogleMapViewInitialCameraStruct {
340
349
  double pitch{0.0};
341
350
  Float zoom{0.0};
342
351
 
352
+
343
353
  #ifdef RN_SERIALIZABLE_STATE
344
354
  bool operator==(const RNMapsGoogleMapViewInitialCameraStruct&) const = default;
345
355
 
@@ -396,6 +406,7 @@ struct RNMapsGoogleMapViewInitialRegionStruct {
396
406
  double latitudeDelta{0.0};
397
407
  double longitudeDelta{0.0};
398
408
 
409
+
399
410
  #ifdef RN_SERIALIZABLE_STATE
400
411
  bool operator==(const RNMapsGoogleMapViewInitialRegionStruct&) const = default;
401
412
 
@@ -447,6 +458,7 @@ struct RNMapsGoogleMapViewMapPaddingStruct {
447
458
  double bottom{0.0};
448
459
  double left{0.0};
449
460
 
461
+
450
462
  #ifdef RN_SERIALIZABLE_STATE
451
463
  bool operator==(const RNMapsGoogleMapViewMapPaddingStruct&) const = default;
452
464
 
@@ -498,6 +510,7 @@ struct RNMapsGoogleMapViewRegionStruct {
498
510
  double latitudeDelta{0.0};
499
511
  double longitudeDelta{0.0};
500
512
 
513
+
501
514
  #ifdef RN_SERIALIZABLE_STATE
502
515
  bool operator==(const RNMapsGoogleMapViewRegionStruct&) const = default;
503
516
 
@@ -588,12 +601,167 @@ class RNMapsGoogleMapViewProps final : public ViewProps {
588
601
 
589
602
  folly::dynamic getDiffProps(const Props* prevProps) const override;
590
603
  #endif
604
+
605
+
606
+ };
607
+
608
+ struct RNMapsGoogleMarkerAnchorStruct {
609
+ double x{0.0};
610
+ double y{0.0};
611
+
612
+
613
+ #ifdef RN_SERIALIZABLE_STATE
614
+ bool operator==(const RNMapsGoogleMarkerAnchorStruct&) const = default;
615
+
616
+ folly::dynamic toDynamic() const {
617
+ folly::dynamic result = folly::dynamic::object();
618
+ result["x"] = x;
619
+ result["y"] = y;
620
+ return result;
621
+ }
622
+ #endif
623
+ };
624
+
625
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMarkerAnchorStruct &result) {
626
+ auto map = (std::unordered_map<std::string, RawValue>)value;
627
+
628
+ auto tmp_x = map.find("x");
629
+ if (tmp_x != map.end()) {
630
+ fromRawValue(context, tmp_x->second, result.x);
631
+ }
632
+ auto tmp_y = map.find("y");
633
+ if (tmp_y != map.end()) {
634
+ fromRawValue(context, tmp_y->second, result.y);
635
+ }
636
+ }
637
+
638
+ static inline std::string toString(const RNMapsGoogleMarkerAnchorStruct &value) {
639
+ return "[Object RNMapsGoogleMarkerAnchorStruct]";
640
+ }
641
+
642
+ #ifdef RN_SERIALIZABLE_STATE
643
+ static inline folly::dynamic toDynamic(const RNMapsGoogleMarkerAnchorStruct &value) {
644
+ return value.toDynamic();
645
+ }
646
+ #endif
647
+
648
+ struct RNMapsGoogleMarkerCalloutAnchorStruct {
649
+ double x{0.0};
650
+ double y{0.0};
651
+
652
+
653
+ #ifdef RN_SERIALIZABLE_STATE
654
+ bool operator==(const RNMapsGoogleMarkerCalloutAnchorStruct&) const = default;
655
+
656
+ folly::dynamic toDynamic() const {
657
+ folly::dynamic result = folly::dynamic::object();
658
+ result["x"] = x;
659
+ result["y"] = y;
660
+ return result;
661
+ }
662
+ #endif
663
+ };
664
+
665
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMarkerCalloutAnchorStruct &result) {
666
+ auto map = (std::unordered_map<std::string, RawValue>)value;
667
+
668
+ auto tmp_x = map.find("x");
669
+ if (tmp_x != map.end()) {
670
+ fromRawValue(context, tmp_x->second, result.x);
671
+ }
672
+ auto tmp_y = map.find("y");
673
+ if (tmp_y != map.end()) {
674
+ fromRawValue(context, tmp_y->second, result.y);
675
+ }
676
+ }
677
+
678
+ static inline std::string toString(const RNMapsGoogleMarkerCalloutAnchorStruct &value) {
679
+ return "[Object RNMapsGoogleMarkerCalloutAnchorStruct]";
680
+ }
681
+
682
+ #ifdef RN_SERIALIZABLE_STATE
683
+ static inline folly::dynamic toDynamic(const RNMapsGoogleMarkerCalloutAnchorStruct &value) {
684
+ return value.toDynamic();
685
+ }
686
+ #endif
687
+
688
+ struct RNMapsGoogleMarkerCoordinateStruct {
689
+ double latitude{0.0};
690
+ double longitude{0.0};
691
+
692
+
693
+ #ifdef RN_SERIALIZABLE_STATE
694
+ bool operator==(const RNMapsGoogleMarkerCoordinateStruct&) const = default;
695
+
696
+ folly::dynamic toDynamic() const {
697
+ folly::dynamic result = folly::dynamic::object();
698
+ result["latitude"] = latitude;
699
+ result["longitude"] = longitude;
700
+ return result;
701
+ }
702
+ #endif
703
+ };
704
+
705
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsGoogleMarkerCoordinateStruct &result) {
706
+ auto map = (std::unordered_map<std::string, RawValue>)value;
707
+
708
+ auto tmp_latitude = map.find("latitude");
709
+ if (tmp_latitude != map.end()) {
710
+ fromRawValue(context, tmp_latitude->second, result.latitude);
711
+ }
712
+ auto tmp_longitude = map.find("longitude");
713
+ if (tmp_longitude != map.end()) {
714
+ fromRawValue(context, tmp_longitude->second, result.longitude);
715
+ }
716
+ }
717
+
718
+ static inline std::string toString(const RNMapsGoogleMarkerCoordinateStruct &value) {
719
+ return "[Object RNMapsGoogleMarkerCoordinateStruct]";
720
+ }
721
+
722
+ #ifdef RN_SERIALIZABLE_STATE
723
+ static inline folly::dynamic toDynamic(const RNMapsGoogleMarkerCoordinateStruct &value) {
724
+ return value.toDynamic();
725
+ }
726
+ #endif
727
+ class RNMapsGoogleMarkerProps final : public ViewProps {
728
+ public:
729
+ RNMapsGoogleMarkerProps() = default;
730
+ RNMapsGoogleMarkerProps(const PropsParserContext& context, const RNMapsGoogleMarkerProps &sourceProps, const RawProps &rawProps);
731
+
732
+ #pragma mark - Props
733
+
734
+ RNMapsGoogleMarkerAnchorStruct anchor{};
735
+ RNMapsGoogleMarkerCalloutAnchorStruct calloutAnchor{};
736
+ ImageSource image{};
737
+ ImageSource icon{};
738
+ RNMapsGoogleMarkerCoordinateStruct coordinate{};
739
+ std::string description{};
740
+ bool draggable{false};
741
+ std::string title{};
742
+ bool tracksViewChanges{true};
743
+ bool tracksInfoWindowChanges{false};
744
+ bool flat{false};
745
+ Float rotation{0.0};
746
+ std::string identifier{};
747
+ bool tappable{true};
748
+ double opacity{1.0};
749
+ SharedColor pinColor{};
750
+
751
+ #ifdef RN_SERIALIZABLE_STATE
752
+ ComponentName getDiffPropsImplementationTarget() const override;
753
+
754
+ folly::dynamic getDiffProps(const Props* prevProps) const override;
755
+ #endif
756
+
757
+
591
758
  };
592
759
 
593
760
  struct RNMapsGooglePolygonCoordinatesStruct {
594
761
  double latitude{0.0};
595
762
  double longitude{0.0};
596
763
 
764
+
597
765
  #ifdef RN_SERIALIZABLE_STATE
598
766
  bool operator==(const RNMapsGooglePolygonCoordinatesStruct&) const = default;
599
767
 
@@ -643,6 +811,7 @@ struct RNMapsGooglePolygonHolesStruct {
643
811
  double latitude{0.0};
644
812
  double longitude{0.0};
645
813
 
814
+
646
815
  #ifdef RN_SERIALIZABLE_STATE
647
816
  bool operator==(const RNMapsGooglePolygonHolesStruct&) const = default;
648
817
 
@@ -711,6 +880,8 @@ class RNMapsGooglePolygonProps final : public ViewProps {
711
880
 
712
881
  folly::dynamic getDiffProps(const Props* prevProps) const override;
713
882
  #endif
883
+
884
+
714
885
  };
715
886
 
716
887
  enum class RNMapsMapViewGoogleRenderer { LATEST, LEGACY };
@@ -842,6 +1013,7 @@ struct RNMapsMapViewCameraCenterStruct {
842
1013
  double latitude{0.0};
843
1014
  double longitude{0.0};
844
1015
 
1016
+
845
1017
  #ifdef RN_SERIALIZABLE_STATE
846
1018
  bool operator==(const RNMapsMapViewCameraCenterStruct&) const = default;
847
1019
 
@@ -884,6 +1056,7 @@ struct RNMapsMapViewCameraStruct {
884
1056
  double pitch{0.0};
885
1057
  Float zoom{0.0};
886
1058
 
1059
+
887
1060
  #ifdef RN_SERIALIZABLE_STATE
888
1061
  bool operator==(const RNMapsMapViewCameraStruct&) const = default;
889
1062
 
@@ -938,6 +1111,7 @@ struct RNMapsMapViewCompassOffsetStruct {
938
1111
  double x{0.0};
939
1112
  double y{0.0};
940
1113
 
1114
+
941
1115
  #ifdef RN_SERIALIZABLE_STATE
942
1116
  bool operator==(const RNMapsMapViewCompassOffsetStruct&) const = default;
943
1117
 
@@ -977,6 +1151,7 @@ struct RNMapsMapViewInitialCameraCenterStruct {
977
1151
  double latitude{0.0};
978
1152
  double longitude{0.0};
979
1153
 
1154
+
980
1155
  #ifdef RN_SERIALIZABLE_STATE
981
1156
  bool operator==(const RNMapsMapViewInitialCameraCenterStruct&) const = default;
982
1157
 
@@ -1019,6 +1194,7 @@ struct RNMapsMapViewInitialCameraStruct {
1019
1194
  double pitch{0.0};
1020
1195
  Float zoom{0.0};
1021
1196
 
1197
+
1022
1198
  #ifdef RN_SERIALIZABLE_STATE
1023
1199
  bool operator==(const RNMapsMapViewInitialCameraStruct&) const = default;
1024
1200
 
@@ -1075,6 +1251,7 @@ struct RNMapsMapViewInitialRegionStruct {
1075
1251
  double latitudeDelta{0.0};
1076
1252
  double longitudeDelta{0.0};
1077
1253
 
1254
+
1078
1255
  #ifdef RN_SERIALIZABLE_STATE
1079
1256
  bool operator==(const RNMapsMapViewInitialRegionStruct&) const = default;
1080
1257
 
@@ -1126,6 +1303,7 @@ struct RNMapsMapViewLegalLabelInsetsStruct {
1126
1303
  double bottom{0.0};
1127
1304
  double left{0.0};
1128
1305
 
1306
+
1129
1307
  #ifdef RN_SERIALIZABLE_STATE
1130
1308
  bool operator==(const RNMapsMapViewLegalLabelInsetsStruct&) const = default;
1131
1309
 
@@ -1171,12 +1349,65 @@ static inline folly::dynamic toDynamic(const RNMapsMapViewLegalLabelInsetsStruct
1171
1349
  }
1172
1350
  #endif
1173
1351
 
1352
+ struct RNMapsMapViewAppleLogoInsetsStruct {
1353
+ double top{0.0};
1354
+ double right{0.0};
1355
+ double bottom{0.0};
1356
+ double left{0.0};
1357
+
1358
+
1359
+ #ifdef RN_SERIALIZABLE_STATE
1360
+ bool operator==(const RNMapsMapViewAppleLogoInsetsStruct&) const = default;
1361
+
1362
+ folly::dynamic toDynamic() const {
1363
+ folly::dynamic result = folly::dynamic::object();
1364
+ result["top"] = top;
1365
+ result["right"] = right;
1366
+ result["bottom"] = bottom;
1367
+ result["left"] = left;
1368
+ return result;
1369
+ }
1370
+ #endif
1371
+ };
1372
+
1373
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMapViewAppleLogoInsetsStruct &result) {
1374
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1375
+
1376
+ auto tmp_top = map.find("top");
1377
+ if (tmp_top != map.end()) {
1378
+ fromRawValue(context, tmp_top->second, result.top);
1379
+ }
1380
+ auto tmp_right = map.find("right");
1381
+ if (tmp_right != map.end()) {
1382
+ fromRawValue(context, tmp_right->second, result.right);
1383
+ }
1384
+ auto tmp_bottom = map.find("bottom");
1385
+ if (tmp_bottom != map.end()) {
1386
+ fromRawValue(context, tmp_bottom->second, result.bottom);
1387
+ }
1388
+ auto tmp_left = map.find("left");
1389
+ if (tmp_left != map.end()) {
1390
+ fromRawValue(context, tmp_left->second, result.left);
1391
+ }
1392
+ }
1393
+
1394
+ static inline std::string toString(const RNMapsMapViewAppleLogoInsetsStruct &value) {
1395
+ return "[Object RNMapsMapViewAppleLogoInsetsStruct]";
1396
+ }
1397
+
1398
+ #ifdef RN_SERIALIZABLE_STATE
1399
+ static inline folly::dynamic toDynamic(const RNMapsMapViewAppleLogoInsetsStruct &value) {
1400
+ return value.toDynamic();
1401
+ }
1402
+ #endif
1403
+
1174
1404
  struct RNMapsMapViewMapPaddingStruct {
1175
1405
  double top{0.0};
1176
1406
  double right{0.0};
1177
1407
  double bottom{0.0};
1178
1408
  double left{0.0};
1179
1409
 
1410
+
1180
1411
  #ifdef RN_SERIALIZABLE_STATE
1181
1412
  bool operator==(const RNMapsMapViewMapPaddingStruct&) const = default;
1182
1413
 
@@ -1228,6 +1459,7 @@ struct RNMapsMapViewRegionStruct {
1228
1459
  double latitudeDelta{0.0};
1229
1460
  double longitudeDelta{0.0};
1230
1461
 
1462
+
1231
1463
  #ifdef RN_SERIALIZABLE_STATE
1232
1464
  bool operator==(const RNMapsMapViewRegionStruct&) const = default;
1233
1465
 
@@ -1278,6 +1510,7 @@ struct RNMapsMapViewCameraZoomRangeStruct {
1278
1510
  double maxCenterCoordinateDistance{0.0};
1279
1511
  bool animated{false};
1280
1512
 
1513
+
1281
1514
  #ifdef RN_SERIALIZABLE_STATE
1282
1515
  bool operator==(const RNMapsMapViewCameraZoomRangeStruct&) const = default;
1283
1516
 
@@ -1333,6 +1566,7 @@ class RNMapsMapViewProps final : public ViewProps {
1333
1566
  RNMapsMapViewInitialRegionStruct initialRegion{};
1334
1567
  std::string kmlSrc{};
1335
1568
  RNMapsMapViewLegalLabelInsetsStruct legalLabelInsets{};
1569
+ RNMapsMapViewAppleLogoInsetsStruct appleLogoInsets{};
1336
1570
  bool liteMode{false};
1337
1571
  std::string googleMapId{};
1338
1572
  RNMapsMapViewGoogleRenderer googleRenderer{RNMapsMapViewGoogleRenderer::LATEST};
@@ -1382,6 +1616,8 @@ class RNMapsMapViewProps final : public ViewProps {
1382
1616
 
1383
1617
  folly::dynamic getDiffProps(const Props* prevProps) const override;
1384
1618
  #endif
1619
+
1620
+
1385
1621
  };
1386
1622
 
1387
1623
  enum class RNMapsMarkerDisplayPriority { Required, High, Low };
@@ -1457,6 +1693,7 @@ struct RNMapsMarkerAnchorStruct {
1457
1693
  double x{0.0};
1458
1694
  double y{0.0};
1459
1695
 
1696
+
1460
1697
  #ifdef RN_SERIALIZABLE_STATE
1461
1698
  bool operator==(const RNMapsMarkerAnchorStruct&) const = default;
1462
1699
 
@@ -1496,6 +1733,7 @@ struct RNMapsMarkerCalloutAnchorStruct {
1496
1733
  double x{0.0};
1497
1734
  double y{0.0};
1498
1735
 
1736
+
1499
1737
  #ifdef RN_SERIALIZABLE_STATE
1500
1738
  bool operator==(const RNMapsMarkerCalloutAnchorStruct&) const = default;
1501
1739
 
@@ -1535,6 +1773,7 @@ struct RNMapsMarkerCalloutOffsetStruct {
1535
1773
  double x{0.0};
1536
1774
  double y{0.0};
1537
1775
 
1776
+
1538
1777
  #ifdef RN_SERIALIZABLE_STATE
1539
1778
  bool operator==(const RNMapsMarkerCalloutOffsetStruct&) const = default;
1540
1779
 
@@ -1574,6 +1813,7 @@ struct RNMapsMarkerCenterOffsetStruct {
1574
1813
  double x{0.0};
1575
1814
  double y{0.0};
1576
1815
 
1816
+
1577
1817
  #ifdef RN_SERIALIZABLE_STATE
1578
1818
  bool operator==(const RNMapsMarkerCenterOffsetStruct&) const = default;
1579
1819
 
@@ -1613,6 +1853,7 @@ struct RNMapsMarkerCoordinateStruct {
1613
1853
  double latitude{0.0};
1614
1854
  double longitude{0.0};
1615
1855
 
1856
+
1616
1857
  #ifdef RN_SERIALIZABLE_STATE
1617
1858
  bool operator==(const RNMapsMarkerCoordinateStruct&) const = default;
1618
1859
 
@@ -1678,12 +1919,15 @@ class RNMapsMarkerProps final : public ViewProps {
1678
1919
 
1679
1920
  folly::dynamic getDiffProps(const Props* prevProps) const override;
1680
1921
  #endif
1922
+
1923
+
1681
1924
  };
1682
1925
 
1683
1926
  struct RNMapsOverlayBoundsNorthEastStruct {
1684
1927
  double latitude{0.0};
1685
1928
  double longitude{0.0};
1686
1929
 
1930
+
1687
1931
  #ifdef RN_SERIALIZABLE_STATE
1688
1932
  bool operator==(const RNMapsOverlayBoundsNorthEastStruct&) const = default;
1689
1933
 
@@ -1723,6 +1967,7 @@ struct RNMapsOverlayBoundsSouthWestStruct {
1723
1967
  double latitude{0.0};
1724
1968
  double longitude{0.0};
1725
1969
 
1970
+
1726
1971
  #ifdef RN_SERIALIZABLE_STATE
1727
1972
  bool operator==(const RNMapsOverlayBoundsSouthWestStruct&) const = default;
1728
1973
 
@@ -1762,6 +2007,7 @@ struct RNMapsOverlayBoundsStruct {
1762
2007
  RNMapsOverlayBoundsNorthEastStruct northEast{};
1763
2008
  RNMapsOverlayBoundsSouthWestStruct southWest{};
1764
2009
 
2010
+
1765
2011
  #ifdef RN_SERIALIZABLE_STATE
1766
2012
  bool operator==(const RNMapsOverlayBoundsStruct&) const = default;
1767
2013
 
@@ -1814,6 +2060,184 @@ class RNMapsOverlayProps final : public ViewProps {
1814
2060
 
1815
2061
  folly::dynamic getDiffProps(const Props* prevProps) const override;
1816
2062
  #endif
2063
+
2064
+
2065
+ };
2066
+
2067
+ enum class RNMapsPolygonLineCap { Butt, Round, Square };
2068
+
2069
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsPolygonLineCap &result) {
2070
+ auto string = (std::string)value;
2071
+ if (string == "butt") { result = RNMapsPolygonLineCap::Butt; return; }
2072
+ if (string == "round") { result = RNMapsPolygonLineCap::Round; return; }
2073
+ if (string == "square") { result = RNMapsPolygonLineCap::Square; return; }
2074
+ abort();
2075
+ }
2076
+
2077
+ static inline std::string toString(const RNMapsPolygonLineCap &value) {
2078
+ switch (value) {
2079
+ case RNMapsPolygonLineCap::Butt: return "butt";
2080
+ case RNMapsPolygonLineCap::Round: return "round";
2081
+ case RNMapsPolygonLineCap::Square: return "square";
2082
+ }
2083
+ }
2084
+
2085
+ #ifdef RN_SERIALIZABLE_STATE
2086
+ static inline folly::dynamic toDynamic(const RNMapsPolygonLineCap &value) {
2087
+ return toString(value);
2088
+ }
2089
+ #endif
2090
+ enum class RNMapsPolygonLineJoin { Miter, Round, Bevel };
2091
+
2092
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsPolygonLineJoin &result) {
2093
+ auto string = (std::string)value;
2094
+ if (string == "miter") { result = RNMapsPolygonLineJoin::Miter; return; }
2095
+ if (string == "round") { result = RNMapsPolygonLineJoin::Round; return; }
2096
+ if (string == "bevel") { result = RNMapsPolygonLineJoin::Bevel; return; }
2097
+ abort();
2098
+ }
2099
+
2100
+ static inline std::string toString(const RNMapsPolygonLineJoin &value) {
2101
+ switch (value) {
2102
+ case RNMapsPolygonLineJoin::Miter: return "miter";
2103
+ case RNMapsPolygonLineJoin::Round: return "round";
2104
+ case RNMapsPolygonLineJoin::Bevel: return "bevel";
2105
+ }
2106
+ }
2107
+
2108
+ #ifdef RN_SERIALIZABLE_STATE
2109
+ static inline folly::dynamic toDynamic(const RNMapsPolygonLineJoin &value) {
2110
+ return toString(value);
2111
+ }
2112
+ #endif
2113
+ struct RNMapsPolygonCoordinatesStruct {
2114
+ double latitude{0.0};
2115
+ double longitude{0.0};
2116
+
2117
+
2118
+ #ifdef RN_SERIALIZABLE_STATE
2119
+ bool operator==(const RNMapsPolygonCoordinatesStruct&) const = default;
2120
+
2121
+ folly::dynamic toDynamic() const {
2122
+ folly::dynamic result = folly::dynamic::object();
2123
+ result["latitude"] = latitude;
2124
+ result["longitude"] = longitude;
2125
+ return result;
2126
+ }
2127
+ #endif
2128
+ };
2129
+
2130
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsPolygonCoordinatesStruct &result) {
2131
+ auto map = (std::unordered_map<std::string, RawValue>)value;
2132
+
2133
+ auto tmp_latitude = map.find("latitude");
2134
+ if (tmp_latitude != map.end()) {
2135
+ fromRawValue(context, tmp_latitude->second, result.latitude);
2136
+ }
2137
+ auto tmp_longitude = map.find("longitude");
2138
+ if (tmp_longitude != map.end()) {
2139
+ fromRawValue(context, tmp_longitude->second, result.longitude);
2140
+ }
2141
+ }
2142
+
2143
+ static inline std::string toString(const RNMapsPolygonCoordinatesStruct &value) {
2144
+ return "[Object RNMapsPolygonCoordinatesStruct]";
2145
+ }
2146
+
2147
+ #ifdef RN_SERIALIZABLE_STATE
2148
+ static inline folly::dynamic toDynamic(const RNMapsPolygonCoordinatesStruct &value) {
2149
+ return value.toDynamic();
2150
+ }
2151
+ #endif
2152
+
2153
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<RNMapsPolygonCoordinatesStruct> &result) {
2154
+ auto items = (std::vector<RawValue>)value;
2155
+ for (const auto &item : items) {
2156
+ RNMapsPolygonCoordinatesStruct newItem;
2157
+ fromRawValue(context, item, newItem);
2158
+ result.emplace_back(newItem);
2159
+ }
2160
+ }
2161
+
2162
+
2163
+ struct RNMapsPolygonHolesStruct {
2164
+ double latitude{0.0};
2165
+ double longitude{0.0};
2166
+
2167
+
2168
+ #ifdef RN_SERIALIZABLE_STATE
2169
+ bool operator==(const RNMapsPolygonHolesStruct&) const = default;
2170
+
2171
+ folly::dynamic toDynamic() const {
2172
+ folly::dynamic result = folly::dynamic::object();
2173
+ result["latitude"] = latitude;
2174
+ result["longitude"] = longitude;
2175
+ return result;
2176
+ }
2177
+ #endif
2178
+ };
2179
+
2180
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsPolygonHolesStruct &result) {
2181
+ auto map = (std::unordered_map<std::string, RawValue>)value;
2182
+
2183
+ auto tmp_latitude = map.find("latitude");
2184
+ if (tmp_latitude != map.end()) {
2185
+ fromRawValue(context, tmp_latitude->second, result.latitude);
2186
+ }
2187
+ auto tmp_longitude = map.find("longitude");
2188
+ if (tmp_longitude != map.end()) {
2189
+ fromRawValue(context, tmp_longitude->second, result.longitude);
2190
+ }
2191
+ }
2192
+
2193
+ static inline std::string toString(const RNMapsPolygonHolesStruct &value) {
2194
+ return "[Object RNMapsPolygonHolesStruct]";
2195
+ }
2196
+
2197
+ #ifdef RN_SERIALIZABLE_STATE
2198
+ static inline folly::dynamic toDynamic(const RNMapsPolygonHolesStruct &value) {
2199
+ return value.toDynamic();
2200
+ }
2201
+ #endif
2202
+
2203
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<std::vector<RNMapsPolygonHolesStruct>> &result) {
2204
+ auto items = (std::vector<std::vector<RawValue>>)value;
2205
+ for (const std::vector<RawValue> &item : items) {
2206
+ auto nestedArray = std::vector<RNMapsPolygonHolesStruct>{};
2207
+ for (const RawValue &nestedItem : item) {
2208
+ RNMapsPolygonHolesStruct newItem;
2209
+ fromRawValue(context, nestedItem, newItem);
2210
+ nestedArray.emplace_back(newItem);
2211
+ }
2212
+ result.emplace_back(nestedArray);
2213
+ }
2214
+ }
2215
+
2216
+ class RNMapsPolygonProps final : public ViewProps {
2217
+ public:
2218
+ RNMapsPolygonProps() = default;
2219
+ RNMapsPolygonProps(const PropsParserContext& context, const RNMapsPolygonProps &sourceProps, const RawProps &rawProps);
2220
+
2221
+ #pragma mark - Props
2222
+
2223
+ std::vector<RNMapsPolygonCoordinatesStruct> coordinates{};
2224
+ SharedColor fillColor{};
2225
+ SharedColor strokeColor{};
2226
+ Float strokeWidth{1.0};
2227
+ std::vector<std::vector<RNMapsPolygonHolesStruct>> holes{};
2228
+ RNMapsPolygonLineCap lineCap{RNMapsPolygonLineCap::Round};
2229
+ RNMapsPolygonLineJoin lineJoin{RNMapsPolygonLineJoin::Round};
2230
+ Float miterLimit{10.0};
2231
+ Float lineDashPhase{0.0};
2232
+ std::vector<Float> lineDashPattern{};
2233
+
2234
+ #ifdef RN_SERIALIZABLE_STATE
2235
+ ComponentName getDiffPropsImplementationTarget() const override;
2236
+
2237
+ folly::dynamic getDiffProps(const Props* prevProps) const override;
2238
+ #endif
2239
+
2240
+
1817
2241
  };
1818
2242
 
1819
2243
  enum class RNMapsPolylineLineCap { Butt, Round, Square };
@@ -1866,6 +2290,7 @@ struct RNMapsPolylineCoordinatesStruct {
1866
2290
  double latitude{0.0};
1867
2291
  double longitude{0.0};
1868
2292
 
2293
+
1869
2294
  #ifdef RN_SERIALIZABLE_STATE
1870
2295
  bool operator==(const RNMapsPolylineCoordinatesStruct&) const = default;
1871
2296
 
@@ -1932,6 +2357,8 @@ class RNMapsPolylineProps final : public ViewProps {
1932
2357
 
1933
2358
  folly::dynamic getDiffProps(const Props* prevProps) const override;
1934
2359
  #endif
2360
+
2361
+
1935
2362
  };
1936
2363
 
1937
2364
  class RNMapsUrlTileProps final : public ViewProps {
@@ -1958,6 +2385,8 @@ class RNMapsUrlTileProps final : public ViewProps {
1958
2385
 
1959
2386
  folly::dynamic getDiffProps(const Props* prevProps) const override;
1960
2387
  #endif
2388
+
2389
+
1961
2390
  };
1962
2391
 
1963
2392
  class RNMapsWMSTileProps final : public ViewProps {
@@ -1982,6 +2411,8 @@ class RNMapsWMSTileProps final : public ViewProps {
1982
2411
 
1983
2412
  folly::dynamic getDiffProps(const Props* prevProps) const override;
1984
2413
  #endif
2414
+
2415
+
1985
2416
  };
1986
2417
 
1987
2418
  } // namespace facebook::react
@@ -15,10 +15,12 @@ namespace facebook::react {
15
15
  extern const char RNMapsCalloutComponentName[] = "RNMapsCallout";
16
16
  extern const char RNMapsCircleComponentName[] = "RNMapsCircle";
17
17
  extern const char RNMapsGoogleMapViewComponentName[] = "RNMapsGoogleMapView";
18
+ extern const char RNMapsGoogleMarkerComponentName[] = "RNMapsGoogleMarker";
18
19
  extern const char RNMapsGooglePolygonComponentName[] = "RNMapsGooglePolygon";
19
20
  extern const char RNMapsMapViewComponentName[] = "RNMapsMapView";
20
21
  extern const char RNMapsMarkerComponentName[] = "RNMapsMarker";
21
22
  extern const char RNMapsOverlayComponentName[] = "RNMapsOverlay";
23
+ extern const char RNMapsPolygonComponentName[] = "RNMapsPolygon";
22
24
  extern const char RNMapsPolylineComponentName[] = "RNMapsPolyline";
23
25
  extern const char RNMapsUrlTileComponentName[] = "RNMapsUrlTile";
24
26
  extern const char RNMapsWMSTileComponentName[] = "RNMapsWMSTile";