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
|
@@ -628,7 +628,7 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
628
628
|
|
|
629
629
|
@Override
|
|
630
630
|
public void onDropViewInstance(MapView view) {
|
|
631
|
-
super.onDropViewInstance(view);
|
|
632
631
|
view.doDestroy();
|
|
632
|
+
super.onDropViewInstance(view);
|
|
633
633
|
}
|
|
634
634
|
}
|
|
@@ -346,8 +346,8 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
346
346
|
shouldRestorePadding = true;
|
|
347
347
|
removeView(attacherGroup);
|
|
348
348
|
attacherGroup = null;
|
|
349
|
-
detachLifecycleObserver();
|
|
350
349
|
super.onDetachedFromWindow();
|
|
350
|
+
detachLifecycleObserver();
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
// Method to attach lifecycle observer
|
|
@@ -747,9 +747,6 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
747
747
|
return;
|
|
748
748
|
}
|
|
749
749
|
destroyed = true;
|
|
750
|
-
|
|
751
|
-
// Detach lifecycle observer before destroying
|
|
752
|
-
detachLifecycleObserver();
|
|
753
750
|
savedMapState = null;
|
|
754
751
|
savedFeatures = null;
|
|
755
752
|
|
|
@@ -758,6 +755,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
758
755
|
paused = true;
|
|
759
756
|
}
|
|
760
757
|
onDestroy();
|
|
758
|
+
detachLifecycleObserver();
|
|
761
759
|
}
|
|
762
760
|
|
|
763
761
|
public void setInitialCameraSet(boolean initialCameraSet) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ConfigPlugin } from '@expo/config-plugins/build/Plugin.types';
|
|
2
|
+
import { type MergeResults } from '@expo/config-plugins/build/utils/generateCode';
|
|
3
|
+
import type { ConfigPluginProps } from './types';
|
|
4
|
+
export declare const MATCH_INIT: RegExp;
|
|
5
|
+
export declare const withMapsIOS: ConfigPlugin<ConfigPluginProps>;
|
|
6
|
+
export declare function addGoogleMapsAppDelegateImport(src: string): MergeResults;
|
|
7
|
+
export declare function removeGoogleMapsAppDelegateImport(src: string): MergeResults;
|
|
8
|
+
export declare function addGoogleMapsAppDelegateInit(src: string, apiKey: string): MergeResults;
|
|
9
|
+
export declare function removeGoogleMapsAppDelegateInit(src: string): MergeResults;
|
|
10
|
+
/**
|
|
11
|
+
* @param src The contents of the Podfile.
|
|
12
|
+
* @param useGoogleMaps if GoogleMaps for iOS is used
|
|
13
|
+
* @returns Podfile with react-native-maps integration configured.
|
|
14
|
+
*/
|
|
15
|
+
export declare function addMapsCocoapods(src: string, useGoogleMaps: boolean): MergeResults;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
import type { Region } from './sharedTypes';
|
|
3
|
+
declare const AnimatedWithChildren: any;
|
|
4
|
+
type Props = Partial<Region> | undefined;
|
|
5
|
+
export default class AnimatedMapRegion extends AnimatedWithChildren {
|
|
6
|
+
constructor(valueIn?: Props);
|
|
7
|
+
setValue(value: Region): void;
|
|
8
|
+
setOffset(offset: Region): void;
|
|
9
|
+
flattenOffset(): void;
|
|
10
|
+
private __getValue;
|
|
11
|
+
private __attach;
|
|
12
|
+
private __detach;
|
|
13
|
+
stopAnimation(callback: (region: Region) => void): void;
|
|
14
|
+
addListener(callback: (region: Region) => void): string;
|
|
15
|
+
removeListener(id: string): void;
|
|
16
|
+
spring(config: Animated.SpringAnimationConfig & Region): Animated.CompositeAnimation;
|
|
17
|
+
timing(config: Animated.TimingAnimationConfig & Region): Animated.CompositeAnimation;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Feature, FeatureCollection, Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon } from 'geojson';
|
|
3
|
+
import { type MapMarkerProps as MarkerProps } from './MapMarker';
|
|
4
|
+
import type { MapPolygonProps as PolygonProps } from './MapPolygon';
|
|
5
|
+
import type { MapPolylineProps as PolylineProps } from './MapPolyline';
|
|
6
|
+
import type { LatLng } from './sharedTypes';
|
|
7
|
+
export type GeojsonProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Sets the anchor point for the marker.
|
|
10
|
+
* The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.
|
|
11
|
+
*
|
|
12
|
+
* The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
|
|
13
|
+
* where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
|
|
14
|
+
*
|
|
15
|
+
* The anchoring point in a W x H image is the nearest discrete grid point in a (W + 1) x (H + 1) grid, obtained by scaling the then rounding.
|
|
16
|
+
* For example, in a 4 x 2 image, the anchor point (0.7, 0.6) resolves to the grid point at (3, 1).
|
|
17
|
+
*
|
|
18
|
+
* @default {x: 0.5, y: 1.0}
|
|
19
|
+
* @platform iOS: Google Maps only. For Apple Maps, see the `centerOffset` prop
|
|
20
|
+
* @platform Android: Supported
|
|
21
|
+
*/
|
|
22
|
+
anchor?: MarkerProps['anchor'];
|
|
23
|
+
/**
|
|
24
|
+
* The offset (in points) at which to display the annotation view.
|
|
25
|
+
*
|
|
26
|
+
* By default, the center point of an annotation view is placed at the coordinate point of the associated annotation.
|
|
27
|
+
*
|
|
28
|
+
* Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.
|
|
29
|
+
*
|
|
30
|
+
* @default {x: 0.0, y: 0.0}
|
|
31
|
+
* @platform iOS: Apple Maps only. For Google Maps, see the `anchor` prop
|
|
32
|
+
* @platform Android: Not supported. See see the `anchor` prop
|
|
33
|
+
*/
|
|
34
|
+
centerOffset?: MarkerProps['centerOffset'];
|
|
35
|
+
/**
|
|
36
|
+
* The pincolor used on markers
|
|
37
|
+
*
|
|
38
|
+
* @platform iOS: Supported
|
|
39
|
+
* @platform Android: Supported
|
|
40
|
+
*/
|
|
41
|
+
color?: MarkerProps['pinColor'];
|
|
42
|
+
/**
|
|
43
|
+
* The fill color to use for the path.
|
|
44
|
+
*
|
|
45
|
+
* @platform iOS: Supported
|
|
46
|
+
* @platform Android: Supported
|
|
47
|
+
*/
|
|
48
|
+
fillColor?: PolygonProps['fillColor'];
|
|
49
|
+
/**
|
|
50
|
+
* [Geojson](https://geojson.org/) description of object.
|
|
51
|
+
*
|
|
52
|
+
* @platform iOS: Supported
|
|
53
|
+
* @platform Android: Supported
|
|
54
|
+
*/
|
|
55
|
+
geojson: FeatureCollection;
|
|
56
|
+
/**
|
|
57
|
+
* A custom image to be used as the marker's icon. Only local image resources are allowed to be
|
|
58
|
+
* used.
|
|
59
|
+
*
|
|
60
|
+
* @platform iOS: Supported
|
|
61
|
+
* @platform Android: Supported
|
|
62
|
+
*/
|
|
63
|
+
image?: MarkerProps['image'];
|
|
64
|
+
/**
|
|
65
|
+
* The line cap style to apply to the open ends of the path.
|
|
66
|
+
* The default style is `round`.
|
|
67
|
+
*
|
|
68
|
+
* @platform iOS: Apple Maps only
|
|
69
|
+
* @platform Android: Supported
|
|
70
|
+
*/
|
|
71
|
+
lineCap?: PolylineProps['lineCap'];
|
|
72
|
+
/**
|
|
73
|
+
* An array of numbers specifying the dash pattern to use for the path.
|
|
74
|
+
*
|
|
75
|
+
* The array contains one or more numbers that indicate the lengths (measured in points) of the
|
|
76
|
+
* line segments and gaps in the pattern. The values in the array alternate, starting with the
|
|
77
|
+
* first line segment length, followed by the first gap length, followed by the second line
|
|
78
|
+
* segment length, and so on.
|
|
79
|
+
*
|
|
80
|
+
* This property is set to `null` by default, which indicates no line dash pattern.
|
|
81
|
+
*
|
|
82
|
+
* @platform iOS: Supported
|
|
83
|
+
* @platform Android: Supported
|
|
84
|
+
*/
|
|
85
|
+
lineDashPattern?: PolygonProps['lineDashPattern'] | PolylineProps['lineDashPattern'];
|
|
86
|
+
/**
|
|
87
|
+
* The offset (in points) at which to start drawing the dash pattern.
|
|
88
|
+
*
|
|
89
|
+
* Use this property to start drawing a dashed line partway through a segment or gap. For
|
|
90
|
+
* example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the
|
|
91
|
+
* middle of the first gap.
|
|
92
|
+
*
|
|
93
|
+
* The default value of this property is 0.
|
|
94
|
+
*
|
|
95
|
+
* @platform iOS: Apple Maps only
|
|
96
|
+
* @platform Android: Not supported
|
|
97
|
+
*/
|
|
98
|
+
lineDashPhase?: PolylineProps['lineDashPhase'];
|
|
99
|
+
/**
|
|
100
|
+
* The line join style to apply to corners of the path.
|
|
101
|
+
* The default style is `round`.
|
|
102
|
+
*
|
|
103
|
+
* @platform iOS: Apple Maps only
|
|
104
|
+
* @platform Android: Not supported
|
|
105
|
+
*/
|
|
106
|
+
lineJoin?: PolylineProps['lineJoin'];
|
|
107
|
+
/**
|
|
108
|
+
* Component to render in place of the default marker when the overlay type is a `point`
|
|
109
|
+
*
|
|
110
|
+
* @platform iOS: Supported
|
|
111
|
+
* @platform Android: Supported
|
|
112
|
+
*/
|
|
113
|
+
markerComponent?: MarkerProps['children'];
|
|
114
|
+
/**
|
|
115
|
+
* The limiting value that helps avoid spikes at junctions between connected line segments.
|
|
116
|
+
* The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style. If
|
|
117
|
+
* the ratio of the miter length—that is, the diagonal length of the miter join—to the line
|
|
118
|
+
* thickness exceeds the miter limit, the joint is converted to a bevel join. The default
|
|
119
|
+
* miter limit is 10, which results in the conversion of miters whose angle at the joint
|
|
120
|
+
* is less than 11 degrees.
|
|
121
|
+
*
|
|
122
|
+
* @platform iOS: Apple Maps only
|
|
123
|
+
* @platform Android: Not supported
|
|
124
|
+
*/
|
|
125
|
+
miterLimit?: PolylineProps['miterLimit'];
|
|
126
|
+
/**
|
|
127
|
+
* Callback that is called when the user presses any of the overlays
|
|
128
|
+
*/
|
|
129
|
+
onPress?: (event: OverlayPressEvent) => void;
|
|
130
|
+
/**
|
|
131
|
+
* The stroke color to use for the path.
|
|
132
|
+
*
|
|
133
|
+
* @platform — iOS: Supported
|
|
134
|
+
* @platform — Android: Supported
|
|
135
|
+
*/
|
|
136
|
+
strokeColor?: PolygonProps['strokeColor'] | PolylineProps['strokeColor'];
|
|
137
|
+
/**
|
|
138
|
+
* The stroke width to use for the path.
|
|
139
|
+
*
|
|
140
|
+
* @platform — iOS: Supported
|
|
141
|
+
* @platform — Android: Supported
|
|
142
|
+
*/
|
|
143
|
+
strokeWidth?: PolygonProps['strokeWidth'] | PolylineProps['strokeWidth'];
|
|
144
|
+
/**
|
|
145
|
+
* Make the `Polygon` or `Polyline` tappable
|
|
146
|
+
*
|
|
147
|
+
* @platform — iOS: Google Maps only
|
|
148
|
+
* @platform — Android: Supported
|
|
149
|
+
*/
|
|
150
|
+
tappable?: PolygonProps['tappable'] | PolylineProps['tappable'];
|
|
151
|
+
/**
|
|
152
|
+
* The title of the marker. This is only used if the <Marker /> component has no children that
|
|
153
|
+
* are a `<Callout />`, in which case the default callout behavior will be used, which
|
|
154
|
+
* will show both the `title` and the `description`, if provided.
|
|
155
|
+
*
|
|
156
|
+
* @platform — iOS: Supported
|
|
157
|
+
* @platform — Android: Supported
|
|
158
|
+
*/
|
|
159
|
+
title?: MarkerProps['title'];
|
|
160
|
+
/**
|
|
161
|
+
* Sets whether this marker should track view changes.
|
|
162
|
+
* It's recommended to turn it off whenever it's possible to improve custom marker performance.
|
|
163
|
+
* This is the default value for all point markers in your geojson data. It can be overriden
|
|
164
|
+
* on a per point basis by adding a `trackViewChanges` property to the `properties` object on the point.
|
|
165
|
+
*
|
|
166
|
+
* @default true
|
|
167
|
+
* @platform iOS: Google Maps only
|
|
168
|
+
* @platform Android: Supported
|
|
169
|
+
*/
|
|
170
|
+
tracksViewChanges?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* The order in which this tile overlay is drawn with respect to other overlays. An overlay
|
|
173
|
+
* with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays
|
|
174
|
+
* with the same z-index is arbitrary. The default zIndex is 0.
|
|
175
|
+
*
|
|
176
|
+
* @platform iOS: Apple Maps: [Marker], Google Maps: [Marker, Polygon, Polyline]
|
|
177
|
+
* @platform Android: Supported
|
|
178
|
+
*/
|
|
179
|
+
zIndex?: MarkerProps['zIndex'] | PolygonProps['zIndex'] | PolylineProps['zIndex'];
|
|
180
|
+
};
|
|
181
|
+
declare const Geojson: (props: GeojsonProps) => React.JSX.Element;
|
|
182
|
+
export default Geojson;
|
|
183
|
+
type OverlayPressEvent = {
|
|
184
|
+
type: AnyPointOverlay['type'] | AnyLineStringOverlay['type'] | AnyPolygonOverlay['type'];
|
|
185
|
+
feature: AnyPointOverlay['feature'] | AnyLineStringOverlay['feature'] | AnyPolygonOverlay['feature'];
|
|
186
|
+
coordinates: AnyPointOverlay['coordinates'] | AnyLineStringOverlay['coordinates'] | AnyPolygonOverlay['coordinates'];
|
|
187
|
+
holes?: AnyPolygonOverlay['holes'];
|
|
188
|
+
};
|
|
189
|
+
type AnyPointOverlay = {
|
|
190
|
+
type: 'point';
|
|
191
|
+
feature: Feature<Point | MultiPoint>;
|
|
192
|
+
coordinates: LatLng;
|
|
193
|
+
};
|
|
194
|
+
type AnyLineStringOverlay = {
|
|
195
|
+
type: 'polyline';
|
|
196
|
+
feature: Feature<LineString | MultiLineString>;
|
|
197
|
+
coordinates: LatLng[];
|
|
198
|
+
};
|
|
199
|
+
type AnyPolygonOverlay = {
|
|
200
|
+
type: 'polygon';
|
|
201
|
+
feature: Feature<Polygon | MultiPolygon>;
|
|
202
|
+
coordinates: LatLng[];
|
|
203
|
+
holes?: LatLng[][];
|
|
204
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ViewProps } from 'react-native';
|
|
3
|
+
import { ProviderContext, type MapManagerCommand, type NativeComponent, type UIManagerCommand } from './decorateMapComponent';
|
|
4
|
+
import type { CalloutPressEvent } from './sharedTypes';
|
|
5
|
+
export type MapCalloutProps = ViewProps & {
|
|
6
|
+
/**
|
|
7
|
+
* If `true`, clicks on transparent areas in callout will be passed to map.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
* @platform iOS: Supported
|
|
11
|
+
* @platform Android: Not supported
|
|
12
|
+
*/
|
|
13
|
+
alphaHitTest?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Callback that is called when the user presses on the callout
|
|
16
|
+
*
|
|
17
|
+
* @platform iOS: Apple Maps only
|
|
18
|
+
* @platform Android: Supported
|
|
19
|
+
*/
|
|
20
|
+
onPress?: (event: CalloutPressEvent) => void;
|
|
21
|
+
/**
|
|
22
|
+
* If `false`, a default "tooltip" bubble window will be drawn around this callouts children.
|
|
23
|
+
* If `true`, the child views can fully customize their appearance, including any "bubble" like styles.
|
|
24
|
+
*
|
|
25
|
+
* @default false
|
|
26
|
+
* @platform iOS: Supported
|
|
27
|
+
* @platform Android: Supported
|
|
28
|
+
*/
|
|
29
|
+
tooltip?: boolean;
|
|
30
|
+
};
|
|
31
|
+
type NativeProps = MapCalloutProps;
|
|
32
|
+
export declare class MapCallout extends React.Component<MapCalloutProps> {
|
|
33
|
+
context: React.ContextType<typeof ProviderContext>;
|
|
34
|
+
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
35
|
+
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
36
|
+
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
37
|
+
render(): React.JSX.Element;
|
|
38
|
+
}
|
|
39
|
+
declare const _default: typeof MapCallout;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type NativeSyntheticEvent, type ViewProps } from 'react-native';
|
|
3
|
+
import { ProviderContext, type NativeComponent, type MapManagerCommand, type UIManagerCommand } from './decorateMapComponent';
|
|
4
|
+
import type { Frame, Point } from './sharedTypes';
|
|
5
|
+
export type MapCalloutSubviewProps = ViewProps & {
|
|
6
|
+
/**
|
|
7
|
+
* Callback that is called when the user presses on this subview inside callout
|
|
8
|
+
*
|
|
9
|
+
* @platform iOS: Supported
|
|
10
|
+
* @platform Android: Not supported
|
|
11
|
+
*/
|
|
12
|
+
onPress?: (event: CalloutSubviewPressEvent) => void;
|
|
13
|
+
};
|
|
14
|
+
type NativeProps = MapCalloutSubviewProps;
|
|
15
|
+
export declare class MapCalloutSubview extends React.Component<MapCalloutSubviewProps> {
|
|
16
|
+
context: React.ContextType<typeof ProviderContext>;
|
|
17
|
+
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
18
|
+
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
19
|
+
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
20
|
+
render(): React.JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: typeof MapCalloutSubview;
|
|
23
|
+
export default _default;
|
|
24
|
+
type CalloutSubviewPressEvent = NativeSyntheticEvent<{
|
|
25
|
+
/**
|
|
26
|
+
* Apple Maps: `callout-inside-press`
|
|
27
|
+
*
|
|
28
|
+
* Google Maps: `marker-inside-overlay-press`
|
|
29
|
+
*/
|
|
30
|
+
action: 'callout-inside-press' | 'marker-inside-overlay-press';
|
|
31
|
+
frame: Frame;
|
|
32
|
+
id: string;
|
|
33
|
+
point: Point;
|
|
34
|
+
}>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
import { ProviderContext, type NativeComponent, type MapManagerCommand, type UIManagerCommand } from './decorateMapComponent';
|
|
4
|
+
import type { LatLng, LineCapType, LineJoinType } from './sharedTypes';
|
|
5
|
+
export type MapCircleProps = ViewProps & {
|
|
6
|
+
/**
|
|
7
|
+
* The coordinates of the center of the circle.
|
|
8
|
+
*
|
|
9
|
+
* @platform iOS: Supported
|
|
10
|
+
* @platform Android: Supported
|
|
11
|
+
*/
|
|
12
|
+
center: LatLng;
|
|
13
|
+
/**
|
|
14
|
+
* The fill color to use for the path.
|
|
15
|
+
*
|
|
16
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
17
|
+
* @platform iOS: Supported
|
|
18
|
+
* @platform Android: Supported
|
|
19
|
+
*/
|
|
20
|
+
fillColor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The line cap style to apply to the open ends of the path
|
|
23
|
+
*
|
|
24
|
+
* @default `round`
|
|
25
|
+
* @platform iOS: Apple Maps only
|
|
26
|
+
* @platform Android: Not supported
|
|
27
|
+
*/
|
|
28
|
+
lineCap?: LineCapType;
|
|
29
|
+
/**
|
|
30
|
+
* An array of numbers specifying the dash pattern to use for the path.
|
|
31
|
+
* The array contains one or more numbers that indicate the lengths (measured in points)
|
|
32
|
+
* of the line segments and gaps in the pattern.
|
|
33
|
+
* The values in the array alternate, starting with the first line segment length,
|
|
34
|
+
* followed by the first gap length, followed by the second line segment length, and so on.
|
|
35
|
+
*
|
|
36
|
+
* @platform iOS: Apple Maps only
|
|
37
|
+
* @platform Android: Not supported
|
|
38
|
+
*/
|
|
39
|
+
lineDashPattern?: number[];
|
|
40
|
+
/**
|
|
41
|
+
* The offset (in points) at which to start drawing the dash pattern.
|
|
42
|
+
* Use this property to start drawing a dashed line partway through a segment or gap.
|
|
43
|
+
* For example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the middle of the first gap.
|
|
44
|
+
*
|
|
45
|
+
* @default 0
|
|
46
|
+
* @platform iOS: Apple Maps only
|
|
47
|
+
* @platform Android: Not supported
|
|
48
|
+
*/
|
|
49
|
+
lineDashPhase?: number;
|
|
50
|
+
/**
|
|
51
|
+
* The line join style to apply to corners of the path.
|
|
52
|
+
*
|
|
53
|
+
* @platform iOS: Apple Maps only
|
|
54
|
+
* @platform Android: Not supported
|
|
55
|
+
*/
|
|
56
|
+
lineJoin?: LineJoinType;
|
|
57
|
+
/**
|
|
58
|
+
* The limiting value that helps avoid spikes at junctions between connected line segments.
|
|
59
|
+
* The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style.
|
|
60
|
+
* If the ratio of the miter length—that is, the diagonal length of the miter join—to the line thickness exceeds the miter limit,
|
|
61
|
+
* the joint is converted to a bevel join.
|
|
62
|
+
* The default miter limit is 10, which results in the conversion of miters whose angle at the joint is less than 11 degrees.
|
|
63
|
+
*
|
|
64
|
+
* @default 10
|
|
65
|
+
* @platform iOS: Apple Maps only
|
|
66
|
+
* @platform Android: Not supported
|
|
67
|
+
*/
|
|
68
|
+
miterLimit?: number;
|
|
69
|
+
/**
|
|
70
|
+
* The radius of the circle to be drawn (in meters)
|
|
71
|
+
*
|
|
72
|
+
* @platform iOS: Supported
|
|
73
|
+
* @platform Android: Supported
|
|
74
|
+
*/
|
|
75
|
+
radius: number;
|
|
76
|
+
/**
|
|
77
|
+
* The stroke color to use for the path.
|
|
78
|
+
*
|
|
79
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
80
|
+
* @platform iOS: Supported
|
|
81
|
+
* @platform Android: Supported
|
|
82
|
+
*/
|
|
83
|
+
strokeColor?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The stroke width to use for the path.
|
|
86
|
+
*
|
|
87
|
+
* @default 1
|
|
88
|
+
* @platform iOS: Supported
|
|
89
|
+
* @platform Android: Supported
|
|
90
|
+
*/
|
|
91
|
+
strokeWidth?: number;
|
|
92
|
+
/**
|
|
93
|
+
* The order in which this tile overlay is drawn with respect to other overlays.
|
|
94
|
+
* An overlay with a larger z-index is drawn over overlays with smaller z-indices.
|
|
95
|
+
* The order of overlays with the same z-index is arbitrary.
|
|
96
|
+
*
|
|
97
|
+
* @default 0
|
|
98
|
+
* @platform iOS: Google Maps only
|
|
99
|
+
* @platform Android: Supported
|
|
100
|
+
*/
|
|
101
|
+
zIndex?: number;
|
|
102
|
+
};
|
|
103
|
+
type NativeProps = MapCircleProps & {
|
|
104
|
+
ref: React.RefObject<View | null>;
|
|
105
|
+
};
|
|
106
|
+
export declare class MapCircle extends React.Component<MapCircleProps> {
|
|
107
|
+
context: React.ContextType<typeof ProviderContext>;
|
|
108
|
+
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
109
|
+
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
110
|
+
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
111
|
+
private circle;
|
|
112
|
+
constructor(props: MapCircleProps);
|
|
113
|
+
setNativeProps(props: Partial<NativeProps>): void;
|
|
114
|
+
render(): React.JSX.Element;
|
|
115
|
+
}
|
|
116
|
+
declare const _default: typeof MapCircle;
|
|
117
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View, type ProcessedColorValue, type ViewProps } from 'react-native';
|
|
3
|
+
import { ProviderContext, type MapManagerCommand, type NativeComponent, type UIManagerCommand } from './decorateMapComponent';
|
|
4
|
+
import type { LatLng } from './sharedTypes';
|
|
5
|
+
import type { Modify } from './sharedTypesInternal';
|
|
6
|
+
export type MapHeatmapProps = ViewProps & {
|
|
7
|
+
gradient?: {
|
|
8
|
+
/**
|
|
9
|
+
* Resolution of color map -- number corresponding to the number of steps colors are interpolated into.
|
|
10
|
+
*
|
|
11
|
+
* @default 256
|
|
12
|
+
* @platform iOS: Google Maps only
|
|
13
|
+
* @platform Android: Supported
|
|
14
|
+
*/
|
|
15
|
+
colorMapSize: number;
|
|
16
|
+
/**
|
|
17
|
+
* Colors (one or more) to used for gradient.
|
|
18
|
+
*
|
|
19
|
+
* @platform iOS: Google Maps only
|
|
20
|
+
* @platform Android: Supported
|
|
21
|
+
*/
|
|
22
|
+
colors: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Array of floating point values from 0 to 1 representing where each color starts.
|
|
25
|
+
*
|
|
26
|
+
* Array length must be equal to `colors` array length.
|
|
27
|
+
*
|
|
28
|
+
* @platform iOS: Google Maps only
|
|
29
|
+
* @platform Android: Supported
|
|
30
|
+
*/
|
|
31
|
+
startPoints: number[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The opacity of the heatmap.
|
|
35
|
+
*
|
|
36
|
+
* @default 0.7
|
|
37
|
+
* @platform iOS: Google Maps only
|
|
38
|
+
* @platform Android: Supported
|
|
39
|
+
*/
|
|
40
|
+
opacity?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Array of heatmap entries to apply towards density.
|
|
43
|
+
*
|
|
44
|
+
* @platform iOS: Google Maps only
|
|
45
|
+
* @platform Android: Supported
|
|
46
|
+
*/
|
|
47
|
+
points?: WeightedLatLng[];
|
|
48
|
+
/**
|
|
49
|
+
* The radius of the heatmap points in pixels, between 10 and 50.
|
|
50
|
+
*
|
|
51
|
+
* @default 20
|
|
52
|
+
* @platform iOS: Google Maps only
|
|
53
|
+
* @platform Android: Supported
|
|
54
|
+
*/
|
|
55
|
+
radius?: number;
|
|
56
|
+
};
|
|
57
|
+
type NativeProps = Modify<MapHeatmapProps, {
|
|
58
|
+
gradient?: Modify<MapHeatmapProps['gradient'], {
|
|
59
|
+
colors: (ProcessedColorValue | null | undefined)[];
|
|
60
|
+
}>;
|
|
61
|
+
}> & {
|
|
62
|
+
ref: React.RefObject<View | null>;
|
|
63
|
+
};
|
|
64
|
+
export declare class MapHeatmap extends React.Component<MapHeatmapProps | null> {
|
|
65
|
+
context: React.ContextType<typeof ProviderContext>;
|
|
66
|
+
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
67
|
+
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
68
|
+
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
69
|
+
private heatmap;
|
|
70
|
+
constructor(props: MapHeatmapProps);
|
|
71
|
+
setNativeProps(props: Partial<NativeProps>): void;
|
|
72
|
+
render(): React.JSX.Element;
|
|
73
|
+
}
|
|
74
|
+
declare const _default: typeof MapHeatmap;
|
|
75
|
+
export default _default;
|
|
76
|
+
type WeightedLatLng = LatLng & {
|
|
77
|
+
weight?: number;
|
|
78
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
import { ProviderContext, type NativeComponent, type MapManagerCommand, type UIManagerCommand } from './decorateMapComponent';
|
|
4
|
+
export type MapLocalTileProps = ViewProps & {
|
|
5
|
+
/**
|
|
6
|
+
* @platform iOS: Apple Maps only
|
|
7
|
+
* @platform Android: Supported
|
|
8
|
+
*/
|
|
9
|
+
pathTemplate: string;
|
|
10
|
+
/**
|
|
11
|
+
* @platform iOS: Apple Maps only
|
|
12
|
+
* @platform Android: Supported
|
|
13
|
+
*/
|
|
14
|
+
tileSize?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Set to true to use pathTemplate to open files from Android's AssetManager. The default is false.
|
|
17
|
+
* @platform android
|
|
18
|
+
*/
|
|
19
|
+
useAssets?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @platform iOS: Not supported
|
|
22
|
+
* @platform Android: Supported
|
|
23
|
+
*/
|
|
24
|
+
zIndex?: number;
|
|
25
|
+
};
|
|
26
|
+
type NativeProps = MapLocalTileProps;
|
|
27
|
+
export declare class MapLocalTile extends React.Component<MapLocalTileProps> {
|
|
28
|
+
context: React.ContextType<typeof ProviderContext>;
|
|
29
|
+
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
30
|
+
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
31
|
+
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
32
|
+
render(): React.JSX.Element;
|
|
33
|
+
}
|
|
34
|
+
declare const _default: typeof MapLocalTile;
|
|
35
|
+
export default _default;
|