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,709 @@
|
|
|
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 GoogleMapView from './NativeComponentGoogleMapView';
|
|
4
|
+
export type EdgePadding = Readonly<{
|
|
5
|
+
top: Double;
|
|
6
|
+
right: Double;
|
|
7
|
+
bottom: Double;
|
|
8
|
+
left: Double;
|
|
9
|
+
}>;
|
|
10
|
+
export type ActionType = 'callout-press' | 'press' | 'marker-press' | 'long-press' | 'marker-deselect' | 'marker-select';
|
|
11
|
+
export type Frame = Readonly<{
|
|
12
|
+
x: Double;
|
|
13
|
+
y: Double;
|
|
14
|
+
width: Double;
|
|
15
|
+
height: Double;
|
|
16
|
+
}>;
|
|
17
|
+
export type ClickEvent = BubblingEventHandler<Readonly<{
|
|
18
|
+
coordinate: {
|
|
19
|
+
latitude: Double;
|
|
20
|
+
longitude: Double;
|
|
21
|
+
};
|
|
22
|
+
position: {
|
|
23
|
+
x: Double;
|
|
24
|
+
y: Double;
|
|
25
|
+
};
|
|
26
|
+
}>>;
|
|
27
|
+
export type KmlMarker = {
|
|
28
|
+
id: string;
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
coordinate: {
|
|
32
|
+
latitude: Double;
|
|
33
|
+
longitude: Double;
|
|
34
|
+
};
|
|
35
|
+
position: {
|
|
36
|
+
x: Double;
|
|
37
|
+
y: Double;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type LongPressEventHandler = BubblingEventHandler<Readonly<{
|
|
41
|
+
coordinate: {
|
|
42
|
+
latitude: Double;
|
|
43
|
+
longitude: Double;
|
|
44
|
+
};
|
|
45
|
+
position: {
|
|
46
|
+
x: Double;
|
|
47
|
+
y: Double;
|
|
48
|
+
};
|
|
49
|
+
action?: string;
|
|
50
|
+
}>>;
|
|
51
|
+
export type MarkerDeselectEventHandler = BubblingEventHandler<Readonly<{
|
|
52
|
+
action?: string;
|
|
53
|
+
id: string;
|
|
54
|
+
coordinate: {
|
|
55
|
+
latitude: Double;
|
|
56
|
+
longitude: Double;
|
|
57
|
+
};
|
|
58
|
+
}>>;
|
|
59
|
+
export type MarkerSelectEventHandler = BubblingEventHandler<Readonly<{
|
|
60
|
+
action?: string;
|
|
61
|
+
id: string;
|
|
62
|
+
coordinate: {
|
|
63
|
+
latitude: Double;
|
|
64
|
+
longitude: Double;
|
|
65
|
+
};
|
|
66
|
+
}>>;
|
|
67
|
+
export type CalloutPressEvent = BubblingEventHandler<{
|
|
68
|
+
action?: string;
|
|
69
|
+
/**
|
|
70
|
+
* @platform iOS
|
|
71
|
+
*/
|
|
72
|
+
frame?: {
|
|
73
|
+
x: Double;
|
|
74
|
+
y: Double;
|
|
75
|
+
width: Double;
|
|
76
|
+
height: Double;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @platform iOS
|
|
80
|
+
*/
|
|
81
|
+
id?: string;
|
|
82
|
+
/**
|
|
83
|
+
* @platform iOS
|
|
84
|
+
*/
|
|
85
|
+
point?: {
|
|
86
|
+
x: Double;
|
|
87
|
+
y: Double;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* @platform Android
|
|
91
|
+
*/
|
|
92
|
+
coordinate?: {
|
|
93
|
+
latitude: Double;
|
|
94
|
+
longitude: Double;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* @platform Android
|
|
98
|
+
*/
|
|
99
|
+
position?: {
|
|
100
|
+
x: Double;
|
|
101
|
+
y: Double;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
export type CalloutPressEventHandler = DirectEventHandler<CalloutPressEvent>;
|
|
105
|
+
export type Camera = Readonly<{
|
|
106
|
+
/**
|
|
107
|
+
* Apple Maps
|
|
108
|
+
*/
|
|
109
|
+
altitude?: Double;
|
|
110
|
+
center: LatLng;
|
|
111
|
+
heading: Double;
|
|
112
|
+
pitch: Double;
|
|
113
|
+
/**
|
|
114
|
+
* Google Maps
|
|
115
|
+
*/
|
|
116
|
+
zoom?: Float;
|
|
117
|
+
}>;
|
|
118
|
+
export type LatLng = Readonly<{
|
|
119
|
+
latitude: Double;
|
|
120
|
+
longitude: Double;
|
|
121
|
+
}>;
|
|
122
|
+
export type Point = Readonly<{
|
|
123
|
+
x: Double;
|
|
124
|
+
y: Double;
|
|
125
|
+
}>;
|
|
126
|
+
export type Region = Readonly<LatLng & {
|
|
127
|
+
latitudeDelta: Double;
|
|
128
|
+
longitudeDelta: Double;
|
|
129
|
+
}>;
|
|
130
|
+
export type IndoorLevel = Readonly<{
|
|
131
|
+
index: Int32;
|
|
132
|
+
name: string;
|
|
133
|
+
shortName: string;
|
|
134
|
+
}>;
|
|
135
|
+
export type IndoorLevelActivatedEventHandler = DirectEventHandler<Readonly<{
|
|
136
|
+
activeLevelIndex: Int32;
|
|
137
|
+
name: string;
|
|
138
|
+
shortName: string;
|
|
139
|
+
}>>;
|
|
140
|
+
export type IndoorBuilding = Readonly<{
|
|
141
|
+
underground: boolean;
|
|
142
|
+
activeLevelIndex: Int32;
|
|
143
|
+
levels: ReadonlyArray<IndoorLevel>;
|
|
144
|
+
}>;
|
|
145
|
+
export type IndoorBuildingEventHandler = DirectEventHandler<Readonly<{
|
|
146
|
+
underground: boolean;
|
|
147
|
+
activeLevelIndex: Int32;
|
|
148
|
+
levels: string;
|
|
149
|
+
}>>;
|
|
150
|
+
export type KmlMapEventHandler = DirectEventHandler<Readonly<{}>>;
|
|
151
|
+
export type MapLoadedEventHandler = DirectEventHandler<Readonly<{}>>;
|
|
152
|
+
export type MapReadyEventHandler = DirectEventHandler<Readonly<{}>>;
|
|
153
|
+
export type Details = Readonly<{
|
|
154
|
+
isGesture?: boolean;
|
|
155
|
+
}>;
|
|
156
|
+
export type MarkerDragEventHandler = BubblingEventHandler<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 = BubblingEventHandler<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 = BubblingEventHandler<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 = BubblingEventHandler<Readonly<{
|
|
191
|
+
coordinate: {
|
|
192
|
+
latitude: Double;
|
|
193
|
+
longitude: Double;
|
|
194
|
+
};
|
|
195
|
+
position: {
|
|
196
|
+
x: Double;
|
|
197
|
+
y: Double;
|
|
198
|
+
};
|
|
199
|
+
}>>;
|
|
200
|
+
export type PoiClickEventHandler = BubblingEventHandler<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 RegionChangeStartEventHandler = DirectEventHandler<Details>;
|
|
224
|
+
export type RegionChangeEvent = Readonly<{
|
|
225
|
+
region: {
|
|
226
|
+
latitude: Double;
|
|
227
|
+
longitude: Double;
|
|
228
|
+
latitudeDelta: Double;
|
|
229
|
+
longitudeDelta: Double;
|
|
230
|
+
};
|
|
231
|
+
isGesture?: boolean;
|
|
232
|
+
}>;
|
|
233
|
+
export type RegionChangeEventHandler = BubblingEventHandler<RegionChangeEvent>;
|
|
234
|
+
export type UserLocationChangeEvent = Readonly<{
|
|
235
|
+
coordinate?: {
|
|
236
|
+
latitude: Double;
|
|
237
|
+
longitude: Double;
|
|
238
|
+
altitude: Double;
|
|
239
|
+
timestamp: Double;
|
|
240
|
+
accuracy: Float;
|
|
241
|
+
speed: Float;
|
|
242
|
+
heading: Float;
|
|
243
|
+
/**
|
|
244
|
+
* @platform iOS
|
|
245
|
+
*/
|
|
246
|
+
altitudeAccuracy?: Float;
|
|
247
|
+
/**
|
|
248
|
+
* @platform Android
|
|
249
|
+
*/
|
|
250
|
+
isFromMockProvider?: boolean;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* @platform iOS
|
|
254
|
+
*/
|
|
255
|
+
error?: Readonly<{
|
|
256
|
+
message: string;
|
|
257
|
+
}>;
|
|
258
|
+
}>;
|
|
259
|
+
export type UserLocationChangeEventHandler = DirectEventHandler<UserLocationChangeEvent>;
|
|
260
|
+
export type CameraZoomRange = Readonly<{
|
|
261
|
+
minCenterCoordinateDistance?: Double;
|
|
262
|
+
maxCenterCoordinateDistance?: Double;
|
|
263
|
+
animated?: boolean;
|
|
264
|
+
}>;
|
|
265
|
+
export interface MapFabricNativeProps extends ViewProps {
|
|
266
|
+
/**
|
|
267
|
+
* The camera view the map should display.
|
|
268
|
+
*
|
|
269
|
+
* Use the camera system, instead of the region system, if you need control over
|
|
270
|
+
* the pitch or heading. Using this will ignore the `region` property.
|
|
271
|
+
* @platform iOS: Supported
|
|
272
|
+
* @platform Android: Supported
|
|
273
|
+
*/
|
|
274
|
+
camera?: Camera;
|
|
275
|
+
/**
|
|
276
|
+
* The initial camera view the map should use. Use this prop instead of `camera`
|
|
277
|
+
* only if you don't want to control the camera of the map besides the initial view.
|
|
278
|
+
*
|
|
279
|
+
* Use the camera system, instead of the region system, if you need control over
|
|
280
|
+
* the pitch or heading.
|
|
281
|
+
*
|
|
282
|
+
* Changing this prop after the component has mounted will not result in a camera change.
|
|
283
|
+
*
|
|
284
|
+
* This is similar to the `initialValue` prop of a text input.
|
|
285
|
+
*
|
|
286
|
+
* @platform iOS: Supported
|
|
287
|
+
* @platform Android: Supported
|
|
288
|
+
*/
|
|
289
|
+
initialCamera?: Camera;
|
|
290
|
+
/**
|
|
291
|
+
* The initial region to be displayed by the map. Use this prop instead of `region`
|
|
292
|
+
* only if you don't want to control the viewport of the map besides the initial region.
|
|
293
|
+
*
|
|
294
|
+
* Changing this prop after the component has mounted will not result in a region change.
|
|
295
|
+
*
|
|
296
|
+
* This is similar to the `initialValue` prop of a text input.
|
|
297
|
+
*
|
|
298
|
+
* @platform iOS: Supported
|
|
299
|
+
* @platform Android: Supported
|
|
300
|
+
*/
|
|
301
|
+
initialRegion?: Region;
|
|
302
|
+
/**
|
|
303
|
+
* The URL for KML file.
|
|
304
|
+
*
|
|
305
|
+
* @platform iOS: Google Maps only
|
|
306
|
+
* @platform Android: Supported
|
|
307
|
+
*/
|
|
308
|
+
kmlSrc?: string;
|
|
309
|
+
/**
|
|
310
|
+
* https://developers.google.com/maps/documentation/get-map-id
|
|
311
|
+
* google cloud mapId to enable cloud styling and more
|
|
312
|
+
*/
|
|
313
|
+
googleMapId?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Sets loading background color.
|
|
316
|
+
*
|
|
317
|
+
* @default `#FFFFFF`
|
|
318
|
+
* @platform iOS: Supported
|
|
319
|
+
* @platform Android: Supported
|
|
320
|
+
*/
|
|
321
|
+
loadingBackgroundColor?: ColorValue;
|
|
322
|
+
/**
|
|
323
|
+
* Adds custom padding to each side of the map. Useful when map elements/markers are obscured.
|
|
324
|
+
*
|
|
325
|
+
* @platform iOS: Supported
|
|
326
|
+
* @platform Android: Supported
|
|
327
|
+
*/
|
|
328
|
+
mapPadding?: EdgePadding;
|
|
329
|
+
/**
|
|
330
|
+
* The map type to be displayed
|
|
331
|
+
*
|
|
332
|
+
* @default `standard`
|
|
333
|
+
* @platform iOS: hybrid | mutedStandard | satellite | standard | terrain | hybridFlyover | satelliteFlyover
|
|
334
|
+
* @platform Android: hybrid | none | satellite | standard | terrain
|
|
335
|
+
*/
|
|
336
|
+
mapType?: WithDefault<'hybrid' | 'mutedStandard' | 'none' | 'satellite' | 'standard' | 'terrain' | 'satelliteFlyover' | 'hybridFlyover', 'standard'>;
|
|
337
|
+
/**
|
|
338
|
+
* Maximum zoom value for the map, must be between 0 and 20
|
|
339
|
+
*
|
|
340
|
+
* @default 20
|
|
341
|
+
* @platform iOS: Supported
|
|
342
|
+
* @platform Android: Supported
|
|
343
|
+
* @deprecated on Apple Maps, use `cameraZoomRange` instead
|
|
344
|
+
*/
|
|
345
|
+
maxZoom?: Float;
|
|
346
|
+
/**
|
|
347
|
+
* Minimum zoom value for the map, must be between 0 and 20
|
|
348
|
+
*
|
|
349
|
+
* @default 0
|
|
350
|
+
* @platform iOS: Supported
|
|
351
|
+
* @platform Android: Supported
|
|
352
|
+
* @deprecated on Apple Maps, use `cameraZoomRange` instead
|
|
353
|
+
*/
|
|
354
|
+
minZoom?: Float;
|
|
355
|
+
/**
|
|
356
|
+
* Callback that is called when an indoor building is focused/unfocused
|
|
357
|
+
*
|
|
358
|
+
* @platform iOS: Google Maps only
|
|
359
|
+
* @platform Android: Supported
|
|
360
|
+
*/
|
|
361
|
+
onIndoorBuildingFocused?: IndoorBuildingEventHandler;
|
|
362
|
+
/**
|
|
363
|
+
* Callback that is called when a level on indoor building is activated
|
|
364
|
+
*
|
|
365
|
+
* @platform iOS: Google Maps only
|
|
366
|
+
* @platform Android: Supported
|
|
367
|
+
*/
|
|
368
|
+
onIndoorLevelActivated?: IndoorLevelActivatedEventHandler;
|
|
369
|
+
/**
|
|
370
|
+
* Callback that is called once the kml is fully loaded.
|
|
371
|
+
*
|
|
372
|
+
* @platform iOS: Google Maps only
|
|
373
|
+
* @platform Android: Supported
|
|
374
|
+
*/
|
|
375
|
+
onKmlReady?: KmlMapEventHandler;
|
|
376
|
+
/**
|
|
377
|
+
* Callback that is called when user makes a "long press" somewhere on the map.
|
|
378
|
+
*
|
|
379
|
+
* @platform iOS: Supported
|
|
380
|
+
* @platform Android: Supported
|
|
381
|
+
*/
|
|
382
|
+
onLongPress?: LongPressEventHandler;
|
|
383
|
+
/**
|
|
384
|
+
* Callback that is called when the map has finished rendering all tiles.
|
|
385
|
+
*
|
|
386
|
+
* @platform iOS: Google Maps only
|
|
387
|
+
* @platform Android: Supported
|
|
388
|
+
*/
|
|
389
|
+
onMapLoaded?: MapLoadedEventHandler;
|
|
390
|
+
/**
|
|
391
|
+
* Callback that is called once the map is ready.
|
|
392
|
+
*
|
|
393
|
+
* Event is optional, as the first onMapReady callback is intercepted
|
|
394
|
+
* on Android, and the event is not passed on.
|
|
395
|
+
*
|
|
396
|
+
* @platform iOS: Supported
|
|
397
|
+
* @platform Android: Supported
|
|
398
|
+
*/
|
|
399
|
+
onMapReady?: MapReadyEventHandler;
|
|
400
|
+
/**
|
|
401
|
+
* Callback that is called when a marker on the map becomes deselected.
|
|
402
|
+
* This will be called when the callout for that marker is about to be hidden.
|
|
403
|
+
*
|
|
404
|
+
* @platform iOS: Supported
|
|
405
|
+
* @platform Android: Supported
|
|
406
|
+
*/
|
|
407
|
+
onMarkerDeselect?: MarkerDeselectEventHandler;
|
|
408
|
+
/**
|
|
409
|
+
* Callback called continuously as a marker is dragged
|
|
410
|
+
*
|
|
411
|
+
* @platform iOS: Apple Maps only
|
|
412
|
+
* @platform Android: Supported
|
|
413
|
+
*/
|
|
414
|
+
onMarkerDrag?: MarkerDragEventHandler;
|
|
415
|
+
/**
|
|
416
|
+
* Callback that is called when a drag on a marker finishes.
|
|
417
|
+
* This is usually the point you will want to setState on the marker's coordinate again
|
|
418
|
+
*
|
|
419
|
+
* @platform iOS: Apple Maps only
|
|
420
|
+
* @platform Android: Supported
|
|
421
|
+
*/
|
|
422
|
+
onMarkerDragEnd?: MarkerDragStartEndEventHandler;
|
|
423
|
+
/**
|
|
424
|
+
* Callback that is called when the user initiates a drag on a marker (if it is draggable)
|
|
425
|
+
*
|
|
426
|
+
* @platform iOS: Apple Maps only
|
|
427
|
+
* @platform Android: Supported
|
|
428
|
+
*/
|
|
429
|
+
onMarkerDragStart?: MarkerDragStartEndEventHandler;
|
|
430
|
+
/**
|
|
431
|
+
* Callback that is called when a marker on the map is tapped by the user.
|
|
432
|
+
*
|
|
433
|
+
* @platform iOS: Supported
|
|
434
|
+
* @platform Android: Supported
|
|
435
|
+
*/
|
|
436
|
+
onMarkerPress?: MarkerPressEventHandler;
|
|
437
|
+
/**
|
|
438
|
+
* Callback that is called when a marker on the map becomes selected.
|
|
439
|
+
* This will be called when the callout for that marker is about to be shown.
|
|
440
|
+
*
|
|
441
|
+
* @platform iOS: Supported.
|
|
442
|
+
* @platform Android: Supported
|
|
443
|
+
*/
|
|
444
|
+
onMarkerSelect?: MarkerSelectEventHandler;
|
|
445
|
+
/**
|
|
446
|
+
* Callback that is called when user presses and drags the map.
|
|
447
|
+
* **NOTE**: for iOS `scrollEnabled` should be set to false to trigger the event
|
|
448
|
+
*
|
|
449
|
+
* @platform iOS: Supported
|
|
450
|
+
* @platform Android: Supported
|
|
451
|
+
*/
|
|
452
|
+
onPanDrag?: PanDragEventHandler;
|
|
453
|
+
/**
|
|
454
|
+
* Callback that is called when user click on a POI.
|
|
455
|
+
*
|
|
456
|
+
* @platform iOS: Google Maps only
|
|
457
|
+
* @platform Android: Supported
|
|
458
|
+
*/
|
|
459
|
+
onPoiClick?: PoiClickEventHandler;
|
|
460
|
+
/**
|
|
461
|
+
* Callback that is called when user taps on the map.
|
|
462
|
+
*
|
|
463
|
+
* @platform iOS: Supported
|
|
464
|
+
* @platform Android: Supported
|
|
465
|
+
*/
|
|
466
|
+
onPress?: MapPressEventHandler;
|
|
467
|
+
/**
|
|
468
|
+
* Callback that is called once before the region changes, such as when the user starts moving the map.
|
|
469
|
+
* `isGesture` property indicates if the move was from the user (true) or an animation (false).
|
|
470
|
+
* **Note**: `isGesture` is supported by Google Maps only.
|
|
471
|
+
*
|
|
472
|
+
* @platform iOS: Supported
|
|
473
|
+
* @platform Android: Supported
|
|
474
|
+
*/
|
|
475
|
+
onRegionChangeStart?: RegionChangeEventHandler;
|
|
476
|
+
/**
|
|
477
|
+
* Callback that is called continuously when the region changes, such as when a user is dragging the map.
|
|
478
|
+
* `isGesture` property indicates if the move was from the user (true) or an animation (false).
|
|
479
|
+
* **Note**: `isGesture` is supported by Google Maps only.
|
|
480
|
+
*
|
|
481
|
+
* @platform iOS: Supported
|
|
482
|
+
* @platform Android: Supported
|
|
483
|
+
*/
|
|
484
|
+
onRegionChange?: RegionChangeEventHandler;
|
|
485
|
+
/**
|
|
486
|
+
* Callback that is called once when the region changes, such as when the user is done moving the map.
|
|
487
|
+
* `isGesture` property indicates if the move was from the user (true) or an animation (false).
|
|
488
|
+
* **Note**: `isGesture` is supported by Google Maps only.
|
|
489
|
+
*
|
|
490
|
+
* @platform iOS: Supported
|
|
491
|
+
* @platform Android: Supported
|
|
492
|
+
*/
|
|
493
|
+
onRegionChangeComplete?: RegionChangeEventHandler;
|
|
494
|
+
/**
|
|
495
|
+
* Callback that is called when the underlying map figures our users current location
|
|
496
|
+
* (coordinate also includes isFromMockProvider value for Android API 18 and above).
|
|
497
|
+
* Make sure **showsUserLocation** is set to *true*.
|
|
498
|
+
*
|
|
499
|
+
* @platform iOS: Supported
|
|
500
|
+
* @platform Android: Supported
|
|
501
|
+
*/
|
|
502
|
+
onUserLocationChange?: UserLocationChangeEventHandler;
|
|
503
|
+
/**
|
|
504
|
+
* Indicates how/when to affect padding with safe area insets
|
|
505
|
+
*
|
|
506
|
+
* @platform iOS: Google Maps only
|
|
507
|
+
* @platform Android: Not supported
|
|
508
|
+
*/
|
|
509
|
+
paddingAdjustmentBehavior?: WithDefault<'always' | 'automatic' | 'never', 'never'>;
|
|
510
|
+
/**
|
|
511
|
+
* If `false` the user won't be able to adjust the camera’s pitch angle.
|
|
512
|
+
*
|
|
513
|
+
* @default true
|
|
514
|
+
* @platform iOS: Google Maps only
|
|
515
|
+
* @platform Android: Supported
|
|
516
|
+
*/
|
|
517
|
+
pitchEnabled?: WithDefault<boolean, true>;
|
|
518
|
+
/**
|
|
519
|
+
* The region to be displayed by the map.
|
|
520
|
+
* The region is defined by the center coordinates and the span of coordinates to display.
|
|
521
|
+
*
|
|
522
|
+
* @platform iOS: Supported
|
|
523
|
+
* @platform Android: Supported
|
|
524
|
+
*/
|
|
525
|
+
region?: Region;
|
|
526
|
+
/**
|
|
527
|
+
* If `false` the user won't be able to adjust the camera’s pitch angle.
|
|
528
|
+
*
|
|
529
|
+
* @default true
|
|
530
|
+
* @platform iOS: Google Maps only
|
|
531
|
+
* @platform Android: Supported
|
|
532
|
+
*/
|
|
533
|
+
rotateEnabled?: WithDefault<boolean, true>;
|
|
534
|
+
/**
|
|
535
|
+
* If `false` the map will stay centered while rotating or zooming.
|
|
536
|
+
*
|
|
537
|
+
* @default true
|
|
538
|
+
* @platform iOS: Google Maps only
|
|
539
|
+
* @platform Android: Supported
|
|
540
|
+
*/
|
|
541
|
+
scrollDuringRotateOrZoomEnabled?: WithDefault<boolean, true>;
|
|
542
|
+
/**
|
|
543
|
+
* If `false` the user won't be able to change the map region being displayed.
|
|
544
|
+
*
|
|
545
|
+
* @default true
|
|
546
|
+
* @platform iOS: Supported
|
|
547
|
+
* @platform Android: Supported
|
|
548
|
+
*/
|
|
549
|
+
scrollEnabled?: WithDefault<boolean, true>;
|
|
550
|
+
/**
|
|
551
|
+
* A Boolean indicating whether the map displays extruded building information.
|
|
552
|
+
*
|
|
553
|
+
* @default true
|
|
554
|
+
* @platform iOS: Not supported
|
|
555
|
+
* @platform Android: Supported
|
|
556
|
+
*/
|
|
557
|
+
showsBuildings?: WithDefault<boolean, true>;
|
|
558
|
+
/**
|
|
559
|
+
* If `false` compass won't be displayed on the map.
|
|
560
|
+
*
|
|
561
|
+
* @default true
|
|
562
|
+
* @platform iOS: Supported
|
|
563
|
+
* @platform Android: Supported
|
|
564
|
+
*/
|
|
565
|
+
showsCompass?: boolean;
|
|
566
|
+
/**
|
|
567
|
+
* A Boolean indicating whether indoor level picker should be enabled.
|
|
568
|
+
*
|
|
569
|
+
* @default false
|
|
570
|
+
* @platform iOS: Google Maps only
|
|
571
|
+
* @platform Android: Supported
|
|
572
|
+
*/
|
|
573
|
+
showsIndoorLevelPicker?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* A Boolean indicating whether indoor maps should be enabled.
|
|
576
|
+
*
|
|
577
|
+
* @default true
|
|
578
|
+
* @platform iOS: Google Maps only
|
|
579
|
+
* @platform Android: Supported
|
|
580
|
+
*/
|
|
581
|
+
showsIndoors?: WithDefault<boolean, true>;
|
|
582
|
+
/**
|
|
583
|
+
* If `false` hide the button to move the map to the current user's location.
|
|
584
|
+
*
|
|
585
|
+
* @default false
|
|
586
|
+
* @platform iOS: Google Maps only
|
|
587
|
+
* @platform Android: Supported
|
|
588
|
+
*/
|
|
589
|
+
showsMyLocationButton?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* A Boolean indicating whether the map shows scale information.
|
|
592
|
+
*
|
|
593
|
+
* @default true
|
|
594
|
+
* @platform iOS: Apple Maps only
|
|
595
|
+
* @platform Android: Not supported
|
|
596
|
+
*/
|
|
597
|
+
showsScale?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* A Boolean value indicating whether the map displays traffic information.
|
|
600
|
+
*
|
|
601
|
+
* @default false
|
|
602
|
+
* @platform iOS: Supported
|
|
603
|
+
* @platform Android: Not supported?
|
|
604
|
+
*/
|
|
605
|
+
showsTraffic?: boolean;
|
|
606
|
+
/**
|
|
607
|
+
* If `true` the users location will be displayed on the map.
|
|
608
|
+
*
|
|
609
|
+
* This will cause iOS to ask for location permissions.
|
|
610
|
+
* For iOS see: [DOCS](https://github.com/react-native-maps/react-native-maps/blob/master/docs/installation.md#set-the-usage-description-property)
|
|
611
|
+
* @default false
|
|
612
|
+
* @platform iOS: Supported
|
|
613
|
+
* @platform Android: Supported
|
|
614
|
+
*/
|
|
615
|
+
showsUserLocation?: boolean;
|
|
616
|
+
/**
|
|
617
|
+
* Sets the map to the style selected.
|
|
618
|
+
*
|
|
619
|
+
* @default System setting
|
|
620
|
+
* @platform iOS: Supported
|
|
621
|
+
* @platform Android: Supported
|
|
622
|
+
*/
|
|
623
|
+
userInterfaceStyle?: WithDefault<'system' | 'light' | 'dark', 'system'>;
|
|
624
|
+
/**
|
|
625
|
+
* Adds custom styling to the map component.
|
|
626
|
+
* See [README](https://github.com/react-native-maps/react-native-maps#customizing-the-map-style) for more information.
|
|
627
|
+
*
|
|
628
|
+
* @platform iOS: Google Maps only
|
|
629
|
+
* @platform Android: Supported
|
|
630
|
+
*/
|
|
631
|
+
customMapStyleString?: string;
|
|
632
|
+
/**
|
|
633
|
+
* If `true` clicking user location will show the default callout for userLocation annotation.
|
|
634
|
+
*
|
|
635
|
+
* @default false
|
|
636
|
+
* @platform iOS: Apple Maps only
|
|
637
|
+
* @platform Android: Not supported
|
|
638
|
+
*/
|
|
639
|
+
userLocationCalloutEnabled?: boolean;
|
|
640
|
+
/**
|
|
641
|
+
* Fastest interval the application will actively acquire locations.
|
|
642
|
+
*
|
|
643
|
+
* See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
|
|
644
|
+
*
|
|
645
|
+
* @default 5000
|
|
646
|
+
* @platform iOS: Not supported
|
|
647
|
+
* @platform Android: Supported
|
|
648
|
+
*/
|
|
649
|
+
userLocationFastestInterval?: Int32;
|
|
650
|
+
/**
|
|
651
|
+
* Set power priority of user location tracking.
|
|
652
|
+
*
|
|
653
|
+
* See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
|
|
654
|
+
*
|
|
655
|
+
* @default `high`
|
|
656
|
+
* @platform iOS: Not supported
|
|
657
|
+
* @platform Android: Supported
|
|
658
|
+
*/
|
|
659
|
+
userLocationPriority?: WithDefault<'balanced' | 'high' | 'low' | 'passive', 'high'>;
|
|
660
|
+
/**
|
|
661
|
+
* Interval of user location updates in milliseconds.
|
|
662
|
+
*
|
|
663
|
+
* See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html)
|
|
664
|
+
*
|
|
665
|
+
* @default 5000
|
|
666
|
+
* @platform iOS: Not supported
|
|
667
|
+
* @platform Android: Supported
|
|
668
|
+
*/
|
|
669
|
+
userLocationUpdateInterval?: Int32;
|
|
670
|
+
/**
|
|
671
|
+
* If `false` the zoom control at the bottom right of the map won't be visible.
|
|
672
|
+
*
|
|
673
|
+
* @default true
|
|
674
|
+
* @platform iOS: Not supported
|
|
675
|
+
* @platform Android: Supported
|
|
676
|
+
*/
|
|
677
|
+
zoomControlEnabled?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* If `false` the user won't be able to pinch/zoom the map.
|
|
680
|
+
*
|
|
681
|
+
* TODO: Why is the Android reactprop defaultvalue set to false?
|
|
682
|
+
*
|
|
683
|
+
* @default true
|
|
684
|
+
* @platform iOS: Supported
|
|
685
|
+
* @platform Android: Supported
|
|
686
|
+
*/
|
|
687
|
+
zoomEnabled?: WithDefault<boolean, true>;
|
|
688
|
+
/**
|
|
689
|
+
* If `false` the user won't be able to double tap to zoom the map.
|
|
690
|
+
* **Note:** But it will greatly decrease delay of tap gesture recognition.
|
|
691
|
+
*
|
|
692
|
+
* @default true
|
|
693
|
+
* @platform iOS: Google Maps only
|
|
694
|
+
* @platform Android: Not supported
|
|
695
|
+
*/
|
|
696
|
+
zoomTapEnabled?: WithDefault<boolean, true>;
|
|
697
|
+
}
|
|
698
|
+
interface NativeCommands {
|
|
699
|
+
animateToRegion: (viewRef: React.ElementRef<typeof GoogleMapView>, regionJSON: string, duration: Int32) => void;
|
|
700
|
+
setCamera: (viewRef: React.ElementRef<typeof GoogleMapView>, cameraJSON: string) => void;
|
|
701
|
+
animateCamera: (viewRef: React.ElementRef<typeof GoogleMapView>, cameraJSON: string, duration: Int32) => void;
|
|
702
|
+
fitToElements: (viewRef: React.ElementRef<typeof GoogleMapView>, edgePaddingJSON: string, animated: boolean) => void;
|
|
703
|
+
fitToSuppliedMarkers: (viewRef: React.ElementRef<typeof GoogleMapView>, markersJSON: string, edgePaddingJSON: string, animated: boolean) => void;
|
|
704
|
+
fitToCoordinates: (viewRef: React.ElementRef<typeof GoogleMapView>, coordinatesJSON: string, edgePaddingJSON: string, animated: boolean) => void;
|
|
705
|
+
setIndoorActiveLevelIndex: (viewRef: React.ElementRef<typeof GoogleMapView>, activeLevelIndex: Int32) => void;
|
|
706
|
+
}
|
|
707
|
+
export declare const Commands: NativeCommands;
|
|
708
|
+
declare const _default: HostComponent<MapFabricNativeProps>;
|
|
709
|
+
export default _default;
|