react-native-maps 1.21.0-alpha.13 → 1.21.0-alpha.131

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 (243) hide show
  1. package/android/build.gradle +73 -53
  2. package/android/gradlew +1 -2
  3. package/android/src/main/RCTAppDependencyProvider.h +25 -0
  4. package/android/src/main/RCTAppDependencyProvider.mm +55 -0
  5. package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
  6. package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
  7. package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
  8. package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
  9. package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
  10. package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
  11. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
  12. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
  13. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
  14. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
  15. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
  16. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
  17. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +206 -0
  18. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +73 -0
  19. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
  20. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
  21. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +46 -0
  22. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +23 -0
  23. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
  24. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
  25. package/android/src/main/java/com/rnmaps/fabric/CalloutManager.java +77 -0
  26. package/android/src/main/java/com/rnmaps/fabric/CircleManager.java +94 -0
  27. package/android/src/main/java/com/rnmaps/fabric/JSONUtil.java +86 -0
  28. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +619 -0
  29. package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +258 -0
  30. package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +235 -2
  31. package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +95 -0
  32. package/android/src/main/java/com/rnmaps/fabric/PolygonManager.java +89 -0
  33. package/android/src/main/java/com/rnmaps/fabric/PolylineManager.java +121 -0
  34. package/android/src/main/java/com/rnmaps/fabric/event/OnCalloutPressEvent.java +25 -0
  35. package/android/src/main/java/com/rnmaps/fabric/event/OnDeselectEvent.java +28 -0
  36. package/android/src/main/java/com/rnmaps/fabric/event/OnDoublePressEvent.java +27 -0
  37. package/android/src/main/java/com/rnmaps/fabric/event/OnDragEndEvent.java +28 -0
  38. package/android/src/main/java/com/rnmaps/fabric/event/OnDragEvent.java +28 -0
  39. package/android/src/main/java/com/rnmaps/fabric/event/OnDragStartEvent.java +28 -0
  40. package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorBuildingFocusedEvent.java +28 -0
  41. package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorLevelActivatedEvent.java +28 -0
  42. package/android/src/main/java/com/rnmaps/fabric/event/OnKmlReadyEvent.java +28 -0
  43. package/android/src/main/java/com/rnmaps/fabric/event/OnLongPressEvent.java +28 -0
  44. package/android/src/main/java/com/rnmaps/fabric/event/OnMapLoadedEvent.java +29 -0
  45. package/android/src/main/java/com/rnmaps/fabric/event/OnMapReadyEvent.java +29 -0
  46. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDeselectEvent.java +28 -0
  47. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEndEvent.java +28 -0
  48. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEvent.java +28 -0
  49. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragStartEvent.java +28 -0
  50. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerPressEvent.java +28 -0
  51. package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerSelectEvent.java +28 -0
  52. package/android/src/main/java/com/rnmaps/fabric/event/OnPanDragEvent.java +28 -0
  53. package/android/src/main/java/com/rnmaps/fabric/event/OnPoiClickEvent.java +27 -0
  54. package/android/src/main/java/com/rnmaps/fabric/event/OnPressEvent.java +27 -0
  55. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeCompleteEvent.java +30 -0
  56. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeEvent.java +48 -0
  57. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeStartEvent.java +33 -0
  58. package/android/src/main/java/com/rnmaps/fabric/event/OnSelectEvent.java +28 -0
  59. package/android/src/main/java/com/rnmaps/fabric/event/OnUserLocationChangeEvent.java +28 -0
  60. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +40 -4
  61. package/android/src/main/java/com/rnmaps/maps/MapCallout.java +18 -0
  62. package/android/src/main/java/com/rnmaps/maps/MapCircle.java +24 -0
  63. package/android/src/main/java/com/rnmaps/maps/MapManager.java +14 -14
  64. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +637 -556
  65. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
  66. package/android/src/main/java/com/rnmaps/maps/MapModule.java +206 -206
  67. package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +267 -151
  68. package/android/src/main/java/com/rnmaps/maps/MapPolygon.java +31 -1
  69. package/android/src/main/java/com/rnmaps/maps/MapPolyline.java +207 -141
  70. package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -16
  71. package/android/src/main/java/com/rnmaps/maps/MapView.java +1650 -1337
  72. package/android/src/main/jni/CMakeLists.txt +36 -0
  73. package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
  74. package/android/src/main/jni/RNMapsSpecs.h +31 -0
  75. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  76. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +31 -0
  77. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +977 -0
  78. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +846 -0
  79. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +193 -0
  80. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1223 -0
  81. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
  82. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
  83. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +24 -0
  84. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +109 -0
  85. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
  86. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +113 -0
  87. package/ios/AirGoogleMaps/AIRGoogleMap.h +10 -11
  88. package/ios/AirGoogleMaps/AIRGoogleMap.m +103 -69
  89. package/ios/AirGoogleMaps/AIRGoogleMapCircle.m +23 -11
  90. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +10 -9
  91. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +6 -3
  92. package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
  93. package/ios/AirGoogleMaps/AIRGoogleMapPolygon.m +3 -0
  94. package/ios/AirGoogleMaps/AIRGoogleMapPolyline.h +0 -1
  95. package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +0 -7
  96. package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
  97. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.h +1 -1
  98. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +4 -4
  99. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +1 -1
  100. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +112 -43
  101. package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
  102. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.h +26 -0
  103. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +217 -0
  104. package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +26 -0
  105. package/ios/AirMaps/AIRMap.h +8 -9
  106. package/ios/AirMaps/AIRMap.m +222 -239
  107. package/ios/AirMaps/AIRMapManager.m +10 -7
  108. package/ios/AirMaps/AIRMapMarker.h +1 -0
  109. package/ios/AirMaps/AIRMapMarker.m +165 -103
  110. package/ios/AirMaps/Callout/SMCalloutView.m +1 -1
  111. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +28 -0
  112. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +68 -0
  113. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
  114. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +43 -0
  115. package/ios/AirMaps/RNMapsAirModule.h +1 -1
  116. package/ios/AirMaps/RNMapsAirModule.mm +4 -3
  117. package/ios/AirMaps/RNMapsDefines.h +0 -0
  118. package/ios/AirMaps/RNMapsMapView.h +1 -1
  119. package/ios/AirMaps/RNMapsMapView.mm +119 -95
  120. package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
  121. package/ios/AirMaps/RNMapsMarkerView.h +24 -0
  122. package/ios/AirMaps/RNMapsMarkerView.mm +430 -0
  123. package/ios/AirMaps/RNMapsMarkerViewManager.mm +28 -0
  124. package/ios/AirMaps.xcodeproj/project.pbxproj +20 -0
  125. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  126. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  127. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  128. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  129. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  130. package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  131. package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +2 -2
  132. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  133. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
  134. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
  135. package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
  136. package/ios/generated/RNMapsSpecs/Props.cpp +193 -0
  137. package/ios/generated/RNMapsSpecs/Props.h +1223 -0
  138. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
  139. package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
  140. package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
  141. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
  142. package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
  143. package/ios/generated/RNMapsSpecs/States.cpp +16 -0
  144. package/ios/generated/RNMapsSpecs/States.h +113 -0
  145. package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
  146. package/ios/generated/RNMapsSpecsJSI.h +268 -0
  147. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  148. package/package.json +25 -18
  149. package/react-native-google-maps.podspec +26 -0
  150. package/react-native-maps-generated.podspec +31 -0
  151. package/react-native-maps.podspec +55 -15
  152. package/react-native.config.js +16 -0
  153. package/src/AnimatedRegion.ts +169 -0
  154. package/src/Geojson.tsx +541 -0
  155. package/src/MapCallout.tsx +77 -0
  156. package/src/MapCalloutSubview.tsx +64 -0
  157. package/src/MapCircle.tsx +162 -0
  158. package/src/MapHeatmap.tsx +125 -0
  159. package/src/MapLocalTile.tsx +60 -0
  160. package/src/MapMarker.tsx +531 -0
  161. package/src/MapMarkerNativeComponent.ts +51 -0
  162. package/src/MapOverlay.tsx +156 -0
  163. package/src/MapPolygon.tsx +188 -0
  164. package/src/MapPolygon.types.ts +25 -0
  165. package/src/MapPolyline.tsx +215 -0
  166. package/src/MapUrlTile.tsx +169 -0
  167. package/src/MapView.tsx +1223 -0
  168. package/src/MapView.types.ts +212 -0
  169. package/src/MapView.web.ts +2 -0
  170. package/src/MapViewNativeComponent.ts +86 -0
  171. package/src/MapWMSTile.tsx +148 -0
  172. package/src/ProviderConstants.ts +2 -0
  173. package/src/createFabricMap.tsx +253 -0
  174. package/src/decorateMapComponent.ts +219 -0
  175. package/src/fixImageProp.ts +17 -0
  176. package/src/index.ts +52 -0
  177. package/src/sharedTypes.ts +101 -0
  178. package/src/specs/NativeAirMapsModule.ts +36 -0
  179. package/src/specs/NativeComponentCallout.ts +63 -0
  180. package/src/specs/NativeComponentCircle.ts +93 -0
  181. package/src/specs/NativeComponentGoogleMapView.ts +913 -0
  182. package/src/specs/NativeComponentGooglePolygon.ts +94 -0
  183. package/src/specs/NativeComponentMapView.ts +1091 -0
  184. package/src/specs/NativeComponentMarker.ts +326 -0
  185. package/src/specs/NativeComponentOverlay.ts +89 -0
  186. package/src/specs/NativeComponentPolyline.ts +124 -0
  187. package/lib/AnimatedRegion.d.ts +0 -19
  188. package/lib/AnimatedRegion.js +0 -134
  189. package/lib/Geojson.d.ts +0 -204
  190. package/lib/Geojson.js +0 -166
  191. package/lib/MapCallout.d.ts +0 -40
  192. package/lib/MapCallout.js +0 -51
  193. package/lib/MapCalloutSubview.d.ts +0 -34
  194. package/lib/MapCalloutSubview.js +0 -48
  195. package/lib/MapCircle.d.ts +0 -117
  196. package/lib/MapCircle.js +0 -53
  197. package/lib/MapHeatmap.d.ts +0 -78
  198. package/lib/MapHeatmap.js +0 -59
  199. package/lib/MapLocalTile.d.ts +0 -35
  200. package/lib/MapLocalTile.js +0 -44
  201. package/lib/MapMarker.d.ts +0 -309
  202. package/lib/MapMarker.js +0 -116
  203. package/lib/MapMarkerNativeComponent.d.ts +0 -15
  204. package/lib/MapMarkerNativeComponent.js +0 -17
  205. package/lib/MapOverlay.d.ts +0 -87
  206. package/lib/MapOverlay.js +0 -63
  207. package/lib/MapPolygon.d.ts +0 -140
  208. package/lib/MapPolygon.js +0 -53
  209. package/lib/MapPolygon.types.d.ts +0 -18
  210. package/lib/MapPolygon.types.js +0 -2
  211. package/lib/MapPolyline.d.ts +0 -156
  212. package/lib/MapPolyline.js +0 -53
  213. package/lib/MapUrlTile.d.ts +0 -134
  214. package/lib/MapUrlTile.js +0 -44
  215. package/lib/MapView.d.ts +0 -715
  216. package/lib/MapView.js +0 -447
  217. package/lib/MapView.types.d.ts +0 -161
  218. package/lib/MapView.types.js +0 -2
  219. package/lib/MapView.web.d.ts +0 -1
  220. package/lib/MapView.web.js +0 -9
  221. package/lib/MapViewNativeComponent.d.ts +0 -18
  222. package/lib/MapViewNativeComponent.js +0 -19
  223. package/lib/MapWMSTile.d.ts +0 -116
  224. package/lib/MapWMSTile.js +0 -44
  225. package/lib/ProviderConstants.d.ts +0 -2
  226. package/lib/ProviderConstants.js +0 -5
  227. package/lib/createFabricMap.d.ts +0 -23
  228. package/lib/createFabricMap.js +0 -175
  229. package/lib/decorateMapComponent.d.ts +0 -36
  230. package/lib/decorateMapComponent.js +0 -80
  231. package/lib/index.d.ts +0 -38
  232. package/lib/index.js +0 -81
  233. package/lib/sharedTypes.d.ts +0 -81
  234. package/lib/sharedTypes.js +0 -2
  235. package/lib/sharedTypesInternal.js +0 -2
  236. package/lib/specs/NativeAirMapsModule.d.ts +0 -31
  237. package/lib/specs/NativeAirMapsModule.js +0 -4
  238. package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
  239. package/lib/specs/NativeComponentGoogleMapView.js +0 -21
  240. package/lib/specs/NativeComponentMapView.d.ts +0 -855
  241. package/lib/specs/NativeComponentMapView.js +0 -21
  242. /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
  243. /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
@@ -1,855 +0,0 @@
1
- /// <reference types="react" />
2
- import type { HostComponent, ViewProps, ColorValue } from 'react-native';
3
- import { Double, Int32, WithDefault, Float, DirectEventHandler, BubblingEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
4
- export type EdgePadding = Readonly<{
5
- top: Double;
6
- right: Double;
7
- bottom: Double;
8
- left: Double;
9
- }>;
10
- export type ActionType = 'callout-press' | 'press' | 'marker-press' | 'long-press' | 'marker-deselect' | 'marker-select';
11
- export type Frame = Readonly<{
12
- x: Double;
13
- y: Double;
14
- width: Double;
15
- height: Double;
16
- }>;
17
- export type ClickEvent = BubblingEventHandler<Readonly<{
18
- coordinate: {
19
- latitude: Double;
20
- longitude: Double;
21
- };
22
- position: {
23
- x: Double;
24
- y: Double;
25
- };
26
- }>>;
27
- export type KmlMarker = {
28
- id: string;
29
- title: string;
30
- description: string;
31
- coordinate: {
32
- latitude: Double;
33
- longitude: Double;
34
- };
35
- position: {
36
- x: Double;
37
- y: Double;
38
- };
39
- };
40
- export type LongPressEventHandler = BubblingEventHandler<Readonly<{
41
- coordinate: {
42
- latitude: Double;
43
- longitude: Double;
44
- };
45
- position: {
46
- x: Double;
47
- y: Double;
48
- };
49
- action?: string;
50
- }>>;
51
- export type MarkerDeselectEventHandler = BubblingEventHandler<Readonly<{
52
- action?: string;
53
- id: string;
54
- coordinate: {
55
- latitude: Double;
56
- longitude: Double;
57
- };
58
- }>>;
59
- export type MarkerSelectEventHandler = BubblingEventHandler<Readonly<{
60
- action?: string;
61
- id: string;
62
- coordinate: {
63
- latitude: Double;
64
- longitude: Double;
65
- };
66
- }>>;
67
- export type CalloutPressEvent = BubblingEventHandler<{
68
- action?: string;
69
- /**
70
- * @platform iOS
71
- */
72
- frame?: {
73
- x: Double;
74
- y: Double;
75
- width: Double;
76
- height: Double;
77
- };
78
- /**
79
- * @platform iOS
80
- */
81
- id?: string;
82
- /**
83
- * @platform iOS
84
- */
85
- point?: {
86
- x: Double;
87
- y: Double;
88
- };
89
- /**
90
- * @platform Android
91
- */
92
- coordinate?: {
93
- latitude: Double;
94
- longitude: Double;
95
- };
96
- /**
97
- * @platform Android
98
- */
99
- position?: {
100
- x: Double;
101
- y: Double;
102
- };
103
- }>;
104
- export type CalloutPressEventHandler = DirectEventHandler<CalloutPressEvent>;
105
- export type Camera = Readonly<{
106
- /**
107
- * Apple Maps
108
- */
109
- altitude?: Double;
110
- center: LatLng;
111
- heading: Double;
112
- pitch: Double;
113
- /**
114
- * Google Maps
115
- */
116
- zoom?: Float;
117
- }>;
118
- export type LatLng = Readonly<{
119
- latitude: Double;
120
- longitude: Double;
121
- }>;
122
- export type Point = Readonly<{
123
- x: Double;
124
- y: Double;
125
- }>;
126
- export type Region = Readonly<LatLng & {
127
- latitudeDelta: Double;
128
- longitudeDelta: Double;
129
- }>;
130
- export type IndoorLevel = Readonly<{
131
- index: Int32;
132
- name: string;
133
- shortName: string;
134
- }>;
135
- export type IndoorLevelActivatedEventHandler = DirectEventHandler<Readonly<{
136
- IndoorLevel: {
137
- activeLevelIndex: Int32;
138
- name: string;
139
- shortName: string;
140
- };
141
- }>>;
142
- export type IndoorBuilding = Readonly<{
143
- underground: boolean;
144
- activeLevelIndex: Int32;
145
- levels: ReadonlyArray<IndoorLevel>;
146
- }>;
147
- export type IndoorBuildingEventHandler = DirectEventHandler<Readonly<{
148
- IndoorBuilding: {
149
- underground: boolean;
150
- activeLevelIndex: Int32;
151
- };
152
- }>>;
153
- export type KmlMapEventHandler = DirectEventHandler<Readonly<{}>>;
154
- export type MapLoadedEventHandler = DirectEventHandler<Readonly<{}>>;
155
- export type MapReadyEventHandler = DirectEventHandler<Readonly<{}>>;
156
- export type Details = Readonly<{
157
- isGesture?: boolean;
158
- }>;
159
- export type MarkerDragEventHandler = BubblingEventHandler<Readonly<{
160
- coordinate: {
161
- latitude: Double;
162
- longitude: Double;
163
- };
164
- position: {
165
- x: Double;
166
- y: Double;
167
- };
168
- id?: string;
169
- }>>;
170
- export type MarkerDragStartEndEventHandler = BubblingEventHandler<Readonly<{
171
- coordinate: {
172
- latitude: Double;
173
- longitude: Double;
174
- };
175
- id?: string;
176
- position?: {
177
- x: Double;
178
- y: Double;
179
- };
180
- }>>;
181
- export type MarkerPressEventHandler = BubblingEventHandler<Readonly<{
182
- action?: string;
183
- id: string;
184
- coordinate: {
185
- latitude: Double;
186
- longitude: Double;
187
- };
188
- position?: {
189
- x: Double;
190
- y: Double;
191
- };
192
- }>>;
193
- export type PanDragEventHandler = BubblingEventHandler<Readonly<{
194
- coordinate: {
195
- latitude: Double;
196
- longitude: Double;
197
- };
198
- position: {
199
- x: Double;
200
- y: Double;
201
- };
202
- }>>;
203
- export type PoiClickEventHandler = BubblingEventHandler<Readonly<{
204
- placeId: string;
205
- name: string;
206
- coordinate: {
207
- latitude: Double;
208
- longitude: Double;
209
- };
210
- position?: {
211
- x: Double;
212
- y: Double;
213
- };
214
- }>>;
215
- export type MapPressEventHandler = BubblingEventHandler<Readonly<{
216
- coordinate: {
217
- latitude: Double;
218
- longitude: Double;
219
- };
220
- position: {
221
- x: Double;
222
- y: Double;
223
- };
224
- action?: string;
225
- }>>;
226
- export type RegionChangeStartEventHandler = DirectEventHandler<Details>;
227
- export type RegionChangeEvent = Readonly<{
228
- region: {
229
- latitude: Double;
230
- longitude: Double;
231
- latitudeDelta: Double;
232
- longitudeDelta: Double;
233
- };
234
- continuous?: boolean;
235
- }>;
236
- export type RegionChangeEventHandler = BubblingEventHandler<RegionChangeEvent>;
237
- export type UserLocationChangeEvent = Readonly<{
238
- coordinate?: {
239
- latitude: Double;
240
- longitude: Double;
241
- altitude: Double;
242
- timestamp: Double;
243
- accuracy: Float;
244
- speed: Float;
245
- heading: Float;
246
- /**
247
- * @platform iOS
248
- */
249
- altitudeAccuracy?: Float;
250
- /**
251
- * @platform Android
252
- */
253
- isFromMockProvider?: boolean;
254
- };
255
- /**
256
- * @platform iOS
257
- */
258
- error?: Readonly<{
259
- message: string;
260
- }>;
261
- }>;
262
- export type UserLocationChangeEventHandler = DirectEventHandler<UserLocationChangeEvent>;
263
- export type CameraZoomRange = Readonly<{
264
- minCenterCoordinateDistance?: Double;
265
- maxCenterCoordinateDistance?: Double;
266
- animated?: boolean;
267
- }>;
268
- export interface MapFabricNativeProps extends ViewProps {
269
- /**
270
- * If `true` map will be cached and displayed as an image instead of being interactable, for performance usage.
271
- *
272
- * @default false
273
- * @platform iOS: Apple Maps only
274
- * @platform Android: Supported
275
- */
276
- cacheEnabled?: boolean;
277
- /**
278
- * The camera view the map should display.
279
- *
280
- * Use the camera system, instead of the region system, if you need control over
281
- * the pitch or heading. Using this will ignore the `region` property.
282
- * @platform iOS: Supported
283
- * @platform Android: Supported
284
- */
285
- camera?: Camera;
286
- /**
287
- * If set, changes the position of the compass.
288
- *
289
- * @platform iOS: Apple Maps only
290
- * @platform Android: Not supported
291
- */
292
- compassOffset?: Point;
293
- /**
294
- * If `true` the map will focus on the user's location.
295
- * This only works if `showsUserLocation` is true and the user has shared their location.
296
- *
297
- * @default false
298
- * @platform iOS: Apple Maps only
299
- * @platform Android: Not supported
300
- */
301
- followsUserLocation?: boolean;
302
- /**
303
- * If `false` the map will not capture PoI clicks
304
- * This can improve click handling on the map for android
305
- *
306
- * @default true
307
- * @platform iOS: Not supported
308
- * @platform Android: supported
309
- */
310
- poiClickEnabled?: boolean;
311
- /**
312
- * The initial camera view the map should use. Use this prop instead of `camera`
313
- * only if you don't want to control the camera of the map besides the initial view.
314
- *
315
- * Use the camera system, instead of the region system, if you need control over
316
- * the pitch or heading.
317
- *
318
- * Changing this prop after the component has mounted will not result in a camera change.
319
- *
320
- * This is similar to the `initialValue` prop of a text input.
321
- *
322
- * @platform iOS: Supported
323
- * @platform Android: Supported
324
- */
325
- initialCamera?: Camera;
326
- /**
327
- * The initial region to be displayed by the map. Use this prop instead of `region`
328
- * only if you don't want to control the viewport of the map besides the initial region.
329
- *
330
- * Changing this prop after the component has mounted will not result in a region change.
331
- *
332
- * This is similar to the `initialValue` prop of a text input.
333
- *
334
- * @platform iOS: Supported
335
- * @platform Android: Supported
336
- */
337
- initialRegion?: Region;
338
- /**
339
- * The URL for KML file.
340
- *
341
- * @platform iOS: Google Maps only
342
- * @platform Android: Supported
343
- */
344
- kmlSrc?: string;
345
- /**
346
- * If set, changes the position of the "Legal" label link in Apple Maps.
347
- *
348
- * @platform iOS: Apple Maps only
349
- * @platform Android: Not supported
350
- */
351
- legalLabelInsets?: EdgePadding;
352
- /**
353
- * Enables lite mode on Android
354
- *
355
- * @platform iOS: Not supported
356
- * @platform Android: Supported
357
- */
358
- liteMode?: boolean;
359
- /**
360
- * https://developers.google.com/maps/documentation/get-map-id
361
- * google cloud mapId to enable cloud styling and more
362
- */
363
- googleMapId?: string;
364
- /**
365
- * https://developers.google.com/maps/documentation/android-sdk/renderer
366
- * google maps renderer
367
- * @default `LATEST`
368
- * @platform iOS: Not supported
369
- * @platform Android: Supported
370
- */
371
- googleRenderer?: WithDefault<'LATEST' | 'LEGACY', 'LATEST'>;
372
- /**
373
- * Sets loading background color.
374
- *
375
- * @default `#FFFFFF`
376
- * @platform iOS: Supported
377
- * @platform Android: Supported
378
- */
379
- loadingBackgroundColor?: ColorValue;
380
- /**
381
- * If `true` a loading indicator will show while the map is loading.
382
- *
383
- * @default false
384
- * @platform iOS: Apple Maps only
385
- * @platform Android: Supported
386
- */
387
- loadingEnabled?: boolean;
388
- /**
389
- * Sets loading indicator color.
390
- *
391
- * @default `#606060`
392
- * @platform iOS: Apple Maps only
393
- * @platform Android: Supported
394
- */
395
- loadingIndicatorColor?: ColorValue;
396
- /**
397
- * Adds custom padding to each side of the map. Useful when map elements/markers are obscured.
398
- *
399
- * @platform iOS: Supported
400
- * @platform Android: Supported
401
- */
402
- mapPadding?: EdgePadding;
403
- /**
404
- * The map type to be displayed
405
- *
406
- * @default `standard`
407
- * @platform iOS: hybrid | mutedStandard | satellite | standard | terrain | hybridFlyover | satelliteFlyover
408
- * @platform Android: hybrid | none | satellite | standard | terrain
409
- */
410
- mapType?: WithDefault<'hybrid' | 'mutedStandard' | 'none' | 'satellite' | 'standard' | 'terrain' | 'satelliteFlyover' | 'hybridFlyover', 'standard'>;
411
- /**
412
- * TODO: Add documentation
413
- *
414
- * @platform iOS: Apple Maps only
415
- * @platform Android: Not supported
416
- */
417
- maxDelta?: Double;
418
- /**
419
- * Maximum zoom value for the map, must be between 0 and 20
420
- *
421
- * @default 20
422
- * @platform iOS: Supported
423
- * @platform Android: Supported
424
- * @deprecated on Apple Maps, use `cameraZoomRange` instead
425
- */
426
- maxZoom?: Float;
427
- /**
428
- * TODO: Add documentation
429
- *
430
- * @platform iOS: Apple Maps only
431
- * @platform Android: Not supported
432
- */
433
- minDelta?: Double;
434
- /**
435
- * Minimum zoom value for the map, must be between 0 and 20
436
- *
437
- * @default 0
438
- * @platform iOS: Supported
439
- * @platform Android: Supported
440
- * @deprecated on Apple Maps, use `cameraZoomRange` instead
441
- */
442
- minZoom?: Float;
443
- /**
444
- * If `false` the map won't move to the marker when pressed.
445
- *
446
- * @default true
447
- * @platform iOS: Not supported
448
- * @platform Android: Supported
449
- */
450
- moveOnMarkerPress?: boolean;
451
- /**
452
- * Callback that is called when a callout is tapped by the user.
453
- *
454
- * @platform iOS: Apple Maps only
455
- * @platform Android: Supported
456
- */
457
- onCalloutPress?: CalloutPressEventHandler;
458
- /**
459
- * Callback that is called when user double taps on the map.
460
- *
461
- * @platform iOS: Apple Maps only
462
- * @platform Android: Supported
463
- */
464
- onDoublePress?: ClickEvent;
465
- /**
466
- * Callback that is called when an indoor building is focused/unfocused
467
- *
468
- * @platform iOS: Google Maps only
469
- * @platform Android: Supported
470
- */
471
- onIndoorBuildingFocused?: IndoorBuildingEventHandler;
472
- /**
473
- * Callback that is called when a level on indoor building is activated
474
- *
475
- * @platform iOS: Google Maps only
476
- * @platform Android: Supported
477
- */
478
- onIndoorLevelActivated?: IndoorLevelActivatedEventHandler;
479
- /**
480
- * Callback that is called once the kml is fully loaded.
481
- *
482
- * @platform iOS: Google Maps only
483
- * @platform Android: Supported
484
- */
485
- onKmlReady?: KmlMapEventHandler;
486
- /**
487
- * Callback that is called when user makes a "long press" somewhere on the map.
488
- *
489
- * @platform iOS: Supported
490
- * @platform Android: Supported
491
- */
492
- onLongPress?: LongPressEventHandler;
493
- /**
494
- * Callback that is called when the map has finished rendering all tiles.
495
- *
496
- * @platform iOS: Google Maps only
497
- * @platform Android: Supported
498
- */
499
- onMapLoaded?: MapLoadedEventHandler;
500
- /**
501
- * Callback that is called once the map is ready.
502
- *
503
- * Event is optional, as the first onMapReady callback is intercepted
504
- * on Android, and the event is not passed on.
505
- *
506
- * @platform iOS: Supported
507
- * @platform Android: Supported
508
- */
509
- onMapReady?: MapReadyEventHandler;
510
- /**
511
- * Callback that is called when a marker on the map becomes deselected.
512
- * This will be called when the callout for that marker is about to be hidden.
513
- *
514
- * @platform iOS: Supported
515
- * @platform Android: Supported
516
- */
517
- onMarkerDeselect?: MarkerDeselectEventHandler;
518
- /**
519
- * Callback called continuously as a marker is dragged
520
- *
521
- * @platform iOS: Apple Maps only
522
- * @platform Android: Supported
523
- */
524
- onMarkerDrag?: MarkerDragEventHandler;
525
- /**
526
- * Callback that is called when a drag on a marker finishes.
527
- * This is usually the point you will want to setState on the marker's coordinate again
528
- *
529
- * @platform iOS: Apple Maps only
530
- * @platform Android: Supported
531
- */
532
- onMarkerDragEnd?: MarkerDragStartEndEventHandler;
533
- /**
534
- * Callback that is called when the user initiates a drag on a marker (if it is draggable)
535
- *
536
- * @platform iOS: Apple Maps only
537
- * @platform Android: Supported
538
- */
539
- onMarkerDragStart?: MarkerDragStartEndEventHandler;
540
- /**
541
- * Callback that is called when a marker on the map is tapped by the user.
542
- *
543
- * @platform iOS: Supported
544
- * @platform Android: Supported
545
- */
546
- onMarkerPress?: MarkerPressEventHandler;
547
- /**
548
- * Callback that is called when a marker on the map becomes selected.
549
- * This will be called when the callout for that marker is about to be shown.
550
- *
551
- * @platform iOS: Supported.
552
- * @platform Android: Supported
553
- */
554
- onMarkerSelect?: MarkerSelectEventHandler;
555
- /**
556
- * Callback that is called when user presses and drags the map.
557
- * **NOTE**: for iOS `scrollEnabled` should be set to false to trigger the event
558
- *
559
- * @platform iOS: Supported
560
- * @platform Android: Supported
561
- */
562
- onPanDrag?: PanDragEventHandler;
563
- /**
564
- * Callback that is called when user click on a POI.
565
- *
566
- * @platform iOS: Google Maps only
567
- * @platform Android: Supported
568
- */
569
- onPoiClick?: PoiClickEventHandler;
570
- /**
571
- * Callback that is called when user taps on the map.
572
- *
573
- * @platform iOS: Supported
574
- * @platform Android: Supported
575
- */
576
- onPress?: MapPressEventHandler;
577
- /**
578
- * Callback that is called once before the region changes, such as when the user starts moving the map.
579
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
580
- * **Note**: `isGesture` is supported by Google Maps only.
581
- *
582
- * @platform iOS: Supported
583
- * @platform Android: Supported
584
- */
585
- onRegionChangeStart?: RegionChangeEventHandler;
586
- /**
587
- * Callback that is called continuously when the region changes, such as when a user is dragging the map.
588
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
589
- * **Note**: `isGesture` is supported by Google Maps only.
590
- *
591
- * @platform iOS: Supported
592
- * @platform Android: Supported
593
- */
594
- onRegionChange?: RegionChangeEventHandler;
595
- /**
596
- * Callback that is called once when the region changes, such as when the user is done moving the map.
597
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
598
- * **Note**: `isGesture` is supported by Google Maps only.
599
- *
600
- * @platform iOS: Supported
601
- * @platform Android: Supported
602
- */
603
- onRegionChangeComplete?: RegionChangeEventHandler;
604
- /**
605
- * Callback that is called when the underlying map figures our users current location
606
- * (coordinate also includes isFromMockProvider value for Android API 18 and above).
607
- * Make sure **showsUserLocation** is set to *true*.
608
- *
609
- * @platform iOS: Supported
610
- * @platform Android: Supported
611
- */
612
- onUserLocationChange?: UserLocationChangeEventHandler;
613
- /**
614
- * Indicates how/when to affect padding with safe area insets
615
- *
616
- * @platform iOS: Google Maps only
617
- * @platform Android: Not supported
618
- */
619
- paddingAdjustmentBehavior?: WithDefault<'always' | 'automatic' | 'never', 'never'>;
620
- /**
621
- * If `false` the user won't be able to adjust the camera’s pitch angle.
622
- *
623
- * @default true
624
- * @platform iOS: Google Maps only
625
- * @platform Android: Supported
626
- */
627
- pitchEnabled?: boolean;
628
- /**
629
- * The region to be displayed by the map.
630
- * The region is defined by the center coordinates and the span of coordinates to display.
631
- *
632
- * @platform iOS: Supported
633
- * @platform Android: Supported
634
- */
635
- region?: Region;
636
- /**
637
- * If `false` the user won't be able to adjust the camera’s pitch angle.
638
- *
639
- * @default true
640
- * @platform iOS: Google Maps only
641
- * @platform Android: Supported
642
- */
643
- rotateEnabled?: boolean;
644
- /**
645
- * If `false` the map will stay centered while rotating or zooming.
646
- *
647
- * @default true
648
- * @platform iOS: Google Maps only
649
- * @platform Android: Supported
650
- */
651
- scrollDuringRotateOrZoomEnabled?: boolean;
652
- /**
653
- * If `false` the user won't be able to change the map region being displayed.
654
- *
655
- * @default true
656
- * @platform iOS: Supported
657
- * @platform Android: Supported
658
- */
659
- scrollEnabled?: boolean;
660
- /**
661
- * A Boolean indicating whether the map displays extruded building information.
662
- *
663
- * @default true
664
- * @platform iOS: Not supported
665
- * @platform Android: Supported
666
- */
667
- showsBuildings?: boolean;
668
- /**
669
- * If `false` compass won't be displayed on the map.
670
- *
671
- * @default true
672
- * @platform iOS: Supported
673
- * @platform Android: Supported
674
- */
675
- showsCompass?: boolean;
676
- /**
677
- * A Boolean indicating whether indoor level picker should be enabled.
678
- *
679
- * @default false
680
- * @platform iOS: Google Maps only
681
- * @platform Android: Supported
682
- */
683
- showsIndoorLevelPicker?: boolean;
684
- /**
685
- * A Boolean indicating whether indoor maps should be enabled.
686
- *
687
- * @default true
688
- * @platform iOS: Google Maps only
689
- * @platform Android: Supported
690
- */
691
- showsIndoors?: boolean;
692
- /**
693
- * If `false` hide the button to move map to the current user's location.
694
- *
695
- * @default true
696
- * @platform iOS: Google Maps only
697
- * @platform Android: Supported
698
- */
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;
709
- /**
710
- * A Boolean indicating whether the map shows scale information.
711
- *
712
- * @default true
713
- * @platform iOS: Apple Maps only
714
- * @platform Android: Not supported
715
- */
716
- 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
- /**
727
- * If `true` the users location will be displayed on the map.
728
- *
729
- * This will cause iOS to ask for location permissions.
730
- * For iOS see: [DOCS](https://github.com/react-native-maps/react-native-maps/blob/master/docs/installation.md#set-the-usage-description-property)
731
- * @default false
732
- * @platform iOS: Supported
733
- * @platform Android: Supported
734
- */
735
- showsUserLocation?: boolean;
736
- /**
737
- * Sets the tint color of the map. (Changes the color of the position indicator)
738
- *
739
- * @default System Blue
740
- * @platform iOS: Apple Maps only
741
- * @platform Android: Not supported
742
- */
743
- tintColor?: ColorValue;
744
- /**
745
- * If `false` will hide 'Navigate' and 'Open in Maps' buttons on marker press
746
- *
747
- * @default true
748
- * @platform iOS: Not supported
749
- * @platform Android: Supported
750
- */
751
- toolbarEnabled?: boolean;
752
- /**
753
- * Sets the map to the style selected.
754
- *
755
- * @default System setting
756
- * @platform iOS: Apple Maps only (iOS >= 13.0)
757
- * @platform Android: Not supported
758
- */
759
- userInterfaceStyle?: WithDefault<'system' | 'light' | 'dark', 'system'>;
760
- /**
761
- * The title of the annotation for current user location.
762
- *
763
- * This only works if `showsUserLocation` is true.
764
- *
765
- * @default `My Location`
766
- * @platform iOS: Apple Maps only
767
- * @platform Android: Not supported
768
- */
769
- userLocationAnnotationTitle?: string;
770
- /**
771
- * If `true` clicking user location will show the default callout for userLocation annotation.
772
- *
773
- * @default false
774
- * @platform iOS: Apple Maps only
775
- * @platform Android: Not supported
776
- */
777
- userLocationCalloutEnabled?: boolean;
778
- /**
779
- * Fastest interval the application will actively acquire locations.
780
- *
781
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
782
- *
783
- * @default 5000
784
- * @platform iOS: Not supported
785
- * @platform Android: Supported
786
- */
787
- userLocationFastestInterval?: Int32;
788
- /**
789
- * Set power priority of user location tracking.
790
- *
791
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
792
- *
793
- * @default `high`
794
- * @platform iOS: Not supported
795
- * @platform Android: Supported
796
- */
797
- userLocationPriority?: WithDefault<'balanced' | 'high' | 'low' | 'passive', 'high'>;
798
- /**
799
- * Interval of user location updates in milliseconds.
800
- *
801
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
802
- *
803
- * @default 5000
804
- * @platform iOS: Not supported
805
- * @platform Android: Supported
806
- */
807
- userLocationUpdateInterval?: Int32;
808
- /**
809
- * If `false` the zoom control at the bottom right of the map won't be visible.
810
- *
811
- * @default true
812
- * @platform iOS: Not supported
813
- * @platform Android: Supported
814
- */
815
- zoomControlEnabled?: boolean;
816
- /**
817
- * If `false` the user won't be able to pinch/zoom the map.
818
- *
819
- * TODO: Why is the Android reactprop defaultvalue set to false?
820
- *
821
- * @default true
822
- * @platform iOS: Supported
823
- * @platform Android: Supported
824
- */
825
- zoomEnabled?: boolean;
826
- /**
827
- * If `false` the user won't be able to double tap to zoom the map.
828
- * **Note:** But it will greatly decrease delay of tap gesture recognition.
829
- *
830
- * @default true
831
- * @platform iOS: Google Maps only
832
- * @platform Android: Not supported
833
- */
834
- zoomTapEnabled?: boolean;
835
- /**
836
- * Map camera distance limits. `minCenterCoordinateDistance` for minimum distance, `maxCenterCoordinateDistance` for maximum.
837
- * `animated` for animated zoom changes.
838
- * Takes precedence if conflicting with `minZoomLevel`, `maxZoomLevel`.
839
- *
840
- * @platform iOS: 13.0+
841
- * @platform Android: Not supported
842
- */
843
- cameraZoomRange?: CameraZoomRange;
844
- }
845
- export interface NativeCommands {
846
- animateToRegion: (viewRef: React.ElementRef<React.ComponentType>, regionJSON: string, duration: Int32) => void;
847
- setCamera: (viewRef: React.ElementRef<React.ComponentType>, cameraJSON: string) => void;
848
- animateCamera: (viewRef: React.ElementRef<React.ComponentType>, cameraJSON: string, duration: Int32) => void;
849
- fitToElements: (viewRef: React.ElementRef<React.ComponentType>, edgePaddingJSON: string, animated: boolean) => void;
850
- fitToSuppliedMarkers: (viewRef: React.ElementRef<React.ComponentType>, markersJSON: string, edgePaddingJSON: string, animated: boolean) => void;
851
- fitToCoordinates: (viewRef: React.ElementRef<React.ComponentType>, coordinatesJSON: string, edgePaddingJSON: string, animated: boolean) => void;
852
- }
853
- export declare const Commands: NativeCommands;
854
- declare const _default: HostComponent<MapFabricNativeProps>;
855
- export default _default;