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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +9 -4
  2. package/android/build.gradle +65 -72
  3. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  4. package/android/src/main/RCTAppDependencyProvider.h +25 -0
  5. package/android/src/main/RCTAppDependencyProvider.mm +55 -0
  6. package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
  7. package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
  8. package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
  9. package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
  10. package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
  11. package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
  12. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
  13. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
  14. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
  15. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
  16. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
  17. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
  18. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +209 -0
  19. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
  20. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
  21. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
  22. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +45 -0
  23. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +22 -0
  24. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
  25. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
  26. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerDelegate.java +62 -0
  27. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +27 -0
  28. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerDelegate.java +56 -0
  29. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +25 -0
  30. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +5 -1
  31. package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +1 -1
  32. package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +9 -3
  33. package/android/src/main/java/com/rnmaps/fabric/UrlTileManager.java +124 -0
  34. package/android/src/main/java/com/rnmaps/fabric/WMSTileManager.java +114 -0
  35. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +19 -3
  36. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +608 -603
  37. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
  38. package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +2 -22
  39. package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +23 -1
  40. package/android/src/main/java/com/rnmaps/maps/MapUrlTile.java +18 -18
  41. package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +10 -14
  42. package/android/src/main/java/com/rnmaps/maps/MapView.java +58 -49
  43. package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +3 -3
  44. package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +10 -10
  45. package/android/src/main/jni/CMakeLists.txt +36 -0
  46. package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
  47. package/android/src/main/jni/RNMapsSpecs.h +31 -0
  48. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +31 -0
  49. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +33 -0
  50. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +979 -0
  51. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +860 -0
  52. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +227 -0
  53. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1297 -0
  54. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
  55. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
  56. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +26 -0
  57. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +131 -0
  58. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
  59. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +137 -0
  60. package/ios/AirGoogleMaps/AIRGoogleMap.h +13 -13
  61. package/ios/AirGoogleMaps/{AIRGoogleMap.m → AIRGoogleMap.mm} +32 -34
  62. package/ios/AirGoogleMaps/AIRGoogleMapManager.h +1 -0
  63. package/ios/AirGoogleMaps/AIRGoogleMapManager.mm +543 -0
  64. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +3 -3
  65. package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
  66. package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
  67. package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
  68. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +5 -2
  69. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +41 -33
  70. package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
  71. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +23 -14
  72. package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +1 -0
  73. package/ios/AirMaps/AIRMap.h +8 -9
  74. package/ios/AirMaps/{AIRMap.m → AIRMap.mm} +18 -14
  75. package/ios/AirMaps/AIRMapManager.m +8 -19
  76. package/ios/AirMaps/AIRMapMarker.m +57 -44
  77. package/ios/AirMaps/AIRMapOverlay.m +2 -2
  78. package/ios/AirMaps/AIRMapWMSTile.m +8 -8
  79. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +25 -0
  80. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +77 -0
  81. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
  82. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +51 -0
  83. package/ios/AirMaps/RNMapsAirModule.h +2 -3
  84. package/ios/AirMaps/RNMapsAirModule.mm +14 -0
  85. package/ios/AirMaps/RNMapsDefines.h +1 -0
  86. package/ios/AirMaps/RNMapsMapView.h +5 -2
  87. package/ios/AirMaps/RNMapsMapView.mm +16 -6
  88. package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
  89. package/ios/AirMaps/RNMapsMarkerView.mm +12 -4
  90. package/ios/AirMaps/RNMapsMarkerViewManager.mm +7 -0
  91. package/ios/AirMaps/module.modulemap +6 -0
  92. package/ios/AirMaps.xcodeproj/project.pbxproj +15 -55
  93. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  94. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  95. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  96. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  97. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  98. package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
  99. package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +1 -1
  100. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
  101. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
  102. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
  103. package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
  104. package/ios/generated/RNMapsSpecs/Props.cpp +194 -0
  105. package/ios/generated/RNMapsSpecs/Props.h +1224 -0
  106. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
  107. package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
  108. package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
  109. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
  110. package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
  111. package/ios/generated/RNMapsSpecs/States.cpp +16 -0
  112. package/ios/generated/RNMapsSpecs/States.h +113 -0
  113. package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
  114. package/ios/generated/RNMapsSpecsJSI.h +268 -0
  115. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  116. package/ios/generated/module.modulemap +15 -0
  117. package/package.json +30 -26
  118. package/react-native-google-maps.podspec +27 -0
  119. package/react-native-maps-generated.podspec +31 -0
  120. package/react-native-maps.podspec +52 -46
  121. package/react-native.config.js +16 -0
  122. package/src/AnimatedRegion.ts +169 -0
  123. package/src/Geojson.tsx +541 -0
  124. package/src/MapCallout.tsx +77 -0
  125. package/src/MapCalloutSubview.tsx +64 -0
  126. package/src/MapCircle.tsx +162 -0
  127. package/src/MapHeatmap.tsx +125 -0
  128. package/src/MapLocalTile.tsx +60 -0
  129. package/src/MapMarker.tsx +531 -0
  130. package/src/MapMarkerNativeComponent.ts +51 -0
  131. package/src/MapOverlay.tsx +178 -0
  132. package/src/MapPolygon.tsx +188 -0
  133. package/src/MapPolygon.types.ts +25 -0
  134. package/src/MapPolyline.tsx +215 -0
  135. package/src/MapUrlTile.tsx +169 -0
  136. package/src/MapView.tsx +1230 -0
  137. package/src/MapView.types.ts +212 -0
  138. package/src/MapView.web.ts +2 -0
  139. package/src/MapViewNativeComponent.ts +86 -0
  140. package/src/MapWMSTile.tsx +148 -0
  141. package/src/ProviderConstants.ts +2 -0
  142. package/src/createFabricMap.tsx +253 -0
  143. package/src/decorateMapComponent.ts +227 -0
  144. package/src/fixImageProp.ts +17 -0
  145. package/src/index.ts +52 -0
  146. package/src/sharedTypes.ts +101 -0
  147. package/{specs → src/specs}/NativeComponentCircle.ts +3 -4
  148. package/{specs → src/specs}/NativeComponentGoogleMapView.ts +15 -9
  149. package/{specs → src/specs}/NativeComponentMapView.ts +61 -32
  150. package/{specs → src/specs}/NativeComponentOverlay.ts +11 -2
  151. package/{specs → src/specs}/NativeComponentPolyline.ts +1 -1
  152. package/src/specs/NativeComponentUrlTile.ts +128 -0
  153. package/src/specs/NativeComponentWMSTile.ts +107 -0
  154. package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -533
  155. package/lib/AnimatedRegion.d.ts +0 -19
  156. package/lib/AnimatedRegion.js +0 -134
  157. package/lib/Geojson.d.ts +0 -204
  158. package/lib/Geojson.js +0 -166
  159. package/lib/MapCallout.d.ts +0 -40
  160. package/lib/MapCallout.js +0 -51
  161. package/lib/MapCalloutSubview.d.ts +0 -34
  162. package/lib/MapCalloutSubview.js +0 -48
  163. package/lib/MapCircle.d.ts +0 -117
  164. package/lib/MapCircle.js +0 -53
  165. package/lib/MapHeatmap.d.ts +0 -78
  166. package/lib/MapHeatmap.js +0 -59
  167. package/lib/MapLocalTile.d.ts +0 -35
  168. package/lib/MapLocalTile.js +0 -44
  169. package/lib/MapMarker.d.ts +0 -322
  170. package/lib/MapMarker.js +0 -158
  171. package/lib/MapMarkerNativeComponent.d.ts +0 -15
  172. package/lib/MapMarkerNativeComponent.js +0 -15
  173. package/lib/MapOverlay.d.ts +0 -88
  174. package/lib/MapOverlay.js +0 -65
  175. package/lib/MapPolygon.d.ts +0 -140
  176. package/lib/MapPolygon.js +0 -53
  177. package/lib/MapPolygon.types.d.ts +0 -18
  178. package/lib/MapPolygon.types.js +0 -2
  179. package/lib/MapPolyline.d.ts +0 -156
  180. package/lib/MapPolyline.js +0 -53
  181. package/lib/MapUrlTile.d.ts +0 -134
  182. package/lib/MapUrlTile.js +0 -44
  183. package/lib/MapView.d.ts +0 -703
  184. package/lib/MapView.js +0 -427
  185. package/lib/MapView.types.d.ts +0 -161
  186. package/lib/MapView.types.js +0 -2
  187. package/lib/MapView.web.d.ts +0 -1
  188. package/lib/MapView.web.js +0 -9
  189. package/lib/MapViewNativeComponent.d.ts +0 -18
  190. package/lib/MapViewNativeComponent.js +0 -19
  191. package/lib/MapWMSTile.d.ts +0 -116
  192. package/lib/MapWMSTile.js +0 -44
  193. package/lib/ProviderConstants.d.ts +0 -2
  194. package/lib/ProviderConstants.js +0 -5
  195. package/lib/createFabricMap.d.ts +0 -24
  196. package/lib/createFabricMap.js +0 -188
  197. package/lib/decorateMapComponent.d.ts +0 -36
  198. package/lib/decorateMapComponent.js +0 -120
  199. package/lib/fixImageProp.d.ts +0 -4
  200. package/lib/fixImageProp.js +0 -16
  201. package/lib/index.d.ts +0 -38
  202. package/lib/index.js +0 -81
  203. package/lib/sharedTypes.d.ts +0 -81
  204. package/lib/sharedTypes.js +0 -2
  205. package/lib/sharedTypesInternal.js +0 -2
  206. package/lib/specs/NativeAirMapsModule.d.ts +0 -31
  207. package/lib/specs/NativeAirMapsModule.js +0 -4
  208. package/lib/specs/NativeComponentCallout.d.ts +0 -46
  209. package/lib/specs/NativeComponentCallout.js +0 -9
  210. package/lib/specs/NativeComponentCircle.d.ts +0 -74
  211. package/lib/specs/NativeComponentCircle.js +0 -7
  212. package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
  213. package/lib/specs/NativeComponentGoogleMapView.js +0 -22
  214. package/lib/specs/NativeComponentGooglePolygon.d.ts +0 -75
  215. package/lib/specs/NativeComponentGooglePolygon.js +0 -7
  216. package/lib/specs/NativeComponentMapView.d.ts +0 -847
  217. package/lib/specs/NativeComponentMapView.js +0 -20
  218. package/lib/specs/NativeComponentMarker.d.ts +0 -258
  219. package/lib/specs/NativeComponentMarker.js +0 -19
  220. package/lib/specs/NativeComponentOverlay.d.ts +0 -67
  221. package/lib/specs/NativeComponentOverlay.js +0 -7
  222. package/lib/specs/NativeComponentPolyline.d.ts +0 -101
  223. package/lib/specs/NativeComponentPolyline.js +0 -7
  224. /package/ios/AirMaps/{UIView +AirMap.m → UIView+AirMap.m} +0 -0
  225. /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
  226. /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
  227. /package/{specs → src/specs}/NativeAirMapsModule.ts +0 -0
  228. /package/{specs → src/specs}/NativeComponentCallout.ts +0 -0
  229. /package/{specs → src/specs}/NativeComponentGooglePolygon.ts +0 -0
  230. /package/{specs → src/specs}/NativeComponentMarker.ts +0 -0
@@ -1,713 +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
- * The camera view the map should display.
271
- *
272
- * Use the camera system, instead of the region system, if you need control over
273
- * the pitch or heading. Using this will ignore the `region` property.
274
- * @platform iOS: Supported
275
- * @platform Android: Supported
276
- */
277
- camera?: Camera;
278
- /**
279
- * The initial camera view the map should use. Use this prop instead of `camera`
280
- * only if you don't want to control the camera of the map besides the initial view.
281
- *
282
- * Use the camera system, instead of the region system, if you need control over
283
- * the pitch or heading.
284
- *
285
- * Changing this prop after the component has mounted will not result in a camera change.
286
- *
287
- * This is similar to the `initialValue` prop of a text input.
288
- *
289
- * @platform iOS: Supported
290
- * @platform Android: Supported
291
- */
292
- initialCamera?: Camera;
293
- /**
294
- * The initial region to be displayed by the map. Use this prop instead of `region`
295
- * only if you don't want to control the viewport of the map besides the initial region.
296
- *
297
- * Changing this prop after the component has mounted will not result in a region change.
298
- *
299
- * This is similar to the `initialValue` prop of a text input.
300
- *
301
- * @platform iOS: Supported
302
- * @platform Android: Supported
303
- */
304
- initialRegion?: Region;
305
- /**
306
- * The URL for KML file.
307
- *
308
- * @platform iOS: Google Maps only
309
- * @platform Android: Supported
310
- */
311
- kmlSrc?: string;
312
- /**
313
- * https://developers.google.com/maps/documentation/get-map-id
314
- * google cloud mapId to enable cloud styling and more
315
- */
316
- googleMapId?: string;
317
- /**
318
- * Sets loading background color.
319
- *
320
- * @default `#FFFFFF`
321
- * @platform iOS: Supported
322
- * @platform Android: Supported
323
- */
324
- loadingBackgroundColor?: ColorValue;
325
- /**
326
- * Adds custom padding to each side of the map. Useful when map elements/markers are obscured.
327
- *
328
- * @platform iOS: Supported
329
- * @platform Android: Supported
330
- */
331
- mapPadding?: EdgePadding;
332
- /**
333
- * The map type to be displayed
334
- *
335
- * @default `standard`
336
- * @platform iOS: hybrid | mutedStandard | satellite | standard | terrain | hybridFlyover | satelliteFlyover
337
- * @platform Android: hybrid | none | satellite | standard | terrain
338
- */
339
- mapType?: WithDefault<'hybrid' | 'mutedStandard' | 'none' | 'satellite' | 'standard' | 'terrain' | 'satelliteFlyover' | 'hybridFlyover', 'standard'>;
340
- /**
341
- * Maximum zoom value for the map, must be between 0 and 20
342
- *
343
- * @default 20
344
- * @platform iOS: Supported
345
- * @platform Android: Supported
346
- * @deprecated on Apple Maps, use `cameraZoomRange` instead
347
- */
348
- maxZoom?: Float;
349
- /**
350
- * Minimum zoom value for the map, must be between 0 and 20
351
- *
352
- * @default 0
353
- * @platform iOS: Supported
354
- * @platform Android: Supported
355
- * @deprecated on Apple Maps, use `cameraZoomRange` instead
356
- */
357
- minZoom?: Float;
358
- /**
359
- * Callback that is called when an indoor building is focused/unfocused
360
- *
361
- * @platform iOS: Google Maps only
362
- * @platform Android: Supported
363
- */
364
- onIndoorBuildingFocused?: IndoorBuildingEventHandler;
365
- /**
366
- * Callback that is called when a level on indoor building is activated
367
- *
368
- * @platform iOS: Google Maps only
369
- * @platform Android: Supported
370
- */
371
- onIndoorLevelActivated?: IndoorLevelActivatedEventHandler;
372
- /**
373
- * Callback that is called once the kml is fully loaded.
374
- *
375
- * @platform iOS: Google Maps only
376
- * @platform Android: Supported
377
- */
378
- onKmlReady?: KmlMapEventHandler;
379
- /**
380
- * Callback that is called when user makes a "long press" somewhere on the map.
381
- *
382
- * @platform iOS: Supported
383
- * @platform Android: Supported
384
- */
385
- onLongPress?: LongPressEventHandler;
386
- /**
387
- * Callback that is called when the map has finished rendering all tiles.
388
- *
389
- * @platform iOS: Google Maps only
390
- * @platform Android: Supported
391
- */
392
- onMapLoaded?: MapLoadedEventHandler;
393
- /**
394
- * Callback that is called once the map is ready.
395
- *
396
- * Event is optional, as the first onMapReady callback is intercepted
397
- * on Android, and the event is not passed on.
398
- *
399
- * @platform iOS: Supported
400
- * @platform Android: Supported
401
- */
402
- onMapReady?: MapReadyEventHandler;
403
- /**
404
- * Callback that is called when a marker on the map becomes deselected.
405
- * This will be called when the callout for that marker is about to be hidden.
406
- *
407
- * @platform iOS: Supported
408
- * @platform Android: Supported
409
- */
410
- onMarkerDeselect?: MarkerDeselectEventHandler;
411
- /**
412
- * Callback called continuously as a marker is dragged
413
- *
414
- * @platform iOS: Apple Maps only
415
- * @platform Android: Supported
416
- */
417
- onMarkerDrag?: MarkerDragEventHandler;
418
- /**
419
- * Callback that is called when a drag on a marker finishes.
420
- * This is usually the point you will want to setState on the marker's coordinate again
421
- *
422
- * @platform iOS: Apple Maps only
423
- * @platform Android: Supported
424
- */
425
- onMarkerDragEnd?: MarkerDragStartEndEventHandler;
426
- /**
427
- * Callback that is called when the user initiates a drag on a marker (if it is draggable)
428
- *
429
- * @platform iOS: Apple Maps only
430
- * @platform Android: Supported
431
- */
432
- onMarkerDragStart?: MarkerDragStartEndEventHandler;
433
- /**
434
- * Callback that is called when a marker on the map is tapped by the user.
435
- *
436
- * @platform iOS: Supported
437
- * @platform Android: Supported
438
- */
439
- onMarkerPress?: MarkerPressEventHandler;
440
- /**
441
- * Callback that is called when a marker on the map becomes selected.
442
- * This will be called when the callout for that marker is about to be shown.
443
- *
444
- * @platform iOS: Supported.
445
- * @platform Android: Supported
446
- */
447
- onMarkerSelect?: MarkerSelectEventHandler;
448
- /**
449
- * Callback that is called when user presses and drags the map.
450
- * **NOTE**: for iOS `scrollEnabled` should be set to false to trigger the event
451
- *
452
- * @platform iOS: Supported
453
- * @platform Android: Supported
454
- */
455
- onPanDrag?: PanDragEventHandler;
456
- /**
457
- * Callback that is called when user click on a POI.
458
- *
459
- * @platform iOS: Google Maps only
460
- * @platform Android: Supported
461
- */
462
- onPoiClick?: PoiClickEventHandler;
463
- /**
464
- * Callback that is called when user taps on the map.
465
- *
466
- * @platform iOS: Supported
467
- * @platform Android: Supported
468
- */
469
- onPress?: MapPressEventHandler;
470
- /**
471
- * Callback that is called once before the region changes, such as when the user starts moving the map.
472
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
473
- * **Note**: `isGesture` is supported by Google Maps only.
474
- *
475
- * @platform iOS: Supported
476
- * @platform Android: Supported
477
- */
478
- onRegionChangeStart?: RegionChangeEventHandler;
479
- /**
480
- * Callback that is called continuously when the region changes, such as when a user is dragging the map.
481
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
482
- * **Note**: `isGesture` is supported by Google Maps only.
483
- *
484
- * @platform iOS: Supported
485
- * @platform Android: Supported
486
- */
487
- onRegionChange?: RegionChangeEventHandler;
488
- /**
489
- * Callback that is called once when the region changes, such as when the user is done moving the map.
490
- * `isGesture` property indicates if the move was from the user (true) or an animation (false).
491
- * **Note**: `isGesture` is supported by Google Maps only.
492
- *
493
- * @platform iOS: Supported
494
- * @platform Android: Supported
495
- */
496
- onRegionChangeComplete?: RegionChangeEventHandler;
497
- /**
498
- * Callback that is called when the underlying map figures our users current location
499
- * (coordinate also includes isFromMockProvider value for Android API 18 and above).
500
- * Make sure **showsUserLocation** is set to *true*.
501
- *
502
- * @platform iOS: Supported
503
- * @platform Android: Supported
504
- */
505
- onUserLocationChange?: UserLocationChangeEventHandler;
506
- /**
507
- * Indicates how/when to affect padding with safe area insets
508
- *
509
- * @platform iOS: Google Maps only
510
- * @platform Android: Not supported
511
- */
512
- paddingAdjustmentBehavior?: WithDefault<'always' | 'automatic' | 'never', 'never'>;
513
- /**
514
- * If `false` the user won't be able to adjust the camera’s pitch angle.
515
- *
516
- * @default true
517
- * @platform iOS: Google Maps only
518
- * @platform Android: Supported
519
- */
520
- pitchEnabled?: WithDefault<boolean, true>;
521
- /**
522
- * The region to be displayed by the map.
523
- * The region is defined by the center coordinates and the span of coordinates to display.
524
- *
525
- * @platform iOS: Supported
526
- * @platform Android: Supported
527
- */
528
- region?: Region;
529
- /**
530
- * If `false` the user won't be able to adjust the camera’s pitch angle.
531
- *
532
- * @default true
533
- * @platform iOS: Google Maps only
534
- * @platform Android: Supported
535
- */
536
- rotateEnabled?: WithDefault<boolean, true>;
537
- /**
538
- * If `false` the map will stay centered while rotating or zooming.
539
- *
540
- * @default true
541
- * @platform iOS: Google Maps only
542
- * @platform Android: Supported
543
- */
544
- scrollDuringRotateOrZoomEnabled?: WithDefault<boolean, true>;
545
- /**
546
- * If `false` the user won't be able to change the map region being displayed.
547
- *
548
- * @default true
549
- * @platform iOS: Supported
550
- * @platform Android: Supported
551
- */
552
- scrollEnabled?: WithDefault<boolean, true>;
553
- /**
554
- * A Boolean indicating whether the map displays extruded building information.
555
- *
556
- * @default true
557
- * @platform iOS: Not supported
558
- * @platform Android: Supported
559
- */
560
- showsBuildings?: WithDefault<boolean, true>;
561
- /**
562
- * If `false` compass won't be displayed on the map.
563
- *
564
- * @default true
565
- * @platform iOS: Supported
566
- * @platform Android: Supported
567
- */
568
- showsCompass?: WithDefault<boolean, true>;
569
- /**
570
- * A Boolean indicating whether indoor level picker should be enabled.
571
- *
572
- * @default false
573
- * @platform iOS: Google Maps only
574
- * @platform Android: Supported
575
- */
576
- showsIndoorLevelPicker?: boolean;
577
- /**
578
- * A Boolean indicating whether indoor maps should be enabled.
579
- *
580
- * @default true
581
- * @platform iOS: Google Maps only
582
- * @platform Android: Supported
583
- */
584
- showsIndoors?: WithDefault<boolean, true>;
585
- /**
586
- * If `false` hide the button to move map to the current user's location.
587
- *
588
- * @default true
589
- * @platform iOS: Google Maps only
590
- * @platform Android: Supported
591
- */
592
- showsMyLocationButton?: WithDefault<boolean, true>;
593
- /**
594
- * If `false` points of interest won't be displayed on the map.
595
- * TODO: DEPRECATED? Doesn't seem to do anything
596
- *
597
- * @default true
598
- * @platform iOS: Maybe Apple Maps?
599
- * @platform Android: Not supported
600
- */
601
- showsPointsOfInterest?: boolean;
602
- /**
603
- * A Boolean indicating whether the map shows scale information.
604
- *
605
- * @default true
606
- * @platform iOS: Apple Maps only
607
- * @platform Android: Not supported
608
- */
609
- showsScale?: boolean;
610
- /**
611
- * A Boolean value indicating whether the map displays traffic information.
612
- *
613
- * @default false
614
- * @platform iOS: Supported
615
- * @platform Android: Not supported?
616
- */
617
- showsTraffic?: boolean;
618
- /**
619
- * If `true` the users location will be displayed on the map.
620
- *
621
- * This will cause iOS to ask for location permissions.
622
- * For iOS see: [DOCS](https://github.com/react-native-maps/react-native-maps/blob/master/docs/installation.md#set-the-usage-description-property)
623
- * @default false
624
- * @platform iOS: Supported
625
- * @platform Android: Supported
626
- */
627
- showsUserLocation?: boolean;
628
- /**
629
- * Sets the map to the style selected.
630
- *
631
- * @default System setting
632
- * @platform iOS: Supported
633
- * @platform Android: Supported
634
- */
635
- userInterfaceStyle?: WithDefault<'system' | 'light' | 'dark', 'system'>;
636
- /**
637
- * If `true` clicking user location will show the default callout for userLocation annotation.
638
- *
639
- * @default false
640
- * @platform iOS: Apple Maps only
641
- * @platform Android: Not supported
642
- */
643
- userLocationCalloutEnabled?: boolean;
644
- /**
645
- * Fastest interval the application will actively acquire locations.
646
- *
647
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
648
- *
649
- * @default 5000
650
- * @platform iOS: Not supported
651
- * @platform Android: Supported
652
- */
653
- userLocationFastestInterval?: Int32;
654
- /**
655
- * Set power priority of user location tracking.
656
- *
657
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
658
- *
659
- * @default `high`
660
- * @platform iOS: Not supported
661
- * @platform Android: Supported
662
- */
663
- userLocationPriority?: WithDefault<'balanced' | 'high' | 'low' | 'passive', 'high'>;
664
- /**
665
- * Interval of user location updates in milliseconds.
666
- *
667
- * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
668
- *
669
- * @default 5000
670
- * @platform iOS: Not supported
671
- * @platform Android: Supported
672
- */
673
- userLocationUpdateInterval?: Int32;
674
- /**
675
- * If `false` the zoom control at the bottom right of the map won't be visible.
676
- *
677
- * @default true
678
- * @platform iOS: Not supported
679
- * @platform Android: Supported
680
- */
681
- zoomControlEnabled?: boolean;
682
- /**
683
- * If `false` the user won't be able to pinch/zoom the map.
684
- *
685
- * TODO: Why is the Android reactprop defaultvalue set to false?
686
- *
687
- * @default true
688
- * @platform iOS: Supported
689
- * @platform Android: Supported
690
- */
691
- zoomEnabled?: WithDefault<boolean, true>;
692
- /**
693
- * If `false` the user won't be able to double tap to zoom the map.
694
- * **Note:** But it will greatly decrease delay of tap gesture recognition.
695
- *
696
- * @default true
697
- * @platform iOS: Google Maps only
698
- * @platform Android: Not supported
699
- */
700
- zoomTapEnabled?: WithDefault<boolean, true>;
701
- }
702
- export interface NativeCommands {
703
- animateToRegion: (viewRef: React.ElementRef<React.ComponentType>, regionJSON: string, duration: Int32) => void;
704
- setCamera: (viewRef: React.ElementRef<React.ComponentType>, cameraJSON: string) => void;
705
- animateCamera: (viewRef: React.ElementRef<React.ComponentType>, cameraJSON: string, duration: Int32) => void;
706
- fitToElements: (viewRef: React.ElementRef<React.ComponentType>, edgePaddingJSON: string, animated: boolean) => void;
707
- fitToSuppliedMarkers: (viewRef: React.ElementRef<React.ComponentType>, markersJSON: string, edgePaddingJSON: string, animated: boolean) => void;
708
- fitToCoordinates: (viewRef: React.ElementRef<React.ComponentType>, coordinatesJSON: string, edgePaddingJSON: string, animated: boolean) => void;
709
- setIndoorActiveLevelIndex: (viewRef: React.ElementRef<React.ComponentType>, activeLevelIndex: Int32) => void;
710
- }
711
- export declare const Commands: NativeCommands;
712
- declare const _default: HostComponent<MapFabricNativeProps>;
713
- export default _default;