react-native-maps 1.4.0-beta.1 → 1.5.0-beta.1
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/README.md +63 -87
- package/lib/AnimatedRegion.d.ts +1 -1
- package/lib/Geojson.d.ts +5 -5
- package/lib/MapCallout.d.ts +2 -2
- package/lib/MapCalloutSubview.d.ts +3 -3
- package/lib/MapCircle.d.ts +2 -2
- package/lib/MapHeatmap.d.ts +3 -3
- package/lib/MapLocalTile.d.ts +2 -2
- package/lib/MapMarker.d.ts +3 -3
- package/lib/MapMarkerNativeComponent.d.ts +1 -1
- package/lib/MapOverlay.d.ts +4 -4
- package/lib/MapPolygon.d.ts +3 -3
- package/lib/MapPolyline.d.ts +3 -3
- package/lib/MapUrlTile.d.ts +2 -2
- package/lib/MapView.d.ts +4 -4
- package/lib/MapView.types.d.ts +24 -24
- package/lib/MapViewNativeComponent.d.ts +1 -1
- package/lib/MapWMSTile.d.ts +2 -2
- package/lib/decorateMapComponent.d.ts +7 -7
- package/lib/sharedTypes.d.ts +14 -14
- package/lib/sharedTypesInternal.d.ts +1 -1
- package/package.json +17 -15
- package/react-native-google-maps.podspec +1 -2
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
React Native Map components for iOS + Android
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
## Contributing
|
|
6
|
+
|
|
7
7
|
This project is being maintained by a small group of people, and any help with issues and pull requests are always appreciated. If you are able and willing to contribute, please read the [guidelines](./CONTRIBUTING.md).
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
@@ -41,6 +41,7 @@ See [Setup Instructions for the Included Example Project](docs/examples-setup.md
|
|
|
41
41
|
```js
|
|
42
42
|
import MapView from 'react-native-maps';
|
|
43
43
|
```
|
|
44
|
+
|
|
44
45
|
or
|
|
45
46
|
|
|
46
47
|
```js
|
|
@@ -54,15 +55,16 @@ declaratively controlling features on the map.
|
|
|
54
55
|
### Rendering a Map with an initial region
|
|
55
56
|
|
|
56
57
|
## MapView
|
|
58
|
+
|
|
57
59
|
```jsx
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
<MapView
|
|
61
|
+
initialRegion={{
|
|
62
|
+
latitude: 37.78825,
|
|
63
|
+
longitude: -122.4324,
|
|
64
|
+
latitudeDelta: 0.0922,
|
|
65
|
+
longitudeDelta: 0.0421,
|
|
66
|
+
}}
|
|
67
|
+
/>
|
|
66
68
|
```
|
|
67
69
|
|
|
68
70
|
### Using a MapView while controlling the region as state
|
|
@@ -96,12 +98,9 @@ render() {
|
|
|
96
98
|
### Rendering a list of markers on a map
|
|
97
99
|
|
|
98
100
|
```jsx
|
|
99
|
-
import {
|
|
101
|
+
import {Marker} from 'react-native-maps';
|
|
100
102
|
|
|
101
|
-
<MapView
|
|
102
|
-
region={this.state.region}
|
|
103
|
-
onRegionChange={this.onRegionChange}
|
|
104
|
-
>
|
|
103
|
+
<MapView region={this.state.region} onRegionChange={this.onRegionChange}>
|
|
105
104
|
{this.state.markers.map((marker, index) => (
|
|
106
105
|
<Marker
|
|
107
106
|
key={index}
|
|
@@ -110,16 +109,18 @@ import { Marker } from 'react-native-maps';
|
|
|
110
109
|
description={marker.description}
|
|
111
110
|
/>
|
|
112
111
|
))}
|
|
113
|
-
</MapView
|
|
112
|
+
</MapView>;
|
|
114
113
|
```
|
|
115
114
|
|
|
116
115
|
### Rendering a Marker with a custom image
|
|
116
|
+
|
|
117
117
|
1. You need to generate an `png` image with various resolution (lets call them `custom_pin`) - for more information go to [Android](https://developer.android.com/studio/write/resource-manager#import), [iOS](https://developer.apple.com/documentation/xcode/adding-images-to-your-xcode-project)
|
|
118
|
-
2. put all images in Android drawables and iOS assets dir
|
|
118
|
+
2. put all images in Android drawables and iOS assets dir
|
|
119
119
|
3. Now you can use the following code:
|
|
120
|
+
|
|
120
121
|
```jsx
|
|
121
122
|
<Marker
|
|
122
|
-
coordinate={{
|
|
123
|
+
coordinate={{latitude: latitude, longitude: longitude}}
|
|
123
124
|
image={{uri: 'custom_pin'}}
|
|
124
125
|
/>
|
|
125
126
|
```
|
|
@@ -127,10 +128,11 @@ import { Marker } from 'react-native-maps';
|
|
|
127
128
|
Note: You can also pass the image binary data like `image={require('custom_pin.png')}`, but this will not scale good with the different screen sizes.
|
|
128
129
|
|
|
129
130
|
### Rendering a Marker with a custom view
|
|
131
|
+
|
|
130
132
|
Note: This has performance implications, if you wish for a simpler solution go with a custom image (save your self the head ache)
|
|
131
133
|
|
|
132
134
|
```jsx
|
|
133
|
-
<Marker coordinate={{
|
|
135
|
+
<Marker coordinate={{latitude: latitude, longitude: longitude}}>
|
|
134
136
|
<MyCustomMarkerView {...marker} />
|
|
135
137
|
</Marker>
|
|
136
138
|
```
|
|
@@ -138,14 +140,14 @@ Note: This has performance implications, if you wish for a simpler solution go w
|
|
|
138
140
|
### Rendering a custom Marker with a custom Callout
|
|
139
141
|
|
|
140
142
|
```jsx
|
|
141
|
-
import {
|
|
143
|
+
import {Callout} from 'react-native-maps';
|
|
142
144
|
|
|
143
145
|
<Marker coordinate={marker.latlng}>
|
|
144
146
|
<MyCustomMarkerView {...marker} />
|
|
145
147
|
<Callout>
|
|
146
148
|
<MyCustomCalloutView {...marker} />
|
|
147
149
|
</Callout>
|
|
148
|
-
</Marker
|
|
150
|
+
</Marker>;
|
|
149
151
|
```
|
|
150
152
|
|
|
151
153
|
### Draggable Markers
|
|
@@ -164,12 +166,9 @@ import { Callout } from 'react-native-maps';
|
|
|
164
166
|
#### Tile Overlay using tile server
|
|
165
167
|
|
|
166
168
|
```jsx
|
|
167
|
-
import {
|
|
169
|
+
import {UrlTile} from 'react-native-maps';
|
|
168
170
|
|
|
169
|
-
<MapView
|
|
170
|
-
region={this.state.region}
|
|
171
|
-
onRegionChange={this.onRegionChange}
|
|
172
|
-
>
|
|
171
|
+
<MapView region={this.state.region} onRegionChange={this.onRegionChange}>
|
|
173
172
|
<UrlTile
|
|
174
173
|
/**
|
|
175
174
|
* The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
|
|
@@ -187,13 +186,15 @@ import { UrlTile } from 'react-native-maps';
|
|
|
187
186
|
*/
|
|
188
187
|
flipY={false}
|
|
189
188
|
/>
|
|
190
|
-
</MapView
|
|
189
|
+
</MapView>;
|
|
191
190
|
```
|
|
192
191
|
|
|
193
192
|
For Android: add the following line in your AndroidManifest.xml
|
|
193
|
+
|
|
194
194
|
```xml
|
|
195
195
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
196
196
|
```
|
|
197
|
+
|
|
197
198
|
For IOS: configure [App Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33) in your app
|
|
198
199
|
|
|
199
200
|
#### Tile Overlay using local tiles
|
|
@@ -201,27 +202,25 @@ For IOS: configure [App Transport Security](https://developer.apple.com/library/
|
|
|
201
202
|
Tiles can be stored locally within device using xyz tiling scheme and displayed as tile overlay as well. This is usefull especially for offline map usage when tiles are available for selected map region within device storage.
|
|
202
203
|
|
|
203
204
|
```jsx
|
|
204
|
-
import {
|
|
205
|
+
import {LocalTile} from 'react-native-maps';
|
|
205
206
|
|
|
206
|
-
<MapView
|
|
207
|
-
region={this.state.region}
|
|
208
|
-
onRegionChange={this.onRegionChange}
|
|
209
|
-
>
|
|
207
|
+
<MapView region={this.state.region} onRegionChange={this.onRegionChange}>
|
|
210
208
|
<LocalTile
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
209
|
+
/**
|
|
210
|
+
* The path template of the locally stored tiles. The patterns {x} {y} {z} will be replaced at runtime
|
|
211
|
+
* For example, /storage/emulated/0/mytiles/{z}/{x}/{y}.png
|
|
212
|
+
*/
|
|
213
|
+
pathTemplate={this.state.pathTemplate}
|
|
214
|
+
/**
|
|
215
|
+
* The size of provided local tiles (usually 256 or 512).
|
|
216
|
+
*/
|
|
217
|
+
tileSize={256}
|
|
220
218
|
/>
|
|
221
|
-
</MapView
|
|
219
|
+
</MapView>;
|
|
222
220
|
```
|
|
223
221
|
|
|
224
222
|
For Android: LocalTile is still just overlay over original map tiles. It means that if device is online, underlying tiles will be still downloaded. If original tiles download/display is not desirable set mapType to 'none'. For example:
|
|
223
|
+
|
|
225
224
|
```
|
|
226
225
|
<MapView
|
|
227
226
|
mapType={Platform.OS == "android" ? "none" : "standard"}
|
|
@@ -265,6 +264,7 @@ render() {
|
|
|
265
264
|
);
|
|
266
265
|
}
|
|
267
266
|
```
|
|
267
|
+
|
|
268
268
|
For iOS, in addition to providing the `mapStyle` you will need to do the following
|
|
269
269
|
|
|
270
270
|
```jsx
|
|
@@ -291,36 +291,26 @@ This example displays some of them in a log as a demonstration.
|
|
|
291
291
|
|
|
292
292
|
 
|
|
293
293
|
|
|
294
|
-
|
|
295
|
-
|
|
296
294
|
### Tracking Region / Location
|
|
297
295
|
|
|
298
296
|
 
|
|
299
297
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
298
|
### Programmatically Changing Region
|
|
304
299
|
|
|
305
300
|
One can change the mapview's position using refs and component methods, or by passing in an updated
|
|
306
|
-
`region` prop.
|
|
301
|
+
`region` prop. The component methods will allow one to animate to a given position like the native
|
|
307
302
|
API could.
|
|
308
303
|
|
|
309
304
|
 
|
|
310
305
|
|
|
311
|
-
|
|
312
306
|
### Changing the style of the map
|
|
313
307
|
|
|
314
308
|

|
|
315
309
|
|
|
316
|
-
|
|
317
|
-
|
|
318
310
|
### Arbitrary React Views as Markers
|
|
319
311
|
|
|
320
312
|
 
|
|
321
313
|
|
|
322
|
-
|
|
323
|
-
|
|
324
314
|
### Using the MapView with the Animated API
|
|
325
315
|
|
|
326
316
|
The `<MapView />` component can be made to work with the Animated API, having the entire `region` prop
|
|
@@ -338,14 +328,10 @@ Markers' coordinates can also be animated, as shown in this example:
|
|
|
338
328
|
|
|
339
329
|
 
|
|
340
330
|
|
|
341
|
-
|
|
342
|
-
|
|
343
331
|
### Polygon Creator
|
|
344
332
|
|
|
345
333
|
 
|
|
346
334
|
|
|
347
|
-
|
|
348
|
-
|
|
349
335
|
### Other Overlays
|
|
350
336
|
|
|
351
337
|
So far, `<Circle />`, `<Polygon />`, and `<Polyline />` are available to pass in as children to the
|
|
@@ -353,16 +339,12 @@ So far, `<Circle />`, `<Polygon />`, and `<Polyline />` are available to pass in
|
|
|
353
339
|
|
|
354
340
|
 
|
|
355
341
|
|
|
356
|
-
|
|
357
|
-
|
|
358
342
|
### Gradient Polylines (iOS MapKit only)
|
|
359
343
|
|
|
360
344
|
Gradient polylines can be created using the `strokeColors` prop of the `<Polyline>` component.
|
|
361
345
|
|
|
362
346
|

|
|
363
347
|
|
|
364
|
-
|
|
365
|
-
|
|
366
348
|
### Default Markers
|
|
367
349
|
|
|
368
350
|
Default markers will be rendered unless a custom marker is specified. One can optionally adjust the
|
|
@@ -370,11 +352,9 @@ color of the default marker by using the `pinColor` prop.
|
|
|
370
352
|
|
|
371
353
|
 
|
|
372
354
|
|
|
373
|
-
|
|
374
|
-
|
|
375
355
|
### Custom Callouts
|
|
376
356
|
|
|
377
|
-
Callouts to markers can be completely arbitrary react views, similar to markers.
|
|
357
|
+
Callouts to markers can be completely arbitrary react views, similar to markers. As a result, they
|
|
378
358
|
can be interacted with like any other view.
|
|
379
359
|
|
|
380
360
|
Additionally, you can fall back to the standard behavior of just having a title/description through
|
|
@@ -388,16 +368,12 @@ See `Callouts.js` example.
|
|
|
388
368
|
|
|
389
369
|
 
|
|
390
370
|
|
|
391
|
-
|
|
392
|
-
|
|
393
371
|
### Image-based Markers
|
|
394
372
|
|
|
395
373
|
Markers can be customized by just using images, and specified using the `image` prop.
|
|
396
374
|
|
|
397
375
|

|
|
398
376
|
|
|
399
|
-
|
|
400
|
-
|
|
401
377
|
### Draggable Markers
|
|
402
378
|
|
|
403
379
|
Markers are draggable, and emit continuous drag events to update other UI during drags.
|
|
@@ -558,10 +534,10 @@ Pass an array of coordinates to focus a map region on said coordinates.
|
|
|
558
534
|
|
|
559
535
|
#### My map is blank
|
|
560
536
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
537
|
+
- Make sure that you have [properly installed](docs/installation.md) react-native-maps.
|
|
538
|
+
- Check in the logs if there is more informations about the issue.
|
|
539
|
+
- Try setting the style of the MapView to an absolute position with top, left, right and bottom values set.
|
|
540
|
+
- Make sure you have enabled Google Maps API in [Google developer console](https://console.developers.google.com/apis/library)
|
|
565
541
|
|
|
566
542
|
```javascript
|
|
567
543
|
const styles = StyleSheet.create({
|
|
@@ -580,14 +556,14 @@ const styles = StyleSheet.create({
|
|
|
580
556
|
|
|
581
557
|
#### Inputs don't focus
|
|
582
558
|
|
|
583
|
-
|
|
559
|
+
- When inputs don't focus or elements don't respond to tap, look at the order of the view hierarchy, sometimes the issue could be due to ordering of rendered components, prefer putting MapView as the first component.
|
|
584
560
|
|
|
585
561
|
Bad:
|
|
586
562
|
|
|
587
563
|
```jsx
|
|
588
564
|
<View>
|
|
589
|
-
<TextInput/>
|
|
590
|
-
<MapView/>
|
|
565
|
+
<TextInput />
|
|
566
|
+
<MapView />
|
|
591
567
|
</View>
|
|
592
568
|
```
|
|
593
569
|
|
|
@@ -595,31 +571,32 @@ Good:
|
|
|
595
571
|
|
|
596
572
|
```jsx
|
|
597
573
|
<View>
|
|
598
|
-
<MapView/>
|
|
599
|
-
<TextInput/>
|
|
574
|
+
<MapView />
|
|
575
|
+
<TextInput />
|
|
600
576
|
</View>
|
|
601
577
|
```
|
|
602
578
|
|
|
603
579
|
#### Children Components Not Re-Rendering
|
|
580
|
+
|
|
604
581
|
Components that aren't declared by this library (Ex: Markers, Polyline) must not be children of the MapView component due to MapView's unique rendering methodology. Have your custom components / views outside the MapView component and position absolute to ensure they only re-render as needed.
|
|
605
582
|
Example:
|
|
606
583
|
Bad:
|
|
607
584
|
|
|
608
585
|
```jsx
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
586
|
+
<View style={StyleSheet.absoluteFillObject}>
|
|
587
|
+
<MapView style={StyleSheet.absoluteFillObject}>
|
|
588
|
+
<View style={{position: 'absolute', top: 100, left: 50}} />
|
|
589
|
+
</MapView>
|
|
590
|
+
</View>
|
|
614
591
|
```
|
|
615
592
|
|
|
616
593
|
Good:
|
|
617
594
|
|
|
618
595
|
```jsx
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
596
|
+
<View style={StyleSheet.absoluteFillObject}>
|
|
597
|
+
<MapView style={StyleSheet.absoluteFillObject} />
|
|
598
|
+
<View style={{position: 'absolute', top: 100, left: 50}} />
|
|
599
|
+
</View>
|
|
623
600
|
```
|
|
624
601
|
|
|
625
602
|
Source: https://github.com/react-native-maps/react-native-maps/issues/1901
|
|
@@ -630,8 +607,7 @@ Source: https://github.com/react-native-maps/react-native-maps/issues/1901
|
|
|
630
607
|
|
|
631
608
|
Source: https://github.com/react-native-maps/react-native-maps/issues/3957#issuecomment-924161121
|
|
632
609
|
|
|
633
|
-
License
|
|
634
|
-
--------
|
|
610
|
+
## License
|
|
635
611
|
|
|
636
612
|
Copyright (c) 2017 Airbnb
|
|
637
613
|
|
package/lib/AnimatedRegion.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Animated } from 'react-native';
|
|
2
2
|
import { Region } from './sharedTypes';
|
|
3
3
|
declare const AnimatedWithChildren: any;
|
|
4
|
-
|
|
4
|
+
type Props = Partial<Region> | undefined;
|
|
5
5
|
export default class AnimatedMapRegion extends AnimatedWithChildren {
|
|
6
6
|
constructor(valueIn?: Props);
|
|
7
7
|
setValue(value: Region): void;
|
package/lib/Geojson.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { MapMarkerProps as MarkerProps } from './MapMarker';
|
|
|
4
4
|
import { MapPolygonProps as PolygonProps } from './MapPolygon';
|
|
5
5
|
import { MapPolylineProps as PolylineProps } from './MapPolyline';
|
|
6
6
|
import { LatLng } from './sharedTypes';
|
|
7
|
-
export
|
|
7
|
+
export type GeojsonProps = {
|
|
8
8
|
/**
|
|
9
9
|
* The pincolor used on markers
|
|
10
10
|
*
|
|
@@ -153,23 +153,23 @@ export declare type GeojsonProps = {
|
|
|
153
153
|
};
|
|
154
154
|
declare const Geojson: (props: GeojsonProps) => JSX.Element;
|
|
155
155
|
export default Geojson;
|
|
156
|
-
|
|
156
|
+
type OverlayPressEvent = {
|
|
157
157
|
type: AnyPointOverlay['type'] | AnyLineStringOverlay['type'] | AnyPolygonOverlay['type'];
|
|
158
158
|
feature: AnyPointOverlay['feature'] | AnyLineStringOverlay['feature'] | AnyPolygonOverlay['feature'];
|
|
159
159
|
coordinates: AnyPointOverlay['coordinates'] | AnyLineStringOverlay['coordinates'] | AnyPolygonOverlay['coordinates'];
|
|
160
160
|
holes?: AnyPolygonOverlay['holes'];
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
type AnyPointOverlay = {
|
|
163
163
|
type: 'point';
|
|
164
164
|
feature: Feature<Point | MultiPoint>;
|
|
165
165
|
coordinates: LatLng;
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
type AnyLineStringOverlay = {
|
|
168
168
|
type: 'polyline';
|
|
169
169
|
feature: Feature<LineString | MultiLineString>;
|
|
170
170
|
coordinates: LatLng[];
|
|
171
171
|
};
|
|
172
|
-
|
|
172
|
+
type AnyPolygonOverlay = {
|
|
173
173
|
type: 'polygon';
|
|
174
174
|
feature: Feature<Polygon | MultiPolygon>;
|
|
175
175
|
coordinates: LatLng[];
|
package/lib/MapCallout.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { ViewProps } from 'react-native';
|
|
3
3
|
import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { CalloutPressEvent } from './sharedTypes';
|
|
5
|
-
export
|
|
5
|
+
export type MapCalloutProps = ViewProps & {
|
|
6
6
|
/**
|
|
7
7
|
* If `true`, clicks on transparent areas in callout will be passed to map.
|
|
8
8
|
*
|
|
@@ -28,7 +28,7 @@ export declare type MapCalloutProps = ViewProps & {
|
|
|
28
28
|
*/
|
|
29
29
|
tooltip?: boolean;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
type NativeProps = MapCalloutProps;
|
|
32
32
|
export declare class MapCallout extends React.Component<MapCalloutProps> {
|
|
33
33
|
context: React.ContextType<typeof ProviderContext>;
|
|
34
34
|
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
3
3
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { Frame, Point } from './sharedTypes';
|
|
5
|
-
export
|
|
5
|
+
export type MapCalloutSubviewProps = ViewProps & {
|
|
6
6
|
/**
|
|
7
7
|
* Callback that is called when the user presses on this subview inside callout
|
|
8
8
|
*
|
|
@@ -11,7 +11,7 @@ export declare type MapCalloutSubviewProps = ViewProps & {
|
|
|
11
11
|
*/
|
|
12
12
|
onPress?: (event: CalloutSubviewPressEvent) => void;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type NativeProps = MapCalloutSubviewProps;
|
|
15
15
|
export declare class MapCalloutSubview extends React.Component<MapCalloutSubviewProps> {
|
|
16
16
|
context: React.ContextType<typeof ProviderContext>;
|
|
17
17
|
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
@@ -21,7 +21,7 @@ export declare class MapCalloutSubview extends React.Component<MapCalloutSubview
|
|
|
21
21
|
}
|
|
22
22
|
declare const _default: typeof MapCalloutSubview;
|
|
23
23
|
export default _default;
|
|
24
|
-
|
|
24
|
+
type CalloutSubviewPressEvent = NativeSyntheticEvent<{
|
|
25
25
|
/**
|
|
26
26
|
* Apple Maps: `callout-inside-press`
|
|
27
27
|
*
|
package/lib/MapCircle.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { View, ViewProps } from 'react-native';
|
|
3
3
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { LatLng, LineCapType, LineJoinType } from './sharedTypes';
|
|
5
|
-
export
|
|
5
|
+
export type MapCircleProps = ViewProps & {
|
|
6
6
|
/**
|
|
7
7
|
* The coordinates of the center of the circle.
|
|
8
8
|
*
|
|
@@ -100,7 +100,7 @@ export declare type MapCircleProps = ViewProps & {
|
|
|
100
100
|
*/
|
|
101
101
|
zIndex?: number;
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
type NativeProps = MapCircleProps & {
|
|
104
104
|
ref: React.RefObject<View>;
|
|
105
105
|
};
|
|
106
106
|
export declare class MapCircle extends React.Component<MapCircleProps> {
|
package/lib/MapHeatmap.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ProcessedColorValue, View, ViewProps } from 'react-native';
|
|
|
3
3
|
import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { LatLng } from './sharedTypes';
|
|
5
5
|
import { Modify } from './sharedTypesInternal';
|
|
6
|
-
export
|
|
6
|
+
export type MapHeatmapProps = ViewProps & {
|
|
7
7
|
gradient?: {
|
|
8
8
|
/**
|
|
9
9
|
* Resolution of color map -- number corresponding to the number of steps colors are interpolated into.
|
|
@@ -54,7 +54,7 @@ export declare type MapHeatmapProps = ViewProps & {
|
|
|
54
54
|
*/
|
|
55
55
|
radius?: number;
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
type NativeProps = Modify<MapHeatmapProps, {
|
|
58
58
|
gradient?: Modify<MapHeatmapProps['gradient'], {
|
|
59
59
|
colors: (ProcessedColorValue | null | undefined)[];
|
|
60
60
|
}>;
|
|
@@ -73,6 +73,6 @@ export declare class MapHeatmap extends React.Component<MapHeatmapProps> {
|
|
|
73
73
|
}
|
|
74
74
|
declare const _default: typeof MapHeatmap;
|
|
75
75
|
export default _default;
|
|
76
|
-
|
|
76
|
+
type WeightedLatLng = LatLng & {
|
|
77
77
|
weight?: number;
|
|
78
78
|
};
|
package/lib/MapLocalTile.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ViewProps } from 'react-native';
|
|
3
3
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
|
-
export
|
|
4
|
+
export type MapLocalTileProps = ViewProps & {
|
|
5
5
|
/**
|
|
6
6
|
* @platform iOS: Apple Maps only
|
|
7
7
|
* @platform Android: Supported
|
|
@@ -23,7 +23,7 @@ export declare type MapLocalTileProps = ViewProps & {
|
|
|
23
23
|
*/
|
|
24
24
|
zIndex?: number;
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
type NativeProps = MapLocalTileProps;
|
|
27
27
|
export declare class MapLocalTile extends React.Component<MapLocalTileProps> {
|
|
28
28
|
context: React.ContextType<typeof ProviderContext>;
|
|
29
29
|
getNativeComponent: () => NativeComponent<NativeProps>;
|
package/lib/MapMarker.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand }
|
|
|
4
4
|
import { MapMarkerNativeComponentType } from './MapMarkerNativeComponent';
|
|
5
5
|
import { CalloutPressEvent, LatLng, MarkerDeselectEvent, MarkerDragEvent, MarkerDragStartEndEvent, MarkerPressEvent, MarkerSelectEvent, Point } from './sharedTypes';
|
|
6
6
|
import { Modify } from './sharedTypesInternal';
|
|
7
|
-
export
|
|
7
|
+
export type MapMarkerProps = ViewProps & {
|
|
8
8
|
/**
|
|
9
9
|
* Sets the anchor point for the marker.
|
|
10
10
|
* The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.
|
|
@@ -261,8 +261,8 @@ export declare type MapMarkerProps = ViewProps & {
|
|
|
261
261
|
*/
|
|
262
262
|
zIndex?: number;
|
|
263
263
|
};
|
|
264
|
-
|
|
265
|
-
export
|
|
264
|
+
type OmittedProps = Omit<MapMarkerProps, 'stopPropagation'>;
|
|
265
|
+
export type NativeProps = Modify<OmittedProps, {
|
|
266
266
|
icon?: string;
|
|
267
267
|
image?: MapMarkerProps['image'] | string;
|
|
268
268
|
}> & {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { HostComponent } from 'react-native';
|
|
3
3
|
import { NativeProps } from './MapMarker';
|
|
4
4
|
import { LatLng } from './sharedTypes';
|
|
5
|
-
export
|
|
5
|
+
export type MapMarkerNativeComponentType = HostComponent<NativeProps>;
|
|
6
6
|
interface NativeCommands {
|
|
7
7
|
showCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
|
|
8
8
|
hideCallout: (viewRef: NonNullable<React.RefObject<MapMarkerNativeComponentType>['current']>) => void;
|
package/lib/MapOverlay.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Animated, ViewProps, ImageURISource, ImageRequireSource, NativeSyntheti
|
|
|
3
3
|
import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { LatLng, Point } from './sharedTypes';
|
|
5
5
|
import { Modify } from './sharedTypesInternal';
|
|
6
|
-
export
|
|
6
|
+
export type MapOverlayProps = ViewProps & {
|
|
7
7
|
/**
|
|
8
8
|
* The bearing in degrees clockwise from north. Values outside the range [0, 360) will be normalized.
|
|
9
9
|
*
|
|
@@ -51,7 +51,7 @@ export declare type MapOverlayProps = ViewProps & {
|
|
|
51
51
|
*/
|
|
52
52
|
tappable?: boolean;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
type NativeProps = Modify<MapOverlayProps, {
|
|
55
55
|
image?: string;
|
|
56
56
|
}>;
|
|
57
57
|
export declare class MapOverlay extends React.Component<MapOverlayProps> {
|
|
@@ -62,8 +62,8 @@ export declare class MapOverlay extends React.Component<MapOverlayProps> {
|
|
|
62
62
|
static Animated: Animated.AnimatedComponent<typeof MapOverlay>;
|
|
63
63
|
render(): JSX.Element;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
type Coordinate = [number, number];
|
|
66
|
+
type OverlayPressEvent = NativeSyntheticEvent<{
|
|
67
67
|
/**
|
|
68
68
|
* @platform iOS: Apple Maps: `image-overlay-press`
|
|
69
69
|
* @platform Android: `overlay-press`
|
package/lib/MapPolygon.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { NativeSyntheticEvent, View, ViewProps } from 'react-native';
|
|
3
3
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { LatLng, LineCapType, LineJoinType, Point } from './sharedTypes';
|
|
5
|
-
export
|
|
5
|
+
export type MapPolygonProps = ViewProps & {
|
|
6
6
|
/**
|
|
7
7
|
* An array of coordinates to describe the polygon
|
|
8
8
|
*
|
|
@@ -122,7 +122,7 @@ export declare type MapPolygonProps = ViewProps & {
|
|
|
122
122
|
*/
|
|
123
123
|
zIndex?: number;
|
|
124
124
|
};
|
|
125
|
-
|
|
125
|
+
type NativeProps = MapPolygonProps & {
|
|
126
126
|
ref: React.RefObject<View>;
|
|
127
127
|
};
|
|
128
128
|
export declare class MapPolygon extends React.Component<MapPolygonProps> {
|
|
@@ -137,7 +137,7 @@ export declare class MapPolygon extends React.Component<MapPolygonProps> {
|
|
|
137
137
|
}
|
|
138
138
|
declare const _default: typeof MapPolygon;
|
|
139
139
|
export default _default;
|
|
140
|
-
|
|
140
|
+
type PolygonPressEvent = NativeSyntheticEvent<{
|
|
141
141
|
action: 'polygon-press';
|
|
142
142
|
/**
|
|
143
143
|
* @platform iOS: Google Maps
|
package/lib/MapPolyline.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { NativeSyntheticEvent, View, ViewProps } from 'react-native';
|
|
3
3
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
4
|
import { LatLng, LineCapType, LineJoinType, Point } from './sharedTypes';
|
|
5
|
-
export
|
|
5
|
+
export type MapPolylineProps = ViewProps & {
|
|
6
6
|
/**
|
|
7
7
|
* An array of coordinates to describe the polyline
|
|
8
8
|
*
|
|
@@ -124,7 +124,7 @@ export declare type MapPolylineProps = ViewProps & {
|
|
|
124
124
|
*/
|
|
125
125
|
zIndex?: number;
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
type NativeProps = MapPolylineProps & {
|
|
128
128
|
ref: React.RefObject<View>;
|
|
129
129
|
};
|
|
130
130
|
export declare class MapPolyline extends React.Component<MapPolylineProps> {
|
|
@@ -139,7 +139,7 @@ export declare class MapPolyline extends React.Component<MapPolylineProps> {
|
|
|
139
139
|
}
|
|
140
140
|
declare const _default: typeof MapPolyline;
|
|
141
141
|
export default _default;
|
|
142
|
-
|
|
142
|
+
type PolylinePressEvent = NativeSyntheticEvent<{
|
|
143
143
|
action: 'polyline-press';
|
|
144
144
|
/**
|
|
145
145
|
* @platform iOS: Google Maps
|
package/lib/MapUrlTile.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
3
3
|
import { ViewProps } from 'react-native';
|
|
4
|
-
export
|
|
4
|
+
export type MapUrlTileProps = ViewProps & {
|
|
5
5
|
/**
|
|
6
6
|
* Doubles tile size from 256 to 512 utilising higher zoom levels
|
|
7
7
|
* i.e loading 4 higher zoom level tiles and combining them for one high-resolution tile.
|
|
@@ -122,7 +122,7 @@ export declare type MapUrlTileProps = ViewProps & {
|
|
|
122
122
|
*/
|
|
123
123
|
zIndex?: number;
|
|
124
124
|
};
|
|
125
|
-
|
|
125
|
+
type NativeProps = MapUrlTileProps;
|
|
126
126
|
export declare class MapUrlTile extends React.Component<MapUrlTileProps> {
|
|
127
127
|
context: React.ContextType<typeof ProviderContext>;
|
|
128
128
|
getNativeComponent: () => NativeComponent<NativeProps>;
|
package/lib/MapView.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Address, BoundingBox, Camera, ChangeEvent, Details, EdgePadding, FitToO
|
|
|
5
5
|
import { Modify } from './sharedTypesInternal';
|
|
6
6
|
import { MapViewNativeComponentType } from './MapViewNativeComponent';
|
|
7
7
|
export declare const MAP_TYPES: MapTypes;
|
|
8
|
-
export
|
|
8
|
+
export type MapViewProps = ViewProps & {
|
|
9
9
|
/**
|
|
10
10
|
* If `true` map will be cached and displayed as an image instead of being interactable, for performance usage.
|
|
11
11
|
*
|
|
@@ -556,17 +556,17 @@ export declare type MapViewProps = ViewProps & {
|
|
|
556
556
|
*/
|
|
557
557
|
zoomTapEnabled?: boolean;
|
|
558
558
|
};
|
|
559
|
-
|
|
559
|
+
type ModifiedProps = Modify<MapViewProps, {
|
|
560
560
|
region?: MapViewProps['region'] | null;
|
|
561
561
|
initialRegion?: MapViewProps['initialRegion'] | null;
|
|
562
562
|
}>;
|
|
563
|
-
export
|
|
563
|
+
export type NativeProps = Omit<ModifiedProps, 'customMapStyle' | 'onRegionChange' | 'onRegionChangeComplete'> & {
|
|
564
564
|
ref: React.RefObject<MapViewNativeComponentType>;
|
|
565
565
|
customMapStyleString?: string;
|
|
566
566
|
handlePanDrag?: boolean;
|
|
567
567
|
onChange?: (e: ChangeEvent) => void;
|
|
568
568
|
};
|
|
569
|
-
|
|
569
|
+
type State = {
|
|
570
570
|
isReady: boolean;
|
|
571
571
|
};
|
|
572
572
|
declare class MapView extends React.Component<MapViewProps, State> {
|
package/lib/MapView.types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClickEvent, LatLng, Point, Region } from './sharedTypes';
|
|
2
2
|
import { NativeSyntheticEvent } from 'react-native';
|
|
3
|
-
export
|
|
3
|
+
export type Camera = {
|
|
4
4
|
/**
|
|
5
5
|
* Apple Maps
|
|
6
6
|
*/
|
|
@@ -13,19 +13,19 @@ export declare type Camera = {
|
|
|
13
13
|
*/
|
|
14
14
|
zoom?: number;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type MapStyleElement = {
|
|
17
17
|
featureType?: string;
|
|
18
18
|
elementType?: string;
|
|
19
19
|
stylers: object[];
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type EdgePadding = {
|
|
22
22
|
top: Number;
|
|
23
23
|
right: Number;
|
|
24
24
|
bottom: Number;
|
|
25
25
|
left: Number;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
28
|
-
export
|
|
27
|
+
export type MapType = 'hybrid' | 'mutedStandard' | 'none' | 'satellite' | 'standard' | 'terrain';
|
|
28
|
+
export type MapTypes = {
|
|
29
29
|
STANDARD: 'standard';
|
|
30
30
|
SATELLITE: 'satellite';
|
|
31
31
|
HYBRID: 'hybrid';
|
|
@@ -33,45 +33,45 @@ export declare type MapTypes = {
|
|
|
33
33
|
NONE: 'none';
|
|
34
34
|
MUTEDSTANDARD: 'mutedStandard';
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type IndoorLevel = {
|
|
37
37
|
index: number;
|
|
38
38
|
name: string;
|
|
39
39
|
shortName: string;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type ActiveIndoorLevel = {
|
|
42
42
|
activeLevelIndex: number;
|
|
43
43
|
name: string;
|
|
44
44
|
shortName: string;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type IndoorLevelActivatedEvent = NativeSyntheticEvent<{
|
|
47
47
|
IndoorLevel: ActiveIndoorLevel;
|
|
48
48
|
}>;
|
|
49
|
-
export
|
|
49
|
+
export type IndoorBuilding = {
|
|
50
50
|
underground: boolean;
|
|
51
51
|
activeLevelIndex: number;
|
|
52
52
|
levels: IndoorLevel[];
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export type IndoorBuildingEvent = NativeSyntheticEvent<{
|
|
55
55
|
IndoorBuilding: IndoorBuilding;
|
|
56
56
|
}>;
|
|
57
|
-
export
|
|
57
|
+
export type KmlMarker = {
|
|
58
58
|
id: string;
|
|
59
59
|
title: string;
|
|
60
60
|
description: string;
|
|
61
61
|
coordinate: LatLng;
|
|
62
62
|
position: Point;
|
|
63
63
|
};
|
|
64
|
-
export
|
|
64
|
+
export type KmlMapEvent = NativeSyntheticEvent<{
|
|
65
65
|
markers: KmlMarker[];
|
|
66
66
|
}>;
|
|
67
|
-
export
|
|
67
|
+
export type LongPressEvent = ClickEvent<{
|
|
68
68
|
/**
|
|
69
69
|
* @platform Android
|
|
70
70
|
*/
|
|
71
71
|
action?: 'long-press';
|
|
72
72
|
}>;
|
|
73
|
-
export
|
|
74
|
-
export
|
|
73
|
+
export type PanDragEvent = ClickEvent;
|
|
74
|
+
export type PoiClickEvent = NativeSyntheticEvent<{
|
|
75
75
|
placeId: string;
|
|
76
76
|
name: string;
|
|
77
77
|
coordinate: LatLng;
|
|
@@ -80,16 +80,16 @@ export declare type PoiClickEvent = NativeSyntheticEvent<{
|
|
|
80
80
|
*/
|
|
81
81
|
position?: Point;
|
|
82
82
|
}>;
|
|
83
|
-
export
|
|
83
|
+
export type MapPressEvent = ClickEvent<{
|
|
84
84
|
/**
|
|
85
85
|
* @platform Android
|
|
86
86
|
*/
|
|
87
87
|
action?: 'press' | 'marker-press';
|
|
88
88
|
}>;
|
|
89
|
-
export
|
|
89
|
+
export type Details = {
|
|
90
90
|
isGesture?: boolean;
|
|
91
91
|
};
|
|
92
|
-
export
|
|
92
|
+
export type UserLocationChangeEvent = NativeSyntheticEvent<{
|
|
93
93
|
coordinate?: LatLng & {
|
|
94
94
|
altitude: number;
|
|
95
95
|
timestamp: number;
|
|
@@ -112,20 +112,20 @@ export declare type UserLocationChangeEvent = NativeSyntheticEvent<{
|
|
|
112
112
|
message: string;
|
|
113
113
|
};
|
|
114
114
|
}>;
|
|
115
|
-
export
|
|
115
|
+
export type ChangeEvent = NativeSyntheticEvent<{
|
|
116
116
|
continuous: boolean;
|
|
117
117
|
region: Region;
|
|
118
118
|
isGesture?: boolean;
|
|
119
119
|
}>;
|
|
120
|
-
export
|
|
120
|
+
export type FitToOptions = {
|
|
121
121
|
edgePadding?: EdgePadding;
|
|
122
122
|
animated?: boolean;
|
|
123
123
|
};
|
|
124
|
-
export
|
|
124
|
+
export type BoundingBox = {
|
|
125
125
|
northEast: LatLng;
|
|
126
126
|
southWest: LatLng;
|
|
127
127
|
};
|
|
128
|
-
export
|
|
128
|
+
export type SnapshotOptions = {
|
|
129
129
|
/** optional, when omitted the view-width is used */
|
|
130
130
|
width?: number;
|
|
131
131
|
/** optional, when omitted the view-height is used */
|
|
@@ -139,7 +139,7 @@ export declare type SnapshotOptions = {
|
|
|
139
139
|
/** result types, defaults to 'file' */
|
|
140
140
|
result?: 'file' | 'base64';
|
|
141
141
|
};
|
|
142
|
-
export
|
|
142
|
+
export type Address = {
|
|
143
143
|
administrativeArea: string;
|
|
144
144
|
country: string;
|
|
145
145
|
countryCode: string;
|
|
@@ -150,4 +150,4 @@ export declare type Address = {
|
|
|
150
150
|
subLocality: string;
|
|
151
151
|
thoroughfare: string;
|
|
152
152
|
};
|
|
153
|
-
export
|
|
153
|
+
export type NativeCommandName = 'animateCamera' | 'animateToRegion' | 'coordinateForPoint' | 'fitToCoordinates' | 'fitToElements' | 'fitToSuppliedMarkers' | 'getAddressFromCoordinates' | 'getCamera' | 'getMapBoundaries' | 'getMarkersFrames' | 'pointForCoordinate' | 'setCamera' | 'setIndoorActiveLevelIndex' | 'setMapBoundaries' | 'takeSnapshot';
|
|
@@ -3,7 +3,7 @@ import type { HostComponent } from 'react-native';
|
|
|
3
3
|
import { NativeProps } from './MapView';
|
|
4
4
|
import { Camera, EdgePadding } from './MapView.types';
|
|
5
5
|
import { LatLng, Region } from './sharedTypes';
|
|
6
|
-
export
|
|
6
|
+
export type MapViewNativeComponentType = HostComponent<NativeProps>;
|
|
7
7
|
interface NativeCommands {
|
|
8
8
|
animateToRegion: (viewRef: NonNullable<React.RefObject<MapViewNativeComponentType>['current']>, region: Region, duration: number) => void;
|
|
9
9
|
setCamera: (viewRef: NonNullable<React.RefObject<MapViewNativeComponentType>['current']>, camera: Partial<Camera>) => void;
|
package/lib/MapWMSTile.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ViewProps } from 'react-native';
|
|
3
3
|
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
|
-
export
|
|
4
|
+
export type MapWMSTileProps = ViewProps & {
|
|
5
5
|
/**
|
|
6
6
|
* The maximum native zoom level for this tile overlay i.e. the highest zoom level that the tile server provides.
|
|
7
7
|
* Tiles are auto-scaled for higher zoom levels.
|
|
@@ -104,7 +104,7 @@ export declare type MapWMSTileProps = ViewProps & {
|
|
|
104
104
|
*/
|
|
105
105
|
zIndex?: number;
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
type NativeProps = MapWMSTileProps;
|
|
108
108
|
export declare class MapWMSTile extends React.Component<MapWMSTileProps> {
|
|
109
109
|
context: React.ContextType<typeof ProviderContext>;
|
|
110
110
|
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
@@ -20,16 +20,16 @@ export declare function getNativeMapName(provider: Provider): "AIRMap" | "AIRGoo
|
|
|
20
20
|
export declare const createNotSupportedComponent: (message: string) => () => null;
|
|
21
21
|
export declare const googleMapIsInstalled = true;
|
|
22
22
|
export default function decorateMapComponent<Type extends Component>(Component: Type, componentName: ComponentName, providers: Providers): Type;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
type ImplementationStatus = 'SUPPORTED' | 'USES_DEFAULT_IMPLEMENTATION' | 'NOT_SUPPORTED';
|
|
24
|
+
type Providers = {
|
|
25
25
|
google: {
|
|
26
26
|
ios: ImplementationStatus;
|
|
27
27
|
android: ImplementationStatus;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
export type UIManagerCommand = number;
|
|
31
|
+
export type MapManagerCommand = any;
|
|
32
|
+
export type NativeComponent<H = unknown> = HostComponent<H> | ReturnType<typeof createNotSupportedComponent>;
|
|
33
|
+
type Component = typeof MapCallout | typeof MapCalloutSubview | typeof MapCircle | typeof MapHeatmap | typeof MapLocalTile | typeof MapMarker | typeof MapOverlay | typeof MapPolygon | typeof MapPolyline | typeof MapUrlTile | typeof MapWMSTile;
|
|
34
|
+
type ComponentName = 'Callout' | 'CalloutSubview' | 'Circle' | 'Heatmap' | 'LocalTile' | 'Marker' | 'Overlay' | 'Polygon' | 'Polyline' | 'UrlTile' | 'WMSTile';
|
|
35
35
|
export {};
|
package/lib/sharedTypes.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { NativeSyntheticEvent } from 'react-native';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type Provider = 'google' | undefined;
|
|
3
|
+
export type LatLng = {
|
|
4
4
|
latitude: number;
|
|
5
5
|
longitude: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type Point = {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type Region = LatLng & {
|
|
12
12
|
latitudeDelta: number;
|
|
13
13
|
longitudeDelta: number;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type Frame = Point & {
|
|
16
16
|
height: number;
|
|
17
17
|
width: number;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type CalloutPressEvent = NativeSyntheticEvent<{
|
|
20
20
|
action: 'callout-press';
|
|
21
21
|
/**
|
|
22
22
|
* @platform iOS
|
|
@@ -39,27 +39,27 @@ export declare type CalloutPressEvent = NativeSyntheticEvent<{
|
|
|
39
39
|
*/
|
|
40
40
|
position?: Point;
|
|
41
41
|
}>;
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
42
|
+
export type LineCapType = 'butt' | 'round' | 'square';
|
|
43
|
+
export type LineJoinType = 'miter' | 'round' | 'bevel';
|
|
44
|
+
export type ClickEvent<T = {}> = NativeSyntheticEvent<{
|
|
45
45
|
coordinate: LatLng;
|
|
46
46
|
position: Point;
|
|
47
47
|
} & T>;
|
|
48
|
-
export
|
|
48
|
+
export type MarkerDeselectEvent = Omit<ClickEvent<{
|
|
49
49
|
action: 'marker-deselect';
|
|
50
50
|
id: string;
|
|
51
51
|
}>, 'position'>;
|
|
52
|
-
export
|
|
52
|
+
export type MarkerSelectEvent = Omit<ClickEvent<{
|
|
53
53
|
id: string;
|
|
54
54
|
action: 'marker-select';
|
|
55
55
|
}>, 'position'>;
|
|
56
|
-
export
|
|
56
|
+
export type MarkerDragEvent = ClickEvent<{
|
|
57
57
|
/**
|
|
58
58
|
* @platform iOS
|
|
59
59
|
*/
|
|
60
60
|
id?: string;
|
|
61
61
|
}>;
|
|
62
|
-
export
|
|
62
|
+
export type MarkerDragStartEndEvent = NativeSyntheticEvent<{
|
|
63
63
|
coordinate: LatLng;
|
|
64
64
|
/**
|
|
65
65
|
* @platform iOS
|
|
@@ -70,7 +70,7 @@ export declare type MarkerDragStartEndEvent = NativeSyntheticEvent<{
|
|
|
70
70
|
*/
|
|
71
71
|
position?: Point;
|
|
72
72
|
}>;
|
|
73
|
-
export
|
|
73
|
+
export type MarkerPressEvent = NativeSyntheticEvent<{
|
|
74
74
|
id: string;
|
|
75
75
|
action: 'marker-press';
|
|
76
76
|
coordinate: LatLng;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Modify<T, R> = Omit<T, keyof R> & R;
|
package/package.json
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.5.0-beta.1",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
12
12
|
"tscheck": "tsc --noEmit",
|
|
13
|
+
"format-check": "prettier --check .",
|
|
13
14
|
"build": "tsc --project tsconfig.build.json",
|
|
14
15
|
"test": "jest",
|
|
15
16
|
"prepare": "husky install",
|
|
@@ -52,24 +53,25 @@
|
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@commitlint/cli": "17.1
|
|
56
|
-
"@commitlint/config-conventional": "17.1
|
|
57
|
-
"@react-native-community/eslint-config": "3.
|
|
58
|
-
"@semantic-release/changelog": "6.0.
|
|
56
|
+
"@commitlint/cli": "17.6.1",
|
|
57
|
+
"@commitlint/config-conventional": "17.6.1",
|
|
58
|
+
"@react-native-community/eslint-config": "3.2.0",
|
|
59
|
+
"@semantic-release/changelog": "6.0.3",
|
|
59
60
|
"@semantic-release/git": "10.0.1",
|
|
60
|
-
"@types/
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
61
|
+
"@types/jest": "29.5.0",
|
|
62
|
+
"@types/react-native": "0.70.13",
|
|
63
|
+
"babel-jest": "29.5.0",
|
|
64
|
+
"eslint": "8.38.0",
|
|
65
|
+
"husky": "8.0.3",
|
|
66
|
+
"jest": "29.5.0",
|
|
67
|
+
"prettier": "2.8.7",
|
|
66
68
|
"react": "18.1.0",
|
|
67
|
-
"react-native": "0.70.
|
|
68
|
-
"semantic-release": "
|
|
69
|
-
"typescript": "
|
|
69
|
+
"react-native": "0.70.8",
|
|
70
|
+
"semantic-release": "21.0.1",
|
|
71
|
+
"typescript": "5.0.4"
|
|
70
72
|
},
|
|
71
73
|
"dependencies": {
|
|
72
|
-
"@types/geojson": "^7946.0.
|
|
74
|
+
"@types/geojson": "^7946.0.10"
|
|
73
75
|
},
|
|
74
76
|
"jest": {
|
|
75
77
|
"preset": "react-native"
|
|
@@ -14,9 +14,8 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.source = { :git => "https://github.com/react-native-maps/react-native-maps.git", :tag=> "v#{s.version}" }
|
|
15
15
|
s.source_files = "ios/AirGoogleMaps/**/*.{h,m}"
|
|
16
16
|
s.compiler_flags = '-DHAVE_GOOGLE_MAPS=1', '-DHAVE_GOOGLE_MAPS_UTILS=1', '-fno-modules'
|
|
17
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "$(inherited) '$(PODS_ROOT)/Google-Maps-iOS-Utils/src/Heatmap' '$(PODS_ROOT)/Headers/Public/'" }
|
|
18
17
|
|
|
19
18
|
s.dependency 'React-Core'
|
|
20
|
-
s.dependency 'GoogleMaps', '7.
|
|
19
|
+
s.dependency 'GoogleMaps', '7.3.0'
|
|
21
20
|
s.dependency 'Google-Maps-iOS-Utils', '4.1.0'
|
|
22
21
|
end
|