react-native-maps 1.3.2 → 1.4.0
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/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 +14 -14
- package/react-native-google-maps.podspec +1 -2
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,7 +5,7 @@
|
|
|
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.4.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -52,21 +52,21 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@commitlint/cli": "17.
|
|
56
|
-
"@commitlint/config-conventional": "17.
|
|
57
|
-
"@react-native-community/eslint-config": "3.
|
|
58
|
-
"@semantic-release/changelog": "6.0.
|
|
55
|
+
"@commitlint/cli": "17.4.2",
|
|
56
|
+
"@commitlint/config-conventional": "17.4.2",
|
|
57
|
+
"@react-native-community/eslint-config": "3.2.0",
|
|
58
|
+
"@semantic-release/changelog": "6.0.2",
|
|
59
59
|
"@semantic-release/git": "10.0.1",
|
|
60
|
-
"@types/react-native": "0.70.
|
|
61
|
-
"babel-jest": "29.0
|
|
62
|
-
"eslint": "8.
|
|
63
|
-
"husky": "8.0.
|
|
64
|
-
"jest": "29.0
|
|
65
|
-
"prettier": "2.
|
|
60
|
+
"@types/react-native": "0.70.9",
|
|
61
|
+
"babel-jest": "29.4.0",
|
|
62
|
+
"eslint": "8.32.0",
|
|
63
|
+
"husky": "8.0.3",
|
|
64
|
+
"jest": "29.4.0",
|
|
65
|
+
"prettier": "2.8.3",
|
|
66
66
|
"react": "18.1.0",
|
|
67
|
-
"react-native": "0.70.
|
|
68
|
-
"semantic-release": "
|
|
69
|
-
"typescript": "4.
|
|
67
|
+
"react-native": "0.70.6",
|
|
68
|
+
"semantic-release": "20.1.0",
|
|
69
|
+
"typescript": "4.9.4"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@types/geojson": "^7946.0.8"
|
|
@@ -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
|