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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +9 -4
  2. package/android/build.gradle +65 -72
  3. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  4. package/android/src/main/RCTAppDependencyProvider.h +25 -0
  5. package/android/src/main/RCTAppDependencyProvider.mm +55 -0
  6. package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
  7. package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
  8. package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
  9. package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
  10. package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
  11. package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
  12. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
  13. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
  14. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
  15. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
  16. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
  17. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
  18. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +209 -0
  19. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
  20. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
  21. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
  22. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +45 -0
  23. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +22 -0
  24. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
  25. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
  26. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerDelegate.java +62 -0
  27. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +27 -0
  28. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerDelegate.java +56 -0
  29. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +25 -0
  30. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +5 -1
  31. package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +1 -1
  32. package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +9 -3
  33. package/android/src/main/java/com/rnmaps/fabric/UrlTileManager.java +124 -0
  34. package/android/src/main/java/com/rnmaps/fabric/WMSTileManager.java +114 -0
  35. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +19 -3
  36. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +608 -603
  37. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
  38. package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +2 -22
  39. package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +23 -1
  40. package/android/src/main/java/com/rnmaps/maps/MapUrlTile.java +18 -18
  41. package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +10 -14
  42. package/android/src/main/java/com/rnmaps/maps/MapView.java +58 -49
  43. package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +3 -3
  44. package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +10 -10
  45. package/android/src/main/jni/CMakeLists.txt +36 -0
  46. package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
  47. package/android/src/main/jni/RNMapsSpecs.h +31 -0
  48. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +31 -0
  49. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +33 -0
  50. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +979 -0
  51. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +860 -0
  52. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +227 -0
  53. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1297 -0
  54. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
  55. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
  56. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +26 -0
  57. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +131 -0
  58. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
  59. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +137 -0
  60. package/ios/AirGoogleMaps/AIRGoogleMap.h +13 -13
  61. package/ios/AirGoogleMaps/{AIRGoogleMap.m → AIRGoogleMap.mm} +32 -34
  62. package/ios/AirGoogleMaps/AIRGoogleMapManager.h +1 -0
  63. package/ios/AirGoogleMaps/AIRGoogleMapManager.mm +543 -0
  64. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +3 -3
  65. package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
  66. package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
  67. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
  68. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +5 -2
  69. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +41 -33
  70. package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
  71. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +23 -14
  72. package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +1 -0
  73. package/ios/AirMaps/AIRMap.h +8 -9
  74. package/ios/AirMaps/{AIRMap.m → AIRMap.mm} +18 -14
  75. package/ios/AirMaps/AIRMapManager.m +8 -19
  76. package/ios/AirMaps/AIRMapMarker.m +57 -44
  77. package/ios/AirMaps/AIRMapOverlay.m +2 -2
  78. package/ios/AirMaps/AIRMapWMSTile.m +8 -8
  79. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +25 -0
  80. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +77 -0
  81. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
  82. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +51 -0
  83. package/ios/AirMaps/RNMapsAirModule.h +2 -3
  84. package/ios/AirMaps/RNMapsAirModule.mm +14 -0
  85. package/ios/AirMaps/RNMapsDefines.h +1 -0
  86. package/ios/AirMaps/RNMapsMapView.h +5 -2
  87. package/ios/AirMaps/RNMapsMapView.mm +16 -6
  88. package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
  89. package/ios/AirMaps/RNMapsMarkerView.mm +12 -4
  90. package/ios/AirMaps/RNMapsMarkerViewManager.mm +7 -0
  91. package/ios/AirMaps/module.modulemap +6 -0
  92. package/ios/AirMaps.xcodeproj/project.pbxproj +15 -55
  93. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  94. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  95. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  96. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  97. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  98. package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  99. package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +1 -1
  100. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  101. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
  102. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
  103. package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
  104. package/ios/generated/RNMapsSpecs/Props.cpp +194 -0
  105. package/ios/generated/RNMapsSpecs/Props.h +1224 -0
  106. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
  107. package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
  108. package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
  109. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
  110. package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
  111. package/ios/generated/RNMapsSpecs/States.cpp +16 -0
  112. package/ios/generated/RNMapsSpecs/States.h +113 -0
  113. package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
  114. package/ios/generated/RNMapsSpecsJSI.h +268 -0
  115. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  116. package/ios/generated/module.modulemap +15 -0
  117. package/package.json +30 -25
  118. package/react-native-google-maps.podspec +27 -0
  119. package/react-native-maps-generated.podspec +31 -0
  120. package/react-native-maps.podspec +52 -46
  121. package/react-native.config.js +16 -0
  122. package/src/AnimatedRegion.ts +169 -0
  123. package/src/Geojson.tsx +541 -0
  124. package/src/MapCallout.tsx +77 -0
  125. package/src/MapCalloutSubview.tsx +64 -0
  126. package/src/MapCircle.tsx +162 -0
  127. package/src/MapHeatmap.tsx +125 -0
  128. package/src/MapLocalTile.tsx +60 -0
  129. package/src/MapMarker.tsx +531 -0
  130. package/src/MapMarkerNativeComponent.ts +51 -0
  131. package/src/MapOverlay.tsx +178 -0
  132. package/src/MapPolygon.tsx +188 -0
  133. package/src/MapPolygon.types.ts +25 -0
  134. package/src/MapPolyline.tsx +215 -0
  135. package/src/MapUrlTile.tsx +169 -0
  136. package/src/MapView.tsx +1230 -0
  137. package/src/MapView.types.ts +212 -0
  138. package/src/MapView.web.ts +2 -0
  139. package/src/MapViewNativeComponent.ts +86 -0
  140. package/src/MapWMSTile.tsx +148 -0
  141. package/src/ProviderConstants.ts +2 -0
  142. package/src/createFabricMap.tsx +253 -0
  143. package/src/decorateMapComponent.ts +227 -0
  144. package/src/fixImageProp.ts +17 -0
  145. package/src/index.ts +52 -0
  146. package/src/sharedTypes.ts +101 -0
  147. package/{specs → src/specs}/NativeComponentCircle.ts +3 -4
  148. package/{specs → src/specs}/NativeComponentGoogleMapView.ts +15 -9
  149. package/{specs → src/specs}/NativeComponentMapView.ts +61 -32
  150. package/{specs → src/specs}/NativeComponentOverlay.ts +11 -2
  151. package/{specs → src/specs}/NativeComponentPolyline.ts +1 -1
  152. package/src/specs/NativeComponentUrlTile.ts +128 -0
  153. package/src/specs/NativeComponentWMSTile.ts +107 -0
  154. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -533
  155. package/lib/AnimatedRegion.d.ts +0 -19
  156. package/lib/AnimatedRegion.js +0 -134
  157. package/lib/Geojson.d.ts +0 -204
  158. package/lib/Geojson.js +0 -166
  159. package/lib/MapCallout.d.ts +0 -40
  160. package/lib/MapCallout.js +0 -51
  161. package/lib/MapCalloutSubview.d.ts +0 -34
  162. package/lib/MapCalloutSubview.js +0 -48
  163. package/lib/MapCircle.d.ts +0 -117
  164. package/lib/MapCircle.js +0 -53
  165. package/lib/MapHeatmap.d.ts +0 -78
  166. package/lib/MapHeatmap.js +0 -59
  167. package/lib/MapLocalTile.d.ts +0 -35
  168. package/lib/MapLocalTile.js +0 -44
  169. package/lib/MapMarker.d.ts +0 -322
  170. package/lib/MapMarker.js +0 -158
  171. package/lib/MapMarkerNativeComponent.d.ts +0 -15
  172. package/lib/MapMarkerNativeComponent.js +0 -15
  173. package/lib/MapOverlay.d.ts +0 -88
  174. package/lib/MapOverlay.js +0 -65
  175. package/lib/MapPolygon.d.ts +0 -140
  176. package/lib/MapPolygon.js +0 -53
  177. package/lib/MapPolygon.types.d.ts +0 -18
  178. package/lib/MapPolygon.types.js +0 -2
  179. package/lib/MapPolyline.d.ts +0 -156
  180. package/lib/MapPolyline.js +0 -53
  181. package/lib/MapUrlTile.d.ts +0 -134
  182. package/lib/MapUrlTile.js +0 -44
  183. package/lib/MapView.d.ts +0 -703
  184. package/lib/MapView.js +0 -427
  185. package/lib/MapView.types.d.ts +0 -161
  186. package/lib/MapView.types.js +0 -2
  187. package/lib/MapView.web.d.ts +0 -1
  188. package/lib/MapView.web.js +0 -9
  189. package/lib/MapViewNativeComponent.d.ts +0 -18
  190. package/lib/MapViewNativeComponent.js +0 -19
  191. package/lib/MapWMSTile.d.ts +0 -116
  192. package/lib/MapWMSTile.js +0 -44
  193. package/lib/ProviderConstants.d.ts +0 -2
  194. package/lib/ProviderConstants.js +0 -5
  195. package/lib/createFabricMap.d.ts +0 -24
  196. package/lib/createFabricMap.js +0 -188
  197. package/lib/decorateMapComponent.d.ts +0 -36
  198. package/lib/decorateMapComponent.js +0 -120
  199. package/lib/fixImageProp.d.ts +0 -4
  200. package/lib/fixImageProp.js +0 -16
  201. package/lib/index.d.ts +0 -38
  202. package/lib/index.js +0 -81
  203. package/lib/sharedTypes.d.ts +0 -81
  204. package/lib/sharedTypes.js +0 -2
  205. package/lib/sharedTypesInternal.js +0 -2
  206. package/lib/specs/NativeAirMapsModule.d.ts +0 -31
  207. package/lib/specs/NativeAirMapsModule.js +0 -4
  208. package/lib/specs/NativeComponentCallout.d.ts +0 -46
  209. package/lib/specs/NativeComponentCallout.js +0 -9
  210. package/lib/specs/NativeComponentCircle.d.ts +0 -74
  211. package/lib/specs/NativeComponentCircle.js +0 -7
  212. package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
  213. package/lib/specs/NativeComponentGoogleMapView.js +0 -22
  214. package/lib/specs/NativeComponentGooglePolygon.d.ts +0 -75
  215. package/lib/specs/NativeComponentGooglePolygon.js +0 -7
  216. package/lib/specs/NativeComponentMapView.d.ts +0 -847
  217. package/lib/specs/NativeComponentMapView.js +0 -20
  218. package/lib/specs/NativeComponentMarker.d.ts +0 -258
  219. package/lib/specs/NativeComponentMarker.js +0 -19
  220. package/lib/specs/NativeComponentOverlay.d.ts +0 -67
  221. package/lib/specs/NativeComponentOverlay.js +0 -7
  222. package/lib/specs/NativeComponentPolyline.d.ts +0 -101
  223. package/lib/specs/NativeComponentPolyline.js +0 -7
  224. /package/ios/AirMaps/{UIView +AirMap.m → UIView+AirMap.m} +0 -0
  225. /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
  226. /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
  227. /package/{specs → src/specs}/NativeAirMapsModule.ts +0 -0
  228. /package/{specs → src/specs}/NativeComponentCallout.ts +0 -0
  229. /package/{specs → src/specs}/NativeComponentGooglePolygon.ts +0 -0
  230. /package/{specs → src/specs}/NativeComponentMarker.ts +0 -0
@@ -1,847 +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?: WithDefault<boolean, true>;
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
- handlePanDrag?: boolean;
564
- /**
565
- * Callback that is called when user click on a POI.
566
- *
567
- * @platform iOS: Google Maps only
568
- * @platform Android: Supported
569
- */
570
- onPoiClick?: PoiClickEventHandler;
571
- /**
572
- * Callback that is called when user taps on the map.
573
- *
574
- * @platform iOS: Supported
575
- * @platform Android: Supported
576
- */
577
- onPress?: MapPressEventHandler;
578
- /**
579
- * Callback that is called once before the region changes, such as when the user starts moving the map.
580
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
581
- * **Note**: `isGesture` is supported by Google Maps only.
582
- *
583
- * @platform iOS: Supported
584
- * @platform Android: Supported
585
- */
586
- onRegionChangeStart?: RegionChangeEventHandler;
587
- /**
588
- * Callback that is called continuously when the region changes, such as when a user is dragging the map.
589
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
590
- * **Note**: `isGesture` is supported by Google Maps only.
591
- *
592
- * @platform iOS: Supported
593
- * @platform Android: Supported
594
- */
595
- onRegionChange?: RegionChangeEventHandler;
596
- /**
597
- * Callback that is called once when the region changes, such as when the user is done moving the map.
598
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
599
- * **Note**: `isGesture` is supported by Google Maps only.
600
- *
601
- * @platform iOS: Supported
602
- * @platform Android: Supported
603
- */
604
- onRegionChangeComplete?: RegionChangeEventHandler;
605
- /**
606
- * Callback that is called when the underlying map figures our users current location
607
- * (coordinate also includes isFromMockProvider value for Android API 18 and above).
608
- * Make sure **showsUserLocation** is set to *true*.
609
- *
610
- * @platform iOS: Supported
611
- * @platform Android: Supported
612
- */
613
- onUserLocationChange?: UserLocationChangeEventHandler;
614
- /**
615
- * Indicates how/when to affect padding with safe area insets
616
- *
617
- * @platform iOS: Google Maps only
618
- * @platform Android: Not supported
619
- */
620
- paddingAdjustmentBehavior?: WithDefault<'always' | 'automatic' | 'never', 'never'>;
621
- /**
622
- * If `false` the user won't be able to adjust the camera’s pitch angle.
623
- *
624
- * @default true
625
- * @platform iOS: Google Maps only
626
- * @platform Android: Supported
627
- */
628
- pitchEnabled?: WithDefault<boolean, true>;
629
- /**
630
- * The region to be displayed by the map.
631
- * The region is defined by the center coordinates and the span of coordinates to display.
632
- *
633
- * @platform iOS: Supported
634
- * @platform Android: Supported
635
- */
636
- region?: Region;
637
- /**
638
- * If `false` the user won't be able to adjust the camera’s pitch angle.
639
- *
640
- * @default true
641
- * @platform iOS: Google Maps only
642
- * @platform Android: Supported
643
- */
644
- rotateEnabled?: WithDefault<boolean, true>;
645
- /**
646
- * If `false` the map will stay centered while rotating or zooming.
647
- *
648
- * @default true
649
- * @platform iOS: Google Maps only
650
- * @platform Android: Supported
651
- */
652
- scrollDuringRotateOrZoomEnabled?: WithDefault<boolean, true>;
653
- /**
654
- * If `false` the user won't be able to change the map region being displayed.
655
- *
656
- * @default true
657
- * @platform iOS: Supported
658
- * @platform Android: Supported
659
- */
660
- scrollEnabled?: WithDefault<boolean, true>;
661
- /**
662
- * A Boolean indicating whether the map displays extruded building information.
663
- *
664
- * @default true
665
- * @platform iOS: Not supported
666
- * @platform Android: Supported
667
- */
668
- showsBuildings?: WithDefault<boolean, true>;
669
- /**
670
- * If `false` compass won't be displayed on the map.
671
- *
672
- * @default true
673
- * @platform iOS: Supported
674
- * @platform Android: Supported
675
- */
676
- showsCompass?: WithDefault<boolean, true>;
677
- /**
678
- * A Boolean indicating whether indoor level picker should be enabled.
679
- *
680
- * @default false
681
- * @platform iOS: Google Maps only
682
- * @platform Android: Supported
683
- */
684
- showsIndoorLevelPicker?: boolean;
685
- /**
686
- * A Boolean indicating whether indoor maps should be enabled.
687
- *
688
- * @default true
689
- * @platform iOS: Google Maps only
690
- * @platform Android: Supported
691
- */
692
- showsIndoors?: WithDefault<boolean, true>;
693
- /**
694
- * If `false` hide the button to move map to the current user's location.
695
- *
696
- * @default true
697
- * @platform iOS: Google Maps only
698
- * @platform Android: Supported
699
- */
700
- showsMyLocationButton?: WithDefault<boolean, true>;
701
- /**
702
- * A Boolean indicating whether the map shows scale information.
703
- *
704
- * @default false
705
- * @platform iOS: Apple Maps only
706
- * @platform Android: Not supported
707
- */
708
- showsScale?: boolean;
709
- /**
710
- * If `true` the users location will be displayed on the map.
711
- *
712
- * This will cause iOS to ask for location permissions.
713
- * For iOS see: [DOCS](https://github.com/react-native-maps/react-native-maps/blob/master/docs/installation.md#set-the-usage-description-property)
714
- * @default false
715
- * @platform iOS: Supported
716
- * @platform Android: Supported
717
- */
718
- showsUserLocation?: boolean;
719
- /**
720
- * Sets the tint color of the map. (Changes the color of the position indicator)
721
- *
722
- * @default System Blue
723
- * @platform iOS: Apple Maps only
724
- * @platform Android: Not supported
725
- */
726
- tintColor?: ColorValue;
727
- /**
728
- * If `false` will hide 'Navigate' and 'Open in Maps' buttons on marker press
729
- *
730
- * @default true
731
- * @platform iOS: Not supported
732
- * @platform Android: Supported
733
- */
734
- toolbarEnabled?: WithDefault<boolean, true>;
735
- /**
736
- * Sets the map to the style selected.
737
- *
738
- * @default System setting
739
- * @platform iOS: Supported
740
- * @platform Android: Supported
741
- */
742
- userInterfaceStyle?: WithDefault<'system' | 'light' | 'dark', 'system'>;
743
- /**
744
- * The title of the annotation for current user location.
745
- *
746
- * This only works if `showsUserLocation` is true.
747
- *
748
- * @default `My Location`
749
- * @platform iOS: Apple Maps only
750
- * @platform Android: Not supported
751
- */
752
- userLocationAnnotationTitle?: string;
753
- /**
754
- * If `true` clicking user location will show the default callout for userLocation annotation.
755
- *
756
- * @default false
757
- * @platform iOS: Apple Maps only
758
- * @platform Android: Not supported
759
- */
760
- userLocationCalloutEnabled?: boolean;
761
- /**
762
- * Fastest interval the application will actively acquire locations.
763
- *
764
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
765
- *
766
- * @default 5000
767
- * @platform iOS: Not supported
768
- * @platform Android: Supported
769
- */
770
- userLocationFastestInterval?: WithDefault<Int32, 5000>;
771
- /**
772
- * Set power priority of user location tracking.
773
- *
774
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
775
- *
776
- * @default `high`
777
- * @platform iOS: Not supported
778
- * @platform Android: Supported
779
- */
780
- userLocationPriority?: WithDefault<'balanced' | 'high' | 'low' | 'passive', 'high'>;
781
- /**
782
- * Interval of user location updates in milliseconds.
783
- *
784
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
785
- *
786
- * @default 5000
787
- * @platform iOS: Not supported
788
- * @platform Android: Supported
789
- */
790
- userLocationUpdateInterval?: WithDefault<Int32, 5000>;
791
- /**
792
- * If `false` the zoom control at the bottom right of the map won't be visible.
793
- *
794
- * @default true
795
- * @platform iOS: Not supported
796
- * @platform Android: Supported
797
- */
798
- zoomControlEnabled?: WithDefault<boolean, true>;
799
- /**
800
- * If `false` the user won't be able to pinch/zoom the map.
801
- *
802
- * TODO: Why is the Android reactprop defaultvalue set to false?
803
- *
804
- * @default true
805
- * @platform iOS: Supported
806
- * @platform Android: Supported
807
- */
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;
817
- /**
818
- * If `false` the user won't be able to double tap to zoom the map.
819
- * **Note:** But it will greatly decrease delay of tap gesture recognition.
820
- *
821
- * @default true
822
- * @platform iOS: Google Maps only
823
- * @platform Android: Not supported
824
- */
825
- zoomTapEnabled?: WithDefault<boolean, true>;
826
- /**
827
- * Map camera distance limits. `minCenterCoordinateDistance` for minimum distance, `maxCenterCoordinateDistance` for maximum.
828
- * `animated` for animated zoom changes.
829
- * Takes precedence if conflicting with `minZoomLevel`, `maxZoomLevel`.
830
- *
831
- * @platform iOS: 13.0+
832
- * @platform Android: Not supported
833
- */
834
- cameraZoomRange?: CameraZoomRange;
835
- }
836
- export interface NativeCommands {
837
- animateToRegion: (viewRef: React.ElementRef<React.ComponentType>, regionJSON: string, duration: Int32) => void;
838
- setCamera: (viewRef: React.ElementRef<React.ComponentType>, cameraJSON: string) => void;
839
- animateCamera: (viewRef: React.ElementRef<React.ComponentType>, cameraJSON: string, duration: Int32) => void;
840
- fitToElements: (viewRef: React.ElementRef<React.ComponentType>, edgePaddingJSON: string, animated: boolean) => void;
841
- fitToSuppliedMarkers: (viewRef: React.ElementRef<React.ComponentType>, markersJSON: string, edgePaddingJSON: string, animated: boolean) => void;
842
- fitToCoordinates: (viewRef: React.ElementRef<React.ComponentType>, coordinatesJSON: string, edgePaddingJSON: string, animated: boolean) => void;
843
- setIndoorActiveLevelIndex: (viewRef: React.ElementRef<React.ComponentType>, activeLevelIndex: Int32) => void;
844
- }
845
- export declare const Commands: NativeCommands;
846
- declare const _default: HostComponent<MapFabricNativeProps>;
847
- export default _default;