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