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

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.
@@ -0,0 +1,1071 @@
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
+ * If `true` map will be cached and displayed as an image instead of being interactable, for performance usage.
357
+ *
358
+ * @default false
359
+ * @platform iOS: Apple Maps only
360
+ * @platform Android: Supported
361
+ */
362
+ cacheEnabled?: boolean;
363
+
364
+ /**
365
+ * The camera view the map should display.
366
+ *
367
+ * Use the camera system, instead of the region system, if you need control over
368
+ * the pitch or heading. Using this will ignore the `region` property.
369
+ * @platform iOS: Supported
370
+ * @platform Android: Supported
371
+ */
372
+ camera?: Camera;
373
+
374
+ /**
375
+ * If set, changes the position of the compass.
376
+ *
377
+ * @platform iOS: Apple Maps only
378
+ * @platform Android: Not supported
379
+ */
380
+ compassOffset?: Point;
381
+
382
+ /**
383
+ * If `true` the map will focus on the user's location.
384
+ * This only works if `showsUserLocation` is true and the user has shared their location.
385
+ *
386
+ * @default false
387
+ * @platform iOS: Apple Maps only
388
+ * @platform Android: Not supported
389
+ */
390
+ followsUserLocation?: boolean;
391
+
392
+ /**
393
+ * If `false` the map will not capture PoI clicks
394
+ * This can improve click handling on the map for android
395
+ *
396
+ * @default true
397
+ * @platform iOS: Not supported
398
+ * @platform Android: supported
399
+ */
400
+ poiClickEnabled?: boolean;
401
+
402
+ /**
403
+ * The initial camera view the map should use. Use this prop instead of `camera`
404
+ * only if you don't want to control the camera of the map besides the initial view.
405
+ *
406
+ * Use the camera system, instead of the region system, if you need control over
407
+ * the pitch or heading.
408
+ *
409
+ * Changing this prop after the component has mounted will not result in a camera change.
410
+ *
411
+ * This is similar to the `initialValue` prop of a text input.
412
+ *
413
+ * @platform iOS: Supported
414
+ * @platform Android: Supported
415
+ */
416
+ initialCamera?: Camera;
417
+
418
+ /**
419
+ * The initial region to be displayed by the map. Use this prop instead of `region`
420
+ * only if you don't want to control the viewport of the map besides the initial region.
421
+ *
422
+ * Changing this prop after the component has mounted will not result in a region change.
423
+ *
424
+ * This is similar to the `initialValue` prop of a text input.
425
+ *
426
+ * @platform iOS: Supported
427
+ * @platform Android: Supported
428
+ */
429
+ initialRegion?: Region;
430
+
431
+ /**
432
+ * The URL for KML file.
433
+ *
434
+ * @platform iOS: Google Maps only
435
+ * @platform Android: Supported
436
+ */
437
+ kmlSrc?: string;
438
+
439
+ /**
440
+ * If set, changes the position of the "Legal" label link in Apple Maps.
441
+ *
442
+ * @platform iOS: Apple Maps only
443
+ * @platform Android: Not supported
444
+ */
445
+ legalLabelInsets?: EdgePadding;
446
+
447
+ /**
448
+ * Enables lite mode on Android
449
+ *
450
+ * @platform iOS: Not supported
451
+ * @platform Android: Supported
452
+ */
453
+ liteMode?: boolean;
454
+
455
+ /**
456
+ * https://developers.google.com/maps/documentation/get-map-id
457
+ * google cloud mapId to enable cloud styling and more
458
+ */
459
+ googleMapId?: string;
460
+
461
+ /**
462
+ * https://developers.google.com/maps/documentation/android-sdk/renderer
463
+ * google maps renderer
464
+ * @default `LATEST`
465
+ * @platform iOS: Not supported
466
+ * @platform Android: Supported
467
+ */
468
+ googleRenderer?: WithDefault<'LATEST' | 'LEGACY', 'LATEST'>;
469
+
470
+ /**
471
+ * Sets loading background color.
472
+ *
473
+ * @default `#FFFFFF`
474
+ * @platform iOS: Supported
475
+ * @platform Android: Supported
476
+ */
477
+ loadingBackgroundColor?: ColorValue;
478
+
479
+ /**
480
+ * If `true` a loading indicator will show while the map is loading.
481
+ *
482
+ * @default false
483
+ * @platform iOS: Apple Maps only
484
+ * @platform Android: Supported
485
+ */
486
+ loadingEnabled?: boolean;
487
+
488
+ /**
489
+ * Sets loading indicator color.
490
+ *
491
+ * @default `#606060`
492
+ * @platform iOS: Apple Maps only
493
+ * @platform Android: Supported
494
+ */
495
+ loadingIndicatorColor?: ColorValue;
496
+
497
+ /**
498
+ * Adds custom padding to each side of the map. Useful when map elements/markers are obscured.
499
+ *
500
+ * @platform iOS: Supported
501
+ * @platform Android: Supported
502
+ */
503
+ mapPadding?: EdgePadding;
504
+
505
+ /**
506
+ * The map type to be displayed
507
+ *
508
+ * @default `standard`
509
+ * @platform iOS: hybrid | mutedStandard | satellite | standard | terrain | hybridFlyover | satelliteFlyover
510
+ * @platform Android: hybrid | none | satellite | standard | terrain
511
+ */
512
+ mapType?: WithDefault<
513
+ | 'hybrid'
514
+ | 'mutedStandard'
515
+ | 'none'
516
+ | 'satellite'
517
+ | 'standard'
518
+ | 'terrain'
519
+ | 'satelliteFlyover'
520
+ | 'hybridFlyover',
521
+ 'standard'
522
+ >;
523
+
524
+ /**
525
+ * TODO: Add documentation
526
+ *
527
+ * @platform iOS: Apple Maps only
528
+ * @platform Android: Not supported
529
+ */
530
+ maxDelta?: Double;
531
+
532
+ /**
533
+ * Maximum zoom value for the map, must be between 0 and 20
534
+ *
535
+ * @default 20
536
+ * @platform iOS: Supported
537
+ * @platform Android: Supported
538
+ * @deprecated on Apple Maps, use `cameraZoomRange` instead
539
+ */
540
+ maxZoom?: Float;
541
+
542
+ /**
543
+ * TODO: Add documentation
544
+ *
545
+ * @platform iOS: Apple Maps only
546
+ * @platform Android: Not supported
547
+ */
548
+ minDelta?: Double;
549
+
550
+ /**
551
+ * Minimum zoom value for the map, must be between 0 and 20
552
+ *
553
+ * @default 0
554
+ * @platform iOS: Supported
555
+ * @platform Android: Supported
556
+ * @deprecated on Apple Maps, use `cameraZoomRange` instead
557
+ */
558
+ minZoom?: Float;
559
+
560
+ /**
561
+ * If `false` the map won't move to the marker when pressed.
562
+ *
563
+ * @default true
564
+ * @platform iOS: Not supported
565
+ * @platform Android: Supported
566
+ */
567
+ moveOnMarkerPress?: WithDefault<boolean, true>;
568
+
569
+ /**
570
+ * Callback that is called when a callout is tapped by the user.
571
+ *
572
+ * @platform iOS: Apple Maps only
573
+ * @platform Android: Supported
574
+ */
575
+ onCalloutPress?: CalloutPressEventHandler;
576
+
577
+ /**
578
+ * Callback that is called when user double taps on the map.
579
+ *
580
+ * @platform iOS: Apple Maps only
581
+ * @platform Android: Supported
582
+ */
583
+ onDoublePress?: ClickEvent;
584
+
585
+ /**
586
+ * Callback that is called when an indoor building is focused/unfocused
587
+ *
588
+ * @platform iOS: Google Maps only
589
+ * @platform Android: Supported
590
+ */
591
+ onIndoorBuildingFocused?: IndoorBuildingEventHandler;
592
+
593
+ /**
594
+ * Callback that is called when a level on indoor building is activated
595
+ *
596
+ * @platform iOS: Google Maps only
597
+ * @platform Android: Supported
598
+ */
599
+ onIndoorLevelActivated?: IndoorLevelActivatedEventHandler;
600
+
601
+ /**
602
+ * Callback that is called once the kml is fully loaded.
603
+ *
604
+ * @platform iOS: Google Maps only
605
+ * @platform Android: Supported
606
+ */
607
+ onKmlReady?: KmlMapEventHandler;
608
+
609
+ /**
610
+ * Callback that is called when user makes a "long press" somewhere on the map.
611
+ *
612
+ * @platform iOS: Supported
613
+ * @platform Android: Supported
614
+ */
615
+ onLongPress?: LongPressEventHandler;
616
+
617
+ /**
618
+ * Callback that is called when the map has finished rendering all tiles.
619
+ *
620
+ * @platform iOS: Google Maps only
621
+ * @platform Android: Supported
622
+ */
623
+ onMapLoaded?: MapLoadedEventHandler;
624
+
625
+ /**
626
+ * Callback that is called once the map is ready.
627
+ *
628
+ * Event is optional, as the first onMapReady callback is intercepted
629
+ * on Android, and the event is not passed on.
630
+ *
631
+ * @platform iOS: Supported
632
+ * @platform Android: Supported
633
+ */
634
+ onMapReady?: MapReadyEventHandler;
635
+
636
+ /**
637
+ * Callback that is called when a marker on the map becomes deselected.
638
+ * This will be called when the callout for that marker is about to be hidden.
639
+ *
640
+ * @platform iOS: Supported
641
+ * @platform Android: Supported
642
+ */
643
+ onMarkerDeselect?: MarkerDeselectEventHandler;
644
+
645
+ /**
646
+ * Callback called continuously as a marker is dragged
647
+ *
648
+ * @platform iOS: Apple Maps only
649
+ * @platform Android: Supported
650
+ */
651
+ onMarkerDrag?: MarkerDragEventHandler;
652
+
653
+ /**
654
+ * Callback that is called when a drag on a marker finishes.
655
+ * This is usually the point you will want to setState on the marker's coordinate again
656
+ *
657
+ * @platform iOS: Apple Maps only
658
+ * @platform Android: Supported
659
+ */
660
+ onMarkerDragEnd?: MarkerDragStartEndEventHandler;
661
+
662
+ /**
663
+ * Callback that is called when the user initiates a drag on a marker (if it is draggable)
664
+ *
665
+ * @platform iOS: Apple Maps only
666
+ * @platform Android: Supported
667
+ */
668
+ onMarkerDragStart?: MarkerDragStartEndEventHandler;
669
+
670
+ /**
671
+ * Callback that is called when a marker on the map is tapped by the user.
672
+ *
673
+ * @platform iOS: Supported
674
+ * @platform Android: Supported
675
+ */
676
+ onMarkerPress?: MarkerPressEventHandler;
677
+
678
+ /**
679
+ * Callback that is called when a marker on the map becomes selected.
680
+ * This will be called when the callout for that marker is about to be shown.
681
+ *
682
+ * @platform iOS: Supported.
683
+ * @platform Android: Supported
684
+ */
685
+ onMarkerSelect?: MarkerSelectEventHandler;
686
+
687
+ /**
688
+ * Callback that is called when user presses and drags the map.
689
+ * **NOTE**: for iOS `scrollEnabled` should be set to false to trigger the event
690
+ *
691
+ * @platform iOS: Supported
692
+ * @platform Android: Supported
693
+ */
694
+ onPanDrag?: PanDragEventHandler;
695
+
696
+ /*
697
+ internal flag to enable pan gesture handling on iOS manually
698
+ * see MapView.ts line 1228
699
+ */
700
+ handlePanDrag?: boolean;
701
+
702
+ /**
703
+ * Callback that is called when user click on a POI.
704
+ *
705
+ * @platform iOS: Google Maps only
706
+ * @platform Android: Supported
707
+ */
708
+ onPoiClick?: PoiClickEventHandler;
709
+
710
+ /**
711
+ * Callback that is called when user taps on the map.
712
+ *
713
+ * @platform iOS: Supported
714
+ * @platform Android: Supported
715
+ */
716
+ onPress?: MapPressEventHandler;
717
+
718
+ /**
719
+ * Callback that is called once before the region changes, such as when the user starts moving the map.
720
+ * `isGesture` property indicates if the move was from the user (true) or an animation (false).
721
+ * **Note**: `isGesture` is supported by Google Maps only.
722
+ *
723
+ * @platform iOS: Supported
724
+ * @platform Android: Supported
725
+ */
726
+ onRegionChangeStart?: RegionChangeEventHandler;
727
+
728
+ /**
729
+ * Callback that is called continuously when the region changes, such as when a user is dragging the map.
730
+ * `isGesture` property indicates if the move was from the user (true) or an animation (false).
731
+ * **Note**: `isGesture` is supported by Google Maps only.
732
+ *
733
+ * @platform iOS: Supported
734
+ * @platform Android: Supported
735
+ */
736
+ onRegionChange?: RegionChangeEventHandler;
737
+
738
+ /**
739
+ * Callback that is called once when the region changes, such as when the user is done moving the map.
740
+ * `isGesture` property indicates if the move was from the user (true) or an animation (false).
741
+ * **Note**: `isGesture` is supported by Google Maps only.
742
+ *
743
+ * @platform iOS: Supported
744
+ * @platform Android: Supported
745
+ */
746
+ onRegionChangeComplete?: RegionChangeEventHandler;
747
+
748
+ /**
749
+ * Callback that is called when the underlying map figures our users current location
750
+ * (coordinate also includes isFromMockProvider value for Android API 18 and above).
751
+ * Make sure **showsUserLocation** is set to *true*.
752
+ *
753
+ * @platform iOS: Supported
754
+ * @platform Android: Supported
755
+ */
756
+ onUserLocationChange?: UserLocationChangeEventHandler;
757
+
758
+ /**
759
+ * Indicates how/when to affect padding with safe area insets
760
+ *
761
+ * @platform iOS: Google Maps only
762
+ * @platform Android: Not supported
763
+ */
764
+ paddingAdjustmentBehavior?: WithDefault<
765
+ 'always' | 'automatic' | 'never',
766
+ 'never'
767
+ >;
768
+
769
+ /**
770
+ * If `false` the user won't be able to adjust the camera’s pitch angle.
771
+ *
772
+ * @default true
773
+ * @platform iOS: Google Maps only
774
+ * @platform Android: Supported
775
+ */
776
+ pitchEnabled?: WithDefault<boolean, true>;
777
+
778
+ /**
779
+ * The region to be displayed by the map.
780
+ * The region is defined by the center coordinates and the span of coordinates to display.
781
+ *
782
+ * @platform iOS: Supported
783
+ * @platform Android: Supported
784
+ */
785
+ region?: Region;
786
+
787
+ /**
788
+ * If `false` the user won't be able to adjust the camera’s pitch angle.
789
+ *
790
+ * @default true
791
+ * @platform iOS: Google Maps only
792
+ * @platform Android: Supported
793
+ */
794
+ rotateEnabled?: WithDefault<boolean, true>;
795
+
796
+ /**
797
+ * If `false` the map will stay centered while rotating or zooming.
798
+ *
799
+ * @default true
800
+ * @platform iOS: Google Maps only
801
+ * @platform Android: Supported
802
+ */
803
+ scrollDuringRotateOrZoomEnabled?: WithDefault<boolean, true>;
804
+
805
+ /**
806
+ * If `false` the user won't be able to change the map region being displayed.
807
+ *
808
+ * @default true
809
+ * @platform iOS: Supported
810
+ * @platform Android: Supported
811
+ */
812
+ scrollEnabled?: WithDefault<boolean, true>;
813
+
814
+ /**
815
+ * A Boolean indicating whether the map displays extruded building information.
816
+ *
817
+ * @default true
818
+ * @platform iOS: Not supported
819
+ * @platform Android: Supported
820
+ */
821
+ showsBuildings?: WithDefault<boolean, true>;
822
+
823
+ /**
824
+ * If `false` compass won't be displayed on the map.
825
+ *
826
+ * @default true
827
+ * @platform iOS: Supported
828
+ * @platform Android: Supported
829
+ */
830
+ showsCompass?: WithDefault<boolean, true>;
831
+
832
+ /**
833
+ * A Boolean indicating whether indoor level picker should be enabled.
834
+ *
835
+ * @default false
836
+ * @platform iOS: Google Maps only
837
+ * @platform Android: Supported
838
+ */
839
+ showsIndoorLevelPicker?: boolean;
840
+
841
+ /**
842
+ * A Boolean indicating whether indoor maps should be enabled.
843
+ *
844
+ * @default true
845
+ * @platform iOS: Google Maps only
846
+ * @platform Android: Supported
847
+ */
848
+ showsIndoors?: WithDefault<boolean, true>;
849
+
850
+ /**
851
+ * If `false` hide the button to move map to the current user's location.
852
+ *
853
+ * @default true
854
+ * @platform iOS: Google Maps only
855
+ * @platform Android: Supported
856
+ */
857
+ showsMyLocationButton?: WithDefault<boolean, true>;
858
+
859
+ /**
860
+ * A Boolean indicating whether the map shows scale information.
861
+ *
862
+ * @default false
863
+ * @platform iOS: Apple Maps only
864
+ * @platform Android: Not supported
865
+ */
866
+ showsScale?: boolean;
867
+
868
+ /**
869
+ * If `true` the users location will be displayed on the map.
870
+ *
871
+ * This will cause iOS to ask for location permissions.
872
+ * For iOS see: [DOCS](https://github.com/react-native-maps/react-native-maps/blob/master/docs/installation.md#set-the-usage-description-property)
873
+ * @default false
874
+ * @platform iOS: Supported
875
+ * @platform Android: Supported
876
+ */
877
+ showsUserLocation?: boolean;
878
+
879
+ /**
880
+ * Sets the tint color of the map. (Changes the color of the position indicator)
881
+ *
882
+ * @default System Blue
883
+ * @platform iOS: Apple Maps only
884
+ * @platform Android: Not supported
885
+ */
886
+ tintColor?: ColorValue;
887
+
888
+ /**
889
+ * If `false` will hide 'Navigate' and 'Open in Maps' buttons on marker press
890
+ *
891
+ * @default true
892
+ * @platform iOS: Not supported
893
+ * @platform Android: Supported
894
+ */
895
+ toolbarEnabled?: WithDefault<boolean, true>;
896
+
897
+ /**
898
+ * Sets the map to the style selected.
899
+ *
900
+ * @default System setting
901
+ * @platform iOS: Supported
902
+ * @platform Android: Supported
903
+ */
904
+ userInterfaceStyle?: WithDefault<'system' | 'light' | 'dark', 'system'>;
905
+
906
+ /**
907
+ * The title of the annotation for current user location.
908
+ *
909
+ * This only works if `showsUserLocation` is true.
910
+ *
911
+ * @default `My Location`
912
+ * @platform iOS: Apple Maps only
913
+ * @platform Android: Not supported
914
+ */
915
+ userLocationAnnotationTitle?: string;
916
+
917
+ /**
918
+ * If `true` clicking user location will show the default callout for userLocation annotation.
919
+ *
920
+ * @default false
921
+ * @platform iOS: Apple Maps only
922
+ * @platform Android: Not supported
923
+ */
924
+ userLocationCalloutEnabled?: boolean;
925
+
926
+ /**
927
+ * Fastest interval the application will actively acquire locations.
928
+ *
929
+ * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
930
+ *
931
+ * @default 5000
932
+ * @platform iOS: Not supported
933
+ * @platform Android: Supported
934
+ */
935
+ userLocationFastestInterval?: WithDefault<Int32, 5000>;
936
+
937
+ /**
938
+ * Set power priority of user location tracking.
939
+ *
940
+ * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
941
+ *
942
+ * @default `high`
943
+ * @platform iOS: Not supported
944
+ * @platform Android: Supported
945
+ */
946
+ userLocationPriority?: WithDefault<
947
+ 'balanced' | 'high' | 'low' | 'passive',
948
+ 'high'
949
+ >;
950
+
951
+ /**
952
+ * Interval of user location updates in milliseconds.
953
+ *
954
+ * See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
955
+ *
956
+ * @default 5000
957
+ * @platform iOS: Not supported
958
+ * @platform Android: Supported
959
+ */
960
+ userLocationUpdateInterval?: WithDefault<Int32, 5000>;
961
+
962
+ /**
963
+ * If `false` the zoom control at the bottom right of the map won't be visible.
964
+ *
965
+ * @default true
966
+ * @platform iOS: Not supported
967
+ * @platform Android: Supported
968
+ */
969
+ zoomControlEnabled?: WithDefault<boolean, true>;
970
+
971
+ /**
972
+ * If `false` the user won't be able to pinch/zoom the map.
973
+ *
974
+ * TODO: Why is the Android reactprop defaultvalue set to false?
975
+ *
976
+ * @default true
977
+ * @platform iOS: Supported
978
+ * @platform Android: Supported
979
+ */
980
+ zoomEnabled?: WithDefault<boolean, true>;
981
+
982
+ /**
983
+ * A Boolean value indicating whether the map displays traffic information.
984
+ *
985
+ * @default false
986
+ * @platform iOS: Google Maps only
987
+ * @platform Android: Supported
988
+ */
989
+ showsTraffic?: boolean;
990
+
991
+ /**
992
+ * If `false` the user won't be able to double tap to zoom the map.
993
+ * **Note:** But it will greatly decrease delay of tap gesture recognition.
994
+ *
995
+ * @default true
996
+ * @platform iOS: Google Maps only
997
+ * @platform Android: Not supported
998
+ */
999
+ zoomTapEnabled?: WithDefault<boolean, true>;
1000
+
1001
+ /**
1002
+ * Map camera distance limits. `minCenterCoordinateDistance` for minimum distance, `maxCenterCoordinateDistance` for maximum.
1003
+ * `animated` for animated zoom changes.
1004
+ * Takes precedence if conflicting with `minZoomLevel`, `maxZoomLevel`.
1005
+ *
1006
+ * @platform iOS: 13.0+
1007
+ * @platform Android: Not supported
1008
+ */
1009
+ cameraZoomRange?: CameraZoomRange;
1010
+ }
1011
+
1012
+ export interface NativeCommands {
1013
+ animateToRegion: (
1014
+ viewRef: React.ElementRef<React.ComponentType>,
1015
+ regionJSON: string,
1016
+ duration: Int32,
1017
+ ) => void;
1018
+
1019
+ setCamera: (
1020
+ viewRef: React.ElementRef<React.ComponentType>,
1021
+ cameraJSON: string,
1022
+ ) => void;
1023
+
1024
+ animateCamera: (
1025
+ viewRef: React.ElementRef<React.ComponentType>,
1026
+ cameraJSON: string,
1027
+ duration: Int32,
1028
+ ) => void;
1029
+
1030
+ fitToElements: (
1031
+ viewRef: React.ElementRef<React.ComponentType>,
1032
+ edgePaddingJSON: string,
1033
+ animated: boolean,
1034
+ ) => void;
1035
+
1036
+ fitToSuppliedMarkers: (
1037
+ viewRef: React.ElementRef<React.ComponentType>,
1038
+ markersJSON: string,
1039
+ edgePaddingJSON: string,
1040
+ animated: boolean,
1041
+ ) => void;
1042
+
1043
+ fitToCoordinates: (
1044
+ viewRef: React.ElementRef<React.ComponentType>,
1045
+ coordinatesJSON: string,
1046
+ edgePaddingJSON: string,
1047
+ animated: boolean,
1048
+ ) => void;
1049
+
1050
+ setIndoorActiveLevelIndex: (
1051
+ viewRef: React.ElementRef<React.ComponentType>,
1052
+ activeLevelIndex: Int32,
1053
+ ) => void;
1054
+ }
1055
+
1056
+ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
1057
+ supportedCommands: [
1058
+ 'animateToRegion',
1059
+ 'setCamera',
1060
+ 'animateCamera',
1061
+ 'fitToElements',
1062
+ 'fitToSuppliedMarkers',
1063
+ 'fitToCoordinates',
1064
+ 'setIndoorActiveLevelIndex',
1065
+ ],
1066
+ });
1067
+
1068
+ export default codegenNativeComponent<MapFabricNativeProps>(
1069
+ 'RNMapsMapView',
1070
+ {},
1071
+ ) as HostComponent<MapFabricNativeProps>;