react-native-maps 1.21.0-alpha.8 → 1.21.0-alpha.80

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 (165) hide show
  1. package/android/build.gradle +45 -14
  2. package/android/generated/RCTAppDependencyProvider.h +25 -0
  3. package/android/generated/RCTAppDependencyProvider.mm +55 -0
  4. package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  5. package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  6. package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
  7. package/android/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  8. package/android/generated/ReactAppDependencyProvider.podspec +34 -0
  9. package/android/generated/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
  10. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
  11. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +18 -0
  12. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
  13. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +24 -0
  14. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +206 -0
  15. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
  16. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
  17. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +40 -0
  18. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
  19. package/android/generated/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +27 -0
  20. package/android/generated/jni/CMakeLists.txt +36 -0
  21. package/android/generated/jni/RNMapsSpecs-generated.cpp +68 -0
  22. package/android/generated/jni/RNMapsSpecs.h +31 -0
  23. package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +27 -0
  24. package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +29 -0
  25. package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +940 -0
  26. package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +809 -0
  27. package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.cpp +170 -0
  28. package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.h +1142 -0
  29. package/android/generated/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
  30. package/android/generated/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
  31. package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +22 -0
  32. package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +87 -0
  33. package/android/generated/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
  34. package/android/generated/jni/react/renderer/components/RNMapsSpecs/States.h +89 -0
  35. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  36. package/android/gradlew +1 -2
  37. package/android/src/main/java/com/rnmaps/fabric/CalloutManager.java +77 -0
  38. package/android/src/main/java/com/rnmaps/fabric/JSONUtil.java +86 -0
  39. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +618 -0
  40. package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +259 -0
  41. package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +156 -4
  42. package/android/src/main/java/com/rnmaps/fabric/PolygonManager.java +89 -0
  43. package/android/src/main/java/com/rnmaps/fabric/PolylineManager.java +121 -0
  44. package/android/src/main/java/com/rnmaps/fabric/event/OnCalloutPressEvent.java +25 -0
  45. package/android/src/main/java/com/rnmaps/fabric/event/OnDeselectEvent.java +28 -0
  46. package/android/src/main/java/com/rnmaps/fabric/event/OnDoublePressEvent.java +27 -0
  47. package/android/src/main/java/com/rnmaps/fabric/event/OnDragEndEvent.java +28 -0
  48. package/android/src/main/java/com/rnmaps/fabric/event/OnDragEvent.java +28 -0
  49. package/android/src/main/java/com/rnmaps/fabric/event/OnDragStartEvent.java +28 -0
  50. package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorBuildingFocusedEvent.java +28 -0
  51. package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorLevelActivatedEvent.java +28 -0
  52. package/android/src/main/java/com/rnmaps/fabric/event/OnLongPressEvent.java +28 -0
  53. package/android/src/main/java/com/rnmaps/fabric/event/OnMapLoadedEvent.java +29 -0
  54. package/android/src/main/java/com/rnmaps/fabric/event/OnMapReadyEvent.java +29 -0
  55. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDeselectEvent.java +28 -0
  56. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEndEvent.java +28 -0
  57. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEvent.java +28 -0
  58. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragStartEvent.java +28 -0
  59. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerPressEvent.java +28 -0
  60. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerSelectEvent.java +28 -0
  61. package/android/src/main/java/com/rnmaps/fabric/event/OnPanDragEvent.java +28 -0
  62. package/android/src/main/java/com/rnmaps/fabric/event/OnPoiClickEvent.java +27 -0
  63. package/android/src/main/java/com/rnmaps/fabric/event/OnPressEvent.java +27 -0
  64. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeCompleteEvent.java +30 -0
  65. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeEvent.java +48 -0
  66. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeStartEvent.java +33 -0
  67. package/android/src/main/java/com/rnmaps/fabric/event/OnSelectEvent.java +28 -0
  68. package/android/src/main/java/com/rnmaps/fabric/event/OnUserLocationChangeEvent.java +28 -0
  69. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +30 -2
  70. package/android/src/main/java/com/rnmaps/maps/MapCallout.java +18 -0
  71. package/android/src/main/java/com/rnmaps/maps/MapManager.java +14 -14
  72. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +79 -3
  73. package/android/src/main/java/com/rnmaps/maps/MapModule.java +206 -206
  74. package/android/src/main/java/com/rnmaps/maps/MapPolygon.java +29 -0
  75. package/android/src/main/java/com/rnmaps/maps/MapPolyline.java +207 -141
  76. package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -16
  77. package/android/src/main/java/com/rnmaps/maps/MapView.java +1649 -1336
  78. package/ios/AirGoogleMaps/AIRGoogleMap.h +3 -2
  79. package/ios/AirGoogleMaps/AIRGoogleMap.m +155 -50
  80. package/ios/AirGoogleMaps/AIRGoogleMapCircle.m +23 -11
  81. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +17 -28
  82. package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +2 -0
  83. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +347 -243
  84. package/ios/AirGoogleMaps/AIRGoogleMapPolygon.h +2 -1
  85. package/ios/AirGoogleMaps/AIRGoogleMapPolygon.m +30 -0
  86. package/ios/AirGoogleMaps/AIRGoogleMapPolyline.h +0 -1
  87. package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +0 -7
  88. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.h +1 -1
  89. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
  90. package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.m +2 -0
  91. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +3 -3
  92. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +201 -60
  93. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.h +26 -0
  94. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +217 -0
  95. package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +25 -0
  96. package/ios/AirMaps/AIRMap.h +5 -2
  97. package/ios/AirMaps/AIRMap.m +285 -153
  98. package/ios/AirMaps/AIRMapManager.m +6 -0
  99. package/ios/AirMaps/AIRMapMarker.h +1 -0
  100. package/ios/AirMaps/AIRMapMarker.m +165 -103
  101. package/ios/AirMaps/Callout/SMCalloutView.m +1 -1
  102. package/ios/AirMaps/RNMapsAirModule.h +1 -1
  103. package/ios/AirMaps/RNMapsAirModule.mm +42 -172
  104. package/ios/AirMaps/RNMapsAirModuleDelegate.h +24 -0
  105. package/ios/AirMaps/RNMapsHostVewDelegate.h +17 -0
  106. package/ios/AirMaps/RNMapsMapView.h +3 -3
  107. package/ios/AirMaps/RNMapsMapView.mm +340 -308
  108. package/ios/AirMaps/RNMapsMarkerView.h +24 -0
  109. package/ios/AirMaps/RNMapsMarkerView.mm +430 -0
  110. package/ios/AirMaps/RNMapsMarkerViewManager.mm +21 -0
  111. package/ios/AirMaps/UIView +AirMap.m +20 -0
  112. package/ios/AirMaps/UIView+AirMap.h +11 -0
  113. package/ios/AirMaps.xcodeproj/project.pbxproj +60 -0
  114. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  115. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  116. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  117. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  118. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  119. package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  120. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +27 -0
  121. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +29 -0
  122. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +940 -0
  123. package/ios/generated/RNMapsSpecs/EventEmitters.h +809 -0
  124. package/ios/generated/RNMapsSpecs/Props.cpp +170 -0
  125. package/ios/generated/RNMapsSpecs/Props.h +1142 -0
  126. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +595 -0
  127. package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
  128. package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
  129. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +22 -0
  130. package/ios/generated/RNMapsSpecs/ShadowNodes.h +87 -0
  131. package/ios/generated/RNMapsSpecs/States.cpp +16 -0
  132. package/ios/generated/RNMapsSpecs/States.h +89 -0
  133. package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
  134. package/ios/generated/RNMapsSpecsJSI.h +268 -0
  135. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  136. package/lib/MapCircle.d.ts +1 -1
  137. package/lib/MapHeatmap.d.ts +2 -2
  138. package/lib/MapHeatmap.js +1 -1
  139. package/lib/MapMarker.d.ts +16 -3
  140. package/lib/MapMarker.js +53 -9
  141. package/lib/MapMarkerNativeComponent.js +0 -2
  142. package/lib/MapOverlay.js +2 -8
  143. package/lib/MapPolygon.d.ts +1 -1
  144. package/lib/MapPolyline.d.ts +7 -7
  145. package/lib/MapView.d.ts +14 -27
  146. package/lib/MapView.js +97 -103
  147. package/lib/MapView.types.d.ts +1 -1
  148. package/lib/createFabricMap.d.ts +1 -0
  149. package/lib/createFabricMap.js +15 -2
  150. package/lib/decorateMapComponent.js +30 -0
  151. package/lib/specs/NativeAirMapsModule.d.ts +2 -2
  152. package/lib/specs/NativeComponentCallout.d.ts +46 -0
  153. package/lib/specs/NativeComponentCallout.js +9 -0
  154. package/lib/specs/NativeComponentGoogleMapView.d.ts +15 -15
  155. package/lib/specs/NativeComponentGoogleMapView.js +1 -0
  156. package/lib/specs/NativeComponentGooglePolygon.d.ts +75 -0
  157. package/lib/specs/NativeComponentGooglePolygon.js +7 -0
  158. package/lib/specs/NativeComponentMapView.d.ts +28 -36
  159. package/lib/specs/NativeComponentMapView.js +2 -3
  160. package/lib/specs/NativeComponentMarker.d.ts +258 -0
  161. package/lib/specs/NativeComponentMarker.js +19 -0
  162. package/lib/specs/NativeComponentPolyline.d.ts +101 -0
  163. package/lib/specs/NativeComponentPolyline.js +7 -0
  164. package/package.json +25 -20
  165. package/react-native-maps.podspec +2 -1
@@ -0,0 +1,75 @@
1
+ import type { HostComponent, ViewProps, ColorValue } from 'react-native';
2
+ import { Double, BubblingEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
3
+ export type LatLng = Readonly<{
4
+ latitude: Double;
5
+ longitude: Double;
6
+ }>;
7
+ export type PolygonPressEventHandler = BubblingEventHandler<Readonly<{
8
+ action?: string;
9
+ id: string;
10
+ coordinate: {
11
+ latitude: Double;
12
+ longitude: Double;
13
+ };
14
+ position?: {
15
+ x: Double;
16
+ y: Double;
17
+ };
18
+ }>>;
19
+ export interface PolygonFabricNativeProps extends ViewProps {
20
+ /**
21
+ * An array of coordinates to describe the polygon
22
+ *
23
+ * @platform iOS: Supported
24
+ * @platform Android: Supported
25
+ */
26
+ coordinates: ReadonlyArray<LatLng>;
27
+ /**
28
+ * The fill color to use for the path.
29
+ *
30
+ * @default `#000`, `rgba(r,g,b,0.5)`
31
+ * @platform iOS: Supported
32
+ * @platform Android: Supported
33
+ */
34
+ fillColor?: ColorValue;
35
+ /**
36
+ * The stroke color to use for the path.
37
+ *
38
+ * @default `#000`, `rgba(r,g,b,0.5)`
39
+ * @platform iOS: Supported
40
+ * @platform Android: Supported
41
+ */
42
+ strokeColor?: ColorValue;
43
+ /**
44
+ * Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
45
+ * A geodesic is the shortest path between two points on the Earth's surface.
46
+ * The geodesic curve is constructed assuming the Earth is a sphere.
47
+ *
48
+ * @platform iOS: Google Maps only
49
+ * @platform Android: Supported
50
+ */
51
+ geodesic?: boolean;
52
+ /**
53
+ * A 2d array of coordinates to describe holes of the polygon where each hole has at least 3 points.
54
+ *
55
+ * @platform iOS: Supported
56
+ * @platform Android: Supported
57
+ */
58
+ holes?: ReadonlyArray<ReadonlyArray<LatLng>>;
59
+ /**
60
+ * Boolean to allow a polygon to be tappable and use the onPress function.
61
+ *
62
+ * @platform iOS: Google Maps only
63
+ * @platform Android: Supported
64
+ */
65
+ tappable?: boolean;
66
+ /**
67
+ * Callback that is called when user taps on the map.
68
+ *
69
+ * @platform iOS: Supported
70
+ * @platform Android: Supported
71
+ */
72
+ onPress?: PolygonPressEventHandler;
73
+ }
74
+ declare const _default: HostComponent<PolygonFabricNativeProps>;
75
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
7
+ exports.default = (0, codegenNativeComponent_1.default)('RNMapsGooglePolygon', {});
@@ -447,7 +447,7 @@ export interface MapFabricNativeProps extends ViewProps {
447
447
  * @platform iOS: Not supported
448
448
  * @platform Android: Supported
449
449
  */
450
- moveOnMarkerPress?: boolean;
450
+ moveOnMarkerPress?: WithDefault<boolean, true>;
451
451
  /**
452
452
  * Callback that is called when a callout is tapped by the user.
453
453
  *
@@ -560,6 +560,7 @@ export interface MapFabricNativeProps extends ViewProps {
560
560
  * @platform Android: Supported
561
561
  */
562
562
  onPanDrag?: PanDragEventHandler;
563
+ handlePanDrag?: boolean;
563
564
  /**
564
565
  * Callback that is called when user click on a POI.
565
566
  *
@@ -624,7 +625,7 @@ export interface MapFabricNativeProps extends ViewProps {
624
625
  * @platform iOS: Google Maps only
625
626
  * @platform Android: Supported
626
627
  */
627
- pitchEnabled?: boolean;
628
+ pitchEnabled?: WithDefault<boolean, true>;
628
629
  /**
629
630
  * The region to be displayed by the map.
630
631
  * The region is defined by the center coordinates and the span of coordinates to display.
@@ -640,7 +641,7 @@ export interface MapFabricNativeProps extends ViewProps {
640
641
  * @platform iOS: Google Maps only
641
642
  * @platform Android: Supported
642
643
  */
643
- rotateEnabled?: boolean;
644
+ rotateEnabled?: WithDefault<boolean, true>;
644
645
  /**
645
646
  * If `false` the map will stay centered while rotating or zooming.
646
647
  *
@@ -648,7 +649,7 @@ export interface MapFabricNativeProps extends ViewProps {
648
649
  * @platform iOS: Google Maps only
649
650
  * @platform Android: Supported
650
651
  */
651
- scrollDuringRotateOrZoomEnabled?: boolean;
652
+ scrollDuringRotateOrZoomEnabled?: WithDefault<boolean, true>;
652
653
  /**
653
654
  * If `false` the user won't be able to change the map region being displayed.
654
655
  *
@@ -656,7 +657,7 @@ export interface MapFabricNativeProps extends ViewProps {
656
657
  * @platform iOS: Supported
657
658
  * @platform Android: Supported
658
659
  */
659
- scrollEnabled?: boolean;
660
+ scrollEnabled?: WithDefault<boolean, true>;
660
661
  /**
661
662
  * A Boolean indicating whether the map displays extruded building information.
662
663
  *
@@ -664,7 +665,7 @@ export interface MapFabricNativeProps extends ViewProps {
664
665
  * @platform iOS: Not supported
665
666
  * @platform Android: Supported
666
667
  */
667
- showsBuildings?: boolean;
668
+ showsBuildings?: WithDefault<boolean, true>;
668
669
  /**
669
670
  * If `false` compass won't be displayed on the map.
670
671
  *
@@ -672,7 +673,7 @@ export interface MapFabricNativeProps extends ViewProps {
672
673
  * @platform iOS: Supported
673
674
  * @platform Android: Supported
674
675
  */
675
- showsCompass?: boolean;
676
+ showsCompass?: WithDefault<boolean, true>;
676
677
  /**
677
678
  * A Boolean indicating whether indoor level picker should be enabled.
678
679
  *
@@ -688,7 +689,7 @@ export interface MapFabricNativeProps extends ViewProps {
688
689
  * @platform iOS: Google Maps only
689
690
  * @platform Android: Supported
690
691
  */
691
- showsIndoors?: boolean;
692
+ showsIndoors?: WithDefault<boolean, true>;
692
693
  /**
693
694
  * If `false` hide the button to move map to the current user's location.
694
695
  *
@@ -696,33 +697,15 @@ export interface MapFabricNativeProps extends ViewProps {
696
697
  * @platform iOS: Google Maps only
697
698
  * @platform Android: Supported
698
699
  */
699
- showsMyLocationButton?: boolean;
700
- /**
701
- * If `false` points of interest won't be displayed on the map.
702
- * TODO: DEPRECATED? Doesn't seem to do anything
703
- *
704
- * @default true
705
- * @platform iOS: Maybe Apple Maps?
706
- * @platform Android: Not supported
707
- */
708
- showsPointsOfInterest?: boolean;
700
+ showsMyLocationButton?: WithDefault<boolean, true>;
709
701
  /**
710
702
  * A Boolean indicating whether the map shows scale information.
711
703
  *
712
- * @default true
704
+ * @default false
713
705
  * @platform iOS: Apple Maps only
714
706
  * @platform Android: Not supported
715
707
  */
716
708
  showsScale?: boolean;
717
- /**
718
- * A Boolean value indicating whether the map displays traffic information.
719
- * TODO: Look into android support
720
- *
721
- * @default false
722
- * @platform iOS: Supported
723
- * @platform Android: Not supported?
724
- */
725
- showsTraffic?: boolean;
726
709
  /**
727
710
  * If `true` the users location will be displayed on the map.
728
711
  *
@@ -748,13 +731,13 @@ export interface MapFabricNativeProps extends ViewProps {
748
731
  * @platform iOS: Not supported
749
732
  * @platform Android: Supported
750
733
  */
751
- toolbarEnabled?: boolean;
734
+ toolbarEnabled?: WithDefault<boolean, true>;
752
735
  /**
753
736
  * Sets the map to the style selected.
754
737
  *
755
738
  * @default System setting
756
- * @platform iOS: Apple Maps only (iOS >= 13.0)
757
- * @platform Android: Not supported
739
+ * @platform iOS: Supported
740
+ * @platform Android: Supported
758
741
  */
759
742
  userInterfaceStyle?: WithDefault<'system' | 'light' | 'dark', 'system'>;
760
743
  /**
@@ -784,7 +767,7 @@ export interface MapFabricNativeProps extends ViewProps {
784
767
  * @platform iOS: Not supported
785
768
  * @platform Android: Supported
786
769
  */
787
- userLocationFastestInterval?: Int32;
770
+ userLocationFastestInterval?: WithDefault<Int32, 5000>;
788
771
  /**
789
772
  * Set power priority of user location tracking.
790
773
  *
@@ -804,7 +787,7 @@ export interface MapFabricNativeProps extends ViewProps {
804
787
  * @platform iOS: Not supported
805
788
  * @platform Android: Supported
806
789
  */
807
- userLocationUpdateInterval?: Int32;
790
+ userLocationUpdateInterval?: WithDefault<Int32, 5000>;
808
791
  /**
809
792
  * If `false` the zoom control at the bottom right of the map won't be visible.
810
793
  *
@@ -812,7 +795,7 @@ export interface MapFabricNativeProps extends ViewProps {
812
795
  * @platform iOS: Not supported
813
796
  * @platform Android: Supported
814
797
  */
815
- zoomControlEnabled?: boolean;
798
+ zoomControlEnabled?: WithDefault<boolean, true>;
816
799
  /**
817
800
  * If `false` the user won't be able to pinch/zoom the map.
818
801
  *
@@ -822,7 +805,15 @@ export interface MapFabricNativeProps extends ViewProps {
822
805
  * @platform iOS: Supported
823
806
  * @platform Android: Supported
824
807
  */
825
- zoomEnabled?: boolean;
808
+ zoomEnabled?: WithDefault<boolean, true>;
809
+ /**
810
+ * A Boolean value indicating whether the map displays traffic information.
811
+ *
812
+ * @default false
813
+ * @platform iOS: Google Maps only
814
+ * @platform Android: Supported
815
+ */
816
+ showsTraffic?: boolean;
826
817
  /**
827
818
  * If `false` the user won't be able to double tap to zoom the map.
828
819
  * **Note:** But it will greatly decrease delay of tap gesture recognition.
@@ -831,7 +822,7 @@ export interface MapFabricNativeProps extends ViewProps {
831
822
  * @platform iOS: Google Maps only
832
823
  * @platform Android: Not supported
833
824
  */
834
- zoomTapEnabled?: boolean;
825
+ zoomTapEnabled?: WithDefault<boolean, true>;
835
826
  /**
836
827
  * Map camera distance limits. `minCenterCoordinateDistance` for minimum distance, `maxCenterCoordinateDistance` for maximum.
837
828
  * `animated` for animated zoom changes.
@@ -849,6 +840,7 @@ export interface NativeCommands {
849
840
  fitToElements: (viewRef: React.ElementRef<React.ComponentType>, edgePaddingJSON: string, animated: boolean) => void;
850
841
  fitToSuppliedMarkers: (viewRef: React.ElementRef<React.ComponentType>, markersJSON: string, edgePaddingJSON: string, animated: boolean) => void;
851
842
  fitToCoordinates: (viewRef: React.ElementRef<React.ComponentType>, coordinatesJSON: string, edgePaddingJSON: string, animated: boolean) => void;
843
+ setIndoorActiveLevelIndex: (viewRef: React.ElementRef<React.ComponentType>, activeLevelIndex: Int32) => void;
852
844
  }
853
845
  export declare const Commands: NativeCommands;
854
846
  declare const _default: HostComponent<MapFabricNativeProps>;
@@ -14,8 +14,7 @@ exports.Commands = (0, codegenNativeCommands_1.default)({
14
14
  'fitToElements',
15
15
  'fitToSuppliedMarkers',
16
16
  'fitToCoordinates',
17
+ 'setIndoorActiveLevelIndex',
17
18
  ],
18
19
  });
19
- exports.default = (0, codegenNativeComponent_1.default)('RNMapsMapView', {
20
- excludedPlatforms: ['android'],
21
- });
20
+ exports.default = (0, codegenNativeComponent_1.default)('RNMapsMapView', {});
@@ -0,0 +1,258 @@
1
+ /// <reference types="react" />
2
+ import { HostComponent } from 'react-native';
3
+ import type { ViewProps, ColorValue, ImageSourcePropType as ImageSource } from 'react-native';
4
+ import { Int32, Double, BubblingEventHandler, DirectEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
5
+ export type LatLng = Readonly<{
6
+ latitude: Double;
7
+ longitude: Double;
8
+ }>;
9
+ export type MarkerPressEventHandler = BubblingEventHandler<Readonly<{
10
+ action: string;
11
+ id?: string;
12
+ coordinate?: {
13
+ latitude: Double;
14
+ longitude: Double;
15
+ };
16
+ position?: {
17
+ x: Double;
18
+ y: Double;
19
+ };
20
+ }>>;
21
+ export type MarkerDragEventHandler = DirectEventHandler<Readonly<{
22
+ id?: string;
23
+ coordinate?: {
24
+ latitude: Double;
25
+ longitude: Double;
26
+ };
27
+ }>>;
28
+ export type CalloutPressEventHandler = BubblingEventHandler<Readonly<{
29
+ action: string;
30
+ id?: string;
31
+ frame?: {
32
+ x: Double;
33
+ y: Double;
34
+ width: Double;
35
+ height: Double;
36
+ };
37
+ point?: {
38
+ x: Double;
39
+ y: Double;
40
+ };
41
+ }>>;
42
+ type AppleMarkerVisibility = 'hidden' | 'adaptive' | 'visible';
43
+ export type AppleMarkerPriority = 'required' | 'high' | 'low';
44
+ export type Point = Readonly<{
45
+ x: Double;
46
+ y: Double;
47
+ }>;
48
+ export interface MarkerFabricNativeProps extends ViewProps {
49
+ /**
50
+ * Sets the anchor point for the marker.
51
+ * The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.
52
+ *
53
+ * The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
54
+ * where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
55
+ *
56
+ * The anchoring point in a W x H image is the nearest discrete grid point in a (W + 1) x (H + 1) grid, obtained by scaling the then rounding.
57
+ * For example, in a 4 x 2 image, the anchor point (0.7, 0.6) resolves to the grid point at (3, 1).
58
+ *
59
+ * @default {x: 0.5, y: 1.0}
60
+ * @platform iOS: Google Maps only. For Apple Maps, see the `centerOffset` prop
61
+ * @platform Android: Supported
62
+ */
63
+ anchor?: Point;
64
+ /**
65
+ * Specifies the point in the marker image at which to anchor the callout when it is displayed.
66
+ * This is specified in the same coordinate system as the anchor.
67
+ *
68
+ * See the `anchor` prop for more details.
69
+ *
70
+ * @default {x: 0.5, y: 0.0}
71
+ * @platform iOS: Google Maps only. For Apple Maps, see the `calloutOffset` prop
72
+ * @platform Android: Supported
73
+ */
74
+ calloutAnchor?: Point;
75
+ /**
76
+ * A custom image to be used as the marker's icon. Only local image resources are allowed to be used.
77
+ *
78
+ * @platform iOS: Supported
79
+ * @platform Android: Supported
80
+ */
81
+ image?: ImageSource | null;
82
+ /**
83
+ * The offset (in points) at which to place the callout bubble.
84
+ * When this property is set to (0, 0),
85
+ * the anchor point of the callout bubble is placed on the top-center point of the marker view’s frame.
86
+ *
87
+ * Specifying positive offset values moves the callout bubble down and to the right,
88
+ * while specifying negative values moves it up and to the left
89
+ *
90
+ * @default {x: 0.0, y: 0.0}
91
+ * @platform iOS: Apple Maps only. For Google Maps, see the `calloutAnchor` prop
92
+ * @platform Android: Not supported. See the `calloutAnchor` prop
93
+ */
94
+ calloutOffset?: Point;
95
+ /**
96
+ Constants that indicates the display priority for annotations.
97
+ @default required
98
+ @platform iOS: Apple Maps only.
99
+ @platform Android: Not supported
100
+
101
+ Required: A constant indicating that the item is required.
102
+ High: A constant indicating that the item’s display priority is high.
103
+ Low: A constant indicating that the item’s display priority is Low.
104
+ */
105
+ displayPriority?: WithDefault<AppleMarkerPriority, 'required'>;
106
+ /**
107
+ * The coordinate for the marker.
108
+ *
109
+ * @platform iOS: Supported
110
+ * @platform Android: Supported
111
+ */
112
+ coordinate: LatLng;
113
+ /**
114
+ * The description of the marker.
115
+ *
116
+ * This is only used if the <Marker /> component has no children that are a `<Callout />`,
117
+ * in which case the default callout behavior will be used,
118
+ * which will show both the `title` and the `description`, if provided.
119
+ *
120
+ * @platform iOS: Supported
121
+ * @platform Android: Supported
122
+ */
123
+ description?: string;
124
+ /**
125
+ * if `true` allows the marker to be draggable (re-positioned).
126
+ *
127
+ * @default false
128
+ * @platform iOS: Supported
129
+ * @platform Android: Supported
130
+ */
131
+ draggable?: boolean;
132
+ /**
133
+ * The title of the marker.
134
+ * This is only used if the <Marker /> component has no `<Callout />` children.
135
+ *
136
+ * If the marker has <Callout /> children, default callout behavior will be used,
137
+ * which will show both the `title` and the `description`, if provided.
138
+ *
139
+ * @platform iOS: Supported
140
+ * @platform Android: Supported
141
+ */
142
+ title?: string;
143
+ /**
144
+ * A string that can be used to identify this marker.
145
+ *
146
+ * @platform iOS: Supported
147
+ * @platform Android: Supported
148
+ */
149
+ identifier?: string;
150
+ /**
151
+ * When true, the marker will be pre-selected.
152
+ * Setting this to true allows the user to drag the marker without needing to tap on it first to focus it.
153
+ *
154
+ * @default false
155
+ * @platform iOS: Apple Maps only
156
+ * @platform Android: Not supported
157
+ */
158
+ isPreselected?: boolean;
159
+ /**
160
+ * Callback that is called when the user taps the callout view.
161
+ *
162
+ * @platform iOS: Apple Maps only
163
+ * @platform Android: Supported
164
+ */
165
+ onCalloutPress?: CalloutPressEventHandler;
166
+ /**
167
+ * Callback that is called when the marker is deselected, before the callout is hidden.
168
+ *
169
+ * @platform iOS: Apple Maps only
170
+ * @platform Android: supported
171
+ */
172
+ onDeselect?: MarkerPressEventHandler;
173
+ /**
174
+ * Callback called continuously as the marker is dragged
175
+ *
176
+ * @platform iOS: Apple Maps only
177
+ * @platform Android: Supported
178
+ */
179
+ onDrag?: MarkerDragEventHandler;
180
+ /**
181
+ * Callback that is called when a drag on the marker finishes.
182
+ * This is usually the point you will want to setState on the marker's coordinate again
183
+ *
184
+ * @platform iOS: Apple Maps only
185
+ * @platform Android: Supported
186
+ */
187
+ onDragEnd?: MarkerDragEventHandler;
188
+ /**
189
+ * Callback that is called when the user initiates a drag on the marker (if it is draggable)
190
+ *
191
+ * @platform iOS: Apple Maps only
192
+ * @platform Android: Supported
193
+ */
194
+ onDragStart?: MarkerDragEventHandler;
195
+ /**
196
+ * Callback that is called when the marker is tapped by the user.
197
+ *
198
+ * @platform iOS: Supported
199
+ * @platform Android: Supported
200
+ */
201
+ onPress?: MarkerPressEventHandler;
202
+ /**
203
+ * Callback that is called when the marker becomes selected.
204
+ * This will be called when the callout for that marker is about to be shown.
205
+ *
206
+ * @platform iOS: Supported.
207
+ * @platform Android: Supported
208
+ */
209
+ onSelect?: MarkerPressEventHandler;
210
+ /**
211
+ * The marker's opacity between 0.0 and 1.0.
212
+ *
213
+ * @default 1.0
214
+ * @platform iOS: Supported
215
+ * @platform Android: Supported
216
+ */
217
+ opacity?: WithDefault<Double, 1.0>;
218
+ /**
219
+ * If no custom marker view or custom image is provided, the platform default pin will be used, which can be customized by this color.
220
+ * Ignored if a custom marker is being used.<br/><br/>
221
+ * For Android, the set of available colors is limited. Unsupported colors will fall back to red.
222
+ * See [#887](https://github.com/react-community/react-native-maps/issues/887) for more information.
223
+ *
224
+ * @platform iOS: Supported
225
+ * @platform Android: Supported
226
+ */
227
+ pinColor?: ColorValue;
228
+ /**
229
+ * Visibility of the title text rendered beneath Marker balloon
230
+ * @platform iOS: Apple Maps only
231
+ * @platform Android: Not supported
232
+ */
233
+ titleVisibility?: WithDefault<AppleMarkerVisibility, 'visible'>;
234
+ /**
235
+ * Visibility of the subtitle text rendered beneath Marker balloon
236
+ * @platform iOS: Apple Maps only
237
+ * @platform Android: Not supported
238
+ */
239
+ subtitleVisibility?: WithDefault<AppleMarkerVisibility, 'adaptive'>;
240
+ /**
241
+ * Indicate type of default markers if it's true MKPinAnnotationView will be used and MKMarkerAnnotationView if it's false
242
+ * It doesn't change anything if you are using custom Markers
243
+ * @platform iOS: Apple Maps only
244
+ * @platform Android: Not supported
245
+ */
246
+ useLegacyPinView?: boolean;
247
+ }
248
+ export interface NativeCommands {
249
+ animateToCoordinates: (viewRef: React.ElementRef<React.ComponentType>, latitude: Double, longitude: Double, duration: Int32) => void;
250
+ setCoordinates: (viewRef: React.ElementRef<React.ComponentType>, latitude: Double, longitude: Double) => void;
251
+ showCallout: (viewRef: React.ElementRef<React.ComponentType>) => void;
252
+ hideCallout: (viewRef: React.ElementRef<React.ComponentType>) => void;
253
+ redrawCallout: (viewRef: React.ElementRef<React.ComponentType>) => void;
254
+ redraw: (viewRef: React.ElementRef<React.ComponentType>) => void;
255
+ }
256
+ export declare const Commands: NativeCommands;
257
+ declare const _default: HostComponent<MarkerFabricNativeProps>;
258
+ export default _default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Commands = void 0;
7
+ const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
+ const codegenNativeCommands_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeCommands"));
9
+ exports.Commands = (0, codegenNativeCommands_1.default)({
10
+ supportedCommands: [
11
+ 'setCoordinates',
12
+ 'animateToCoordinates',
13
+ 'showCallout',
14
+ 'hideCallout',
15
+ 'redrawCallout',
16
+ 'redraw',
17
+ ],
18
+ });
19
+ exports.default = (0, codegenNativeComponent_1.default)('RNMapsMarker', {});
@@ -0,0 +1,101 @@
1
+ import type { HostComponent, ViewProps, ColorValue } from 'react-native';
2
+ import { Double, Float, BubblingEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
3
+ export type LatLng = Readonly<{
4
+ latitude: Double;
5
+ longitude: Double;
6
+ }>;
7
+ export type PolylinePressEventHandler = BubblingEventHandler<Readonly<{
8
+ action?: string;
9
+ id: string;
10
+ coordinate: {
11
+ latitude: Double;
12
+ longitude: Double;
13
+ };
14
+ position?: {
15
+ x: Double;
16
+ y: Double;
17
+ };
18
+ }>>;
19
+ export interface PolylineFabricNativeProps extends ViewProps {
20
+ /**
21
+ * An array of coordinates to describe the polygon
22
+ *
23
+ * @platform iOS: Supported
24
+ * @platform Android: Supported
25
+ */
26
+ coordinates: ReadonlyArray<LatLng>;
27
+ /**
28
+ * Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
29
+ * A geodesic is the shortest path between two points on the Earth's surface.
30
+ * The geodesic curve is constructed assuming the Earth is a sphere.
31
+ *
32
+ * @platform iOS: Google Maps only
33
+ * @platform Android: Supported
34
+ */
35
+ geodesic?: boolean;
36
+ /**
37
+ * The line cap style to apply to the open ends of the path
38
+ *
39
+ * @default `round`
40
+ * @platform iOS: Apple Maps only
41
+ * @platform Android: supported
42
+ * */
43
+ lineCap?: WithDefault<'butt' | 'round' | 'square', 'butt'>;
44
+ /**
45
+ * An array of numbers specifying the dash pattern to use for the path.
46
+ * The array contains one or more numbers that indicate the lengths (measured in points)
47
+ * of the line segments and gaps in the pattern.
48
+ * The values in the array alternate, starting with the first line segment length,
49
+ * followed by the first gap length, followed by the second line segment length, and so on.
50
+ *
51
+ * @platform iOS: Apple Maps only
52
+ * @platform Android: supported
53
+ */
54
+ lineDashPattern?: ReadonlyArray<Double>;
55
+ /**
56
+ * The line join style to apply to corners of the path.
57
+ *
58
+ * @platform iOS: Apple Maps only
59
+ * @platform Android: supported
60
+ */
61
+ lineJoin?: WithDefault<'miter' | 'round' | 'bevel', 'miter'>;
62
+ /**
63
+ * Callback that is called when user taps on the map.
64
+ *
65
+ * @platform iOS: Supported
66
+ * @platform Android: Supported
67
+ */
68
+ onPress?: PolylinePressEventHandler;
69
+ /**
70
+ * The stroke color to use for the path.
71
+ *
72
+ * @default `#000`, `rgba(r,g,b,0.5)`
73
+ * @platform iOS: Supported
74
+ * @platform Android: Supported
75
+ */
76
+ strokeColor?: ColorValue;
77
+ /**
78
+ * The stroke colors to use for the path.
79
+ * @default `#000`, `rgba(r,g,b,0.5)`
80
+ * @platform iOS: Supported
81
+ * @platform Android: Supported
82
+ */
83
+ strokeColors?: ReadonlyArray<ColorValue>;
84
+ /**
85
+ * The stroke width to use for the path.
86
+ *
87
+ * @default 1
88
+ * @platform iOS: Supported
89
+ * @platform Android: Supported
90
+ */
91
+ strokeWidth?: Float;
92
+ /**
93
+ * Boolean to allow a polygon to be tappable and use the onPress function.
94
+ *
95
+ * @platform iOS: Google Maps only
96
+ * @platform Android: Supported
97
+ */
98
+ tappable?: boolean;
99
+ }
100
+ declare const _default: HostComponent<PolylineFabricNativeProps>;
101
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
7
+ exports.default = (0, codegenNativeComponent_1.default)('RNMapsPolyline', {});