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