react-native-maps 1.21.0-alpha.112 → 1.21.0-alpha.113

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