react-native-maps 1.26.10 → 1.26.12
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/MarkerManager.java +6 -0
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +16 -0
- package/dist/plugin/src/android.d.ts +4 -0
- package/dist/plugin/src/index.d.ts +4 -0
- package/dist/plugin/src/ios.d.ts +15 -0
- package/dist/plugin/src/types.d.ts +4 -0
- package/dist/src/AnimatedRegion.d.ts +19 -0
- package/dist/src/Geojson.d.ts +204 -0
- package/dist/src/MapCallout.d.ts +40 -0
- package/dist/src/MapCalloutSubview.d.ts +34 -0
- package/dist/src/MapCircle.d.ts +117 -0
- package/dist/src/MapHeatmap.d.ts +78 -0
- package/dist/src/MapLocalTile.d.ts +35 -0
- package/dist/src/MapMarker.d.ts +322 -0
- package/dist/src/MapMarkerNativeComponent.d.ts +14 -0
- package/dist/src/MapOverlay.d.ts +88 -0
- package/dist/src/MapPolygon.d.ts +140 -0
- package/dist/src/MapPolygon.types.d.ts +18 -0
- package/dist/src/MapPolyline.d.ts +156 -0
- package/dist/src/MapUrlTile.d.ts +134 -0
- package/dist/src/MapView.d.ts +723 -0
- package/dist/src/MapView.types.d.ts +160 -0
- package/dist/src/MapView.web.d.ts +1 -0
- package/dist/src/MapViewNativeComponent.d.ts +17 -0
- package/dist/src/MapWMSTile.d.ts +116 -0
- package/dist/src/ProviderConstants.d.ts +2 -0
- package/dist/src/createFabricMap.d.ts +25 -0
- package/dist/src/decorateMapComponent.d.ts +35 -0
- package/dist/src/fixImageProp.d.ts +4 -0
- package/dist/src/index.d.ts +38 -0
- package/dist/src/sharedTypes.d.ts +87 -0
- package/dist/src/sharedTypesInternal.d.ts +1 -0
- package/dist/src/specs/NativeAirMapsModule.d.ts +31 -0
- package/dist/src/specs/NativeComponentCallout.d.ts +46 -0
- package/dist/src/specs/NativeComponentCircle.d.ts +74 -0
- package/dist/src/specs/NativeComponentGoogleMapView.d.ts +709 -0
- package/dist/src/specs/NativeComponentGooglePolygon.d.ts +83 -0
- package/dist/src/specs/NativeComponentMapView.d.ts +897 -0
- package/dist/src/specs/NativeComponentMarker.d.ts +278 -0
- package/dist/src/specs/NativeComponentOverlay.d.ts +76 -0
- package/dist/src/specs/NativeComponentPolyline.d.ts +101 -0
- package/dist/src/specs/NativeComponentUrlTile.d.ts +109 -0
- package/dist/src/specs/NativeComponentWMSTile.d.ts +91 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +4 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import type { HostComponent } from 'react-native';
|
|
2
|
+
import type { ViewProps, ColorValue, ImageSourcePropType as ImageSource } from 'react-native';
|
|
3
|
+
import type { Int32, Double, BubblingEventHandler, DirectEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
export type LatLng = Readonly<{
|
|
5
|
+
latitude: Double;
|
|
6
|
+
longitude: Double;
|
|
7
|
+
}>;
|
|
8
|
+
export type MarkerPressEventHandler = BubblingEventHandler<Readonly<{
|
|
9
|
+
action: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
coordinate?: {
|
|
12
|
+
latitude: Double;
|
|
13
|
+
longitude: Double;
|
|
14
|
+
};
|
|
15
|
+
position?: {
|
|
16
|
+
x: Double;
|
|
17
|
+
y: Double;
|
|
18
|
+
};
|
|
19
|
+
}>>;
|
|
20
|
+
export type MarkerDragEventHandler = DirectEventHandler<Readonly<{
|
|
21
|
+
id?: string;
|
|
22
|
+
coordinate?: {
|
|
23
|
+
latitude: Double;
|
|
24
|
+
longitude: Double;
|
|
25
|
+
};
|
|
26
|
+
}>>;
|
|
27
|
+
export type CalloutPressEventHandler = BubblingEventHandler<Readonly<{
|
|
28
|
+
action: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
frame?: {
|
|
31
|
+
x: Double;
|
|
32
|
+
y: Double;
|
|
33
|
+
width: Double;
|
|
34
|
+
height: Double;
|
|
35
|
+
};
|
|
36
|
+
point?: {
|
|
37
|
+
x: Double;
|
|
38
|
+
y: Double;
|
|
39
|
+
};
|
|
40
|
+
}>>;
|
|
41
|
+
type AppleMarkerVisibility = 'hidden' | 'adaptive' | 'visible';
|
|
42
|
+
export type AppleMarkerPriority = 'required' | 'high' | 'low';
|
|
43
|
+
export type Point = Readonly<{
|
|
44
|
+
x: Double;
|
|
45
|
+
y: Double;
|
|
46
|
+
}>;
|
|
47
|
+
export interface MarkerFabricNativeProps extends ViewProps {
|
|
48
|
+
/**
|
|
49
|
+
* Sets the anchor point for the marker.
|
|
50
|
+
* The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.
|
|
51
|
+
*
|
|
52
|
+
* The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
|
|
53
|
+
* where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
|
|
54
|
+
*
|
|
55
|
+
* 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.
|
|
56
|
+
* For example, in a 4 x 2 image, the anchor point (0.7, 0.6) resolves to the grid point at (3, 1).
|
|
57
|
+
*
|
|
58
|
+
* @default {x: 0.5, y: 1.0}
|
|
59
|
+
* @platform iOS: Google Maps only. For Apple Maps, see the `centerOffset` prop
|
|
60
|
+
* @platform Android: Supported
|
|
61
|
+
*/
|
|
62
|
+
anchor?: Point;
|
|
63
|
+
/**
|
|
64
|
+
* Specifies the point in the marker image at which to anchor the callout when it is displayed.
|
|
65
|
+
* This is specified in the same coordinate system as the anchor.
|
|
66
|
+
*
|
|
67
|
+
* See the `anchor` prop for more details.
|
|
68
|
+
*
|
|
69
|
+
* @default {x: 0.5, y: 0.0}
|
|
70
|
+
* @platform iOS: Google Maps only. For Apple Maps, see the `calloutOffset` prop
|
|
71
|
+
* @platform Android: Supported
|
|
72
|
+
*/
|
|
73
|
+
calloutAnchor?: Point;
|
|
74
|
+
/**
|
|
75
|
+
* A custom image to be used as the marker's icon. Only local image resources are allowed to be used.
|
|
76
|
+
*
|
|
77
|
+
* @platform iOS: Supported
|
|
78
|
+
* @platform Android: Supported
|
|
79
|
+
*/
|
|
80
|
+
image?: ImageSource | null;
|
|
81
|
+
/**
|
|
82
|
+
* The offset (in points) at which to place the callout bubble.
|
|
83
|
+
* When this property is set to (0, 0),
|
|
84
|
+
* the anchor point of the callout bubble is placed on the top-center point of the marker view’s frame.
|
|
85
|
+
*
|
|
86
|
+
* Specifying positive offset values moves the callout bubble down and to the right,
|
|
87
|
+
* while specifying negative values moves it up and to the left
|
|
88
|
+
*
|
|
89
|
+
* @default {x: 0.0, y: 0.0}
|
|
90
|
+
* @platform iOS: Apple Maps only. For Google Maps, see the `calloutAnchor` prop
|
|
91
|
+
* @platform Android: Not supported. See the `calloutAnchor` prop
|
|
92
|
+
*/
|
|
93
|
+
calloutOffset?: Point;
|
|
94
|
+
/**
|
|
95
|
+
Constants that indicates the display priority for annotations.
|
|
96
|
+
@default required
|
|
97
|
+
@platform iOS: Apple Maps only.
|
|
98
|
+
@platform Android: Not supported
|
|
99
|
+
|
|
100
|
+
Required: A constant indicating that the item is required.
|
|
101
|
+
High: A constant indicating that the item’s display priority is high.
|
|
102
|
+
Low: A constant indicating that the item’s display priority is Low.
|
|
103
|
+
*/
|
|
104
|
+
displayPriority?: WithDefault<AppleMarkerPriority, 'required'>;
|
|
105
|
+
/**
|
|
106
|
+
* The offset (in points) at which to display the annotation view.
|
|
107
|
+
*
|
|
108
|
+
* By default, the center point of an annotation view is placed at the coordinate point of the associated annotation.
|
|
109
|
+
*
|
|
110
|
+
* Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.
|
|
111
|
+
*
|
|
112
|
+
* @default {x: 0.0, y: 0.0}
|
|
113
|
+
* @platform iOS: Apple Maps only. For Google Maps, see the `anchor` prop
|
|
114
|
+
* @platform Android: Not supported. see the `anchor` prop
|
|
115
|
+
*/
|
|
116
|
+
centerOffset?: Point;
|
|
117
|
+
/**
|
|
118
|
+
* The coordinate for the marker.
|
|
119
|
+
*
|
|
120
|
+
* @platform iOS: Supported
|
|
121
|
+
* @platform Android: Supported
|
|
122
|
+
*/
|
|
123
|
+
coordinate: LatLng;
|
|
124
|
+
/**
|
|
125
|
+
* The description of the marker.
|
|
126
|
+
*
|
|
127
|
+
* This is only used if the <Marker /> component has no children that are a `<Callout />`,
|
|
128
|
+
* in which case the default callout behavior will be used,
|
|
129
|
+
* which will show both the `title` and the `description`, if provided.
|
|
130
|
+
*
|
|
131
|
+
* @platform iOS: Supported
|
|
132
|
+
* @platform Android: Supported
|
|
133
|
+
*/
|
|
134
|
+
description?: string;
|
|
135
|
+
/**
|
|
136
|
+
* if `true` allows the marker to be draggable (re-positioned).
|
|
137
|
+
*
|
|
138
|
+
* @default false
|
|
139
|
+
* @platform iOS: Supported
|
|
140
|
+
* @platform Android: Supported
|
|
141
|
+
*/
|
|
142
|
+
draggable?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* The title of the marker.
|
|
145
|
+
* This is only used if the <Marker /> component has no `<Callout />` children.
|
|
146
|
+
*
|
|
147
|
+
* If the marker has <Callout /> children, default callout behavior will be used,
|
|
148
|
+
* which will show both the `title` and the `description`, if provided.
|
|
149
|
+
*
|
|
150
|
+
* @platform iOS: Supported
|
|
151
|
+
* @platform Android: Supported
|
|
152
|
+
*/
|
|
153
|
+
title?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Sets whether this marker should track view changes.
|
|
156
|
+
* It's recommended to turn it off whenever it's possible to improve custom marker performance.
|
|
157
|
+
*
|
|
158
|
+
* @default true
|
|
159
|
+
* @platform iOS: Google Maps only
|
|
160
|
+
* @platform Android: Supported
|
|
161
|
+
*/
|
|
162
|
+
tracksViewChanges?: WithDefault<boolean, true>;
|
|
163
|
+
/**
|
|
164
|
+
* A string that can be used to identify this marker.
|
|
165
|
+
*
|
|
166
|
+
* @platform iOS: Supported
|
|
167
|
+
* @platform Android: Supported
|
|
168
|
+
*/
|
|
169
|
+
identifier?: string;
|
|
170
|
+
/**
|
|
171
|
+
* When true, the marker will be pre-selected.
|
|
172
|
+
* Setting this to true allows the user to drag the marker without needing to tap on it first to focus it.
|
|
173
|
+
*
|
|
174
|
+
* @default false
|
|
175
|
+
* @platform iOS: Apple Maps only
|
|
176
|
+
* @platform Android: Not supported
|
|
177
|
+
*/
|
|
178
|
+
isPreselected?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Callback that is called when the user taps the callout view.
|
|
181
|
+
*
|
|
182
|
+
* @platform iOS: Apple Maps only
|
|
183
|
+
* @platform Android: Supported
|
|
184
|
+
*/
|
|
185
|
+
onCalloutPress?: CalloutPressEventHandler;
|
|
186
|
+
/**
|
|
187
|
+
* Callback that is called when the marker is deselected, before the callout is hidden.
|
|
188
|
+
*
|
|
189
|
+
* @platform iOS: Apple Maps only
|
|
190
|
+
* @platform Android: supported
|
|
191
|
+
*/
|
|
192
|
+
onDeselect?: MarkerPressEventHandler;
|
|
193
|
+
/**
|
|
194
|
+
* Callback called continuously as the marker is dragged
|
|
195
|
+
*
|
|
196
|
+
* @platform iOS: Apple Maps only
|
|
197
|
+
* @platform Android: Supported
|
|
198
|
+
*/
|
|
199
|
+
onDrag?: MarkerDragEventHandler;
|
|
200
|
+
/**
|
|
201
|
+
* Callback that is called when a drag on the marker finishes.
|
|
202
|
+
* This is usually the point you will want to setState on the marker's coordinate again
|
|
203
|
+
*
|
|
204
|
+
* @platform iOS: Apple Maps only
|
|
205
|
+
* @platform Android: Supported
|
|
206
|
+
*/
|
|
207
|
+
onDragEnd?: MarkerDragEventHandler;
|
|
208
|
+
/**
|
|
209
|
+
* Callback that is called when the user initiates a drag on the marker (if it is draggable)
|
|
210
|
+
*
|
|
211
|
+
* @platform iOS: Apple Maps only
|
|
212
|
+
* @platform Android: Supported
|
|
213
|
+
*/
|
|
214
|
+
onDragStart?: MarkerDragEventHandler;
|
|
215
|
+
/**
|
|
216
|
+
* Callback that is called when the marker is tapped by the user.
|
|
217
|
+
*
|
|
218
|
+
* @platform iOS: Supported
|
|
219
|
+
* @platform Android: Supported
|
|
220
|
+
*/
|
|
221
|
+
onPress?: MarkerPressEventHandler;
|
|
222
|
+
/**
|
|
223
|
+
* Callback that is called when the marker becomes selected.
|
|
224
|
+
* This will be called when the callout for that marker is about to be shown.
|
|
225
|
+
*
|
|
226
|
+
* @platform iOS: Supported.
|
|
227
|
+
* @platform Android: Supported
|
|
228
|
+
*/
|
|
229
|
+
onSelect?: MarkerPressEventHandler;
|
|
230
|
+
/**
|
|
231
|
+
* The marker's opacity between 0.0 and 1.0.
|
|
232
|
+
*
|
|
233
|
+
* @default 1.0
|
|
234
|
+
* @platform iOS: Supported
|
|
235
|
+
* @platform Android: Supported
|
|
236
|
+
*/
|
|
237
|
+
opacity?: WithDefault<Double, 1.0>;
|
|
238
|
+
/**
|
|
239
|
+
* If no custom marker view or custom image is provided, the platform default pin will be used, which can be customized by this color.
|
|
240
|
+
* Ignored if a custom marker is being used.<br/><br/>
|
|
241
|
+
* For Android, the set of available colors is limited. Unsupported colors will fall back to red.
|
|
242
|
+
* See [#887](https://github.com/react-community/react-native-maps/issues/887) for more information.
|
|
243
|
+
*
|
|
244
|
+
* @platform iOS: Supported
|
|
245
|
+
* @platform Android: Supported
|
|
246
|
+
*/
|
|
247
|
+
pinColor?: ColorValue;
|
|
248
|
+
/**
|
|
249
|
+
* Visibility of the title text rendered beneath Marker balloon
|
|
250
|
+
* @platform iOS: Apple Maps only
|
|
251
|
+
* @platform Android: Not supported
|
|
252
|
+
*/
|
|
253
|
+
titleVisibility?: WithDefault<AppleMarkerVisibility, 'visible'>;
|
|
254
|
+
/**
|
|
255
|
+
* Visibility of the subtitle text rendered beneath Marker balloon
|
|
256
|
+
* @platform iOS: Apple Maps only
|
|
257
|
+
* @platform Android: Not supported
|
|
258
|
+
*/
|
|
259
|
+
subtitleVisibility?: WithDefault<AppleMarkerVisibility, 'adaptive'>;
|
|
260
|
+
/**
|
|
261
|
+
* Indicate type of default markers if it's true MKPinAnnotationView will be used and MKMarkerAnnotationView if it's false
|
|
262
|
+
* It doesn't change anything if you are using custom Markers
|
|
263
|
+
* @platform iOS: Apple Maps only
|
|
264
|
+
* @platform Android: Not supported
|
|
265
|
+
*/
|
|
266
|
+
useLegacyPinView?: boolean;
|
|
267
|
+
}
|
|
268
|
+
export interface NativeCommands {
|
|
269
|
+
animateToCoordinates: (viewRef: React.ElementRef<React.ComponentType>, latitude: Double, longitude: Double, duration: Int32) => void;
|
|
270
|
+
setCoordinates: (viewRef: React.ElementRef<React.ComponentType>, latitude: Double, longitude: Double) => void;
|
|
271
|
+
showCallout: (viewRef: React.ElementRef<React.ComponentType>) => void;
|
|
272
|
+
hideCallout: (viewRef: React.ElementRef<React.ComponentType>) => void;
|
|
273
|
+
redrawCallout: (viewRef: React.ElementRef<React.ComponentType>) => void;
|
|
274
|
+
redraw: (viewRef: React.ElementRef<React.ComponentType>) => void;
|
|
275
|
+
}
|
|
276
|
+
export declare const Commands: NativeCommands;
|
|
277
|
+
declare const _default: HostComponent<MarkerFabricNativeProps>;
|
|
278
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Double, Float, BubblingEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
2
|
+
import type { ViewProps, HostComponent, ImageSourcePropType as ImageSource } from 'react-native';
|
|
3
|
+
export type LatLng = Readonly<{
|
|
4
|
+
latitude: Double;
|
|
5
|
+
longitude: Double;
|
|
6
|
+
}>;
|
|
7
|
+
export type OverlayPressEventHandler = BubblingEventHandler<Readonly<{
|
|
8
|
+
action?: string;
|
|
9
|
+
id: string;
|
|
10
|
+
coordinate: {
|
|
11
|
+
latitude: Double;
|
|
12
|
+
longitude: Double;
|
|
13
|
+
};
|
|
14
|
+
position?: {
|
|
15
|
+
x: Double;
|
|
16
|
+
y: Double;
|
|
17
|
+
};
|
|
18
|
+
}>>;
|
|
19
|
+
export interface OverlayFabricNativeProps extends ViewProps {
|
|
20
|
+
/**
|
|
21
|
+
* The bearing in degrees clockwise from north. Values outside the range [0, 360) will be normalized.
|
|
22
|
+
*
|
|
23
|
+
* @default 0
|
|
24
|
+
* @platform iOS: Google Maps only
|
|
25
|
+
* @platform Android: Supported
|
|
26
|
+
*/
|
|
27
|
+
bearing?: Float;
|
|
28
|
+
/**
|
|
29
|
+
* The coordinates for the image (left-top corner, right-bottom corner). ie.```[[lat, long], [lat, long]]```
|
|
30
|
+
*
|
|
31
|
+
* @platform iOS: Supported
|
|
32
|
+
* @platform Android: Supported
|
|
33
|
+
*/
|
|
34
|
+
bounds: Readonly<{
|
|
35
|
+
northEast: {
|
|
36
|
+
latitude: Double;
|
|
37
|
+
longitude: Double;
|
|
38
|
+
};
|
|
39
|
+
southWest: {
|
|
40
|
+
latitude: Double;
|
|
41
|
+
longitude: Double;
|
|
42
|
+
};
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* A custom image to be used as the overlay.
|
|
46
|
+
* Only required local image resources and uri (as for images located in the net) are allowed to be used.
|
|
47
|
+
*
|
|
48
|
+
* @platform iOS: Supported
|
|
49
|
+
* @platform Android: Supported
|
|
50
|
+
*/
|
|
51
|
+
image?: ImageSource | null;
|
|
52
|
+
/**
|
|
53
|
+
* Callback that is called when user taps on the map.
|
|
54
|
+
*
|
|
55
|
+
* @platform iOS: Supported
|
|
56
|
+
* @platform Android: Supported
|
|
57
|
+
*/
|
|
58
|
+
onPress?: OverlayPressEventHandler;
|
|
59
|
+
/**
|
|
60
|
+
* The overlay's opacity between 0.0 and 1.0.
|
|
61
|
+
*
|
|
62
|
+
* @default 1.0
|
|
63
|
+
* @platform iOS: Supported
|
|
64
|
+
* @platform Android: Supported
|
|
65
|
+
*/
|
|
66
|
+
opacity?: WithDefault<Float, 1.0>;
|
|
67
|
+
/**
|
|
68
|
+
* Boolean to allow a polygon to be tappable and use the onPress function.
|
|
69
|
+
*
|
|
70
|
+
* @platform iOS: Google Maps only
|
|
71
|
+
* @platform Android: Supported
|
|
72
|
+
*/
|
|
73
|
+
tappable?: boolean;
|
|
74
|
+
}
|
|
75
|
+
declare const _default: HostComponent<OverlayFabricNativeProps>;
|
|
76
|
+
export default _default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps, ColorValue } from 'react-native';
|
|
2
|
+
import type { Double, Float, BubblingEventHandler, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export type LatLng = Readonly<{
|
|
4
|
+
latitude: Double;
|
|
5
|
+
longitude: Double;
|
|
6
|
+
}>;
|
|
7
|
+
export type PolylinePressEventHandler = BubblingEventHandler<Readonly<{
|
|
8
|
+
action?: string;
|
|
9
|
+
id: string;
|
|
10
|
+
coordinate: {
|
|
11
|
+
latitude: Double;
|
|
12
|
+
longitude: Double;
|
|
13
|
+
};
|
|
14
|
+
position?: {
|
|
15
|
+
x: Double;
|
|
16
|
+
y: Double;
|
|
17
|
+
};
|
|
18
|
+
}>>;
|
|
19
|
+
export interface PolylineFabricNativeProps extends ViewProps {
|
|
20
|
+
/**
|
|
21
|
+
* An array of coordinates to describe the polygon
|
|
22
|
+
*
|
|
23
|
+
* @platform iOS: Supported
|
|
24
|
+
* @platform Android: Supported
|
|
25
|
+
*/
|
|
26
|
+
coordinates: ReadonlyArray<LatLng>;
|
|
27
|
+
/**
|
|
28
|
+
* Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
|
|
29
|
+
* A geodesic is the shortest path between two points on the Earth's surface.
|
|
30
|
+
* The geodesic curve is constructed assuming the Earth is a sphere.
|
|
31
|
+
*
|
|
32
|
+
* @platform iOS: Google Maps only
|
|
33
|
+
* @platform Android: Supported
|
|
34
|
+
*/
|
|
35
|
+
geodesic?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The line cap style to apply to the open ends of the path
|
|
38
|
+
*
|
|
39
|
+
* @default `round`
|
|
40
|
+
* @platform iOS: Apple Maps only
|
|
41
|
+
* @platform Android: supported
|
|
42
|
+
* */
|
|
43
|
+
lineCap?: WithDefault<'butt' | 'round' | 'square', 'butt'>;
|
|
44
|
+
/**
|
|
45
|
+
* An array of numbers specifying the dash pattern to use for the path.
|
|
46
|
+
* The array contains one or more numbers that indicate the lengths (measured in points)
|
|
47
|
+
* of the line segments and gaps in the pattern.
|
|
48
|
+
* The values in the array alternate, starting with the first line segment length,
|
|
49
|
+
* followed by the first gap length, followed by the second line segment length, and so on.
|
|
50
|
+
*
|
|
51
|
+
* @platform iOS: Apple Maps only
|
|
52
|
+
* @platform Android: supported
|
|
53
|
+
*/
|
|
54
|
+
lineDashPattern?: ReadonlyArray<Double>;
|
|
55
|
+
/**
|
|
56
|
+
* The line join style to apply to corners of the path.
|
|
57
|
+
*
|
|
58
|
+
* @platform iOS: Apple Maps only
|
|
59
|
+
* @platform Android: supported
|
|
60
|
+
*/
|
|
61
|
+
lineJoin?: WithDefault<'miter' | 'round' | 'bevel', 'miter'>;
|
|
62
|
+
/**
|
|
63
|
+
* Callback that is called when user taps on the map.
|
|
64
|
+
*
|
|
65
|
+
* @platform iOS: Supported
|
|
66
|
+
* @platform Android: Supported
|
|
67
|
+
*/
|
|
68
|
+
onPress?: PolylinePressEventHandler;
|
|
69
|
+
/**
|
|
70
|
+
* The stroke color to use for the path.
|
|
71
|
+
*
|
|
72
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
73
|
+
* @platform iOS: Supported
|
|
74
|
+
* @platform Android: Supported
|
|
75
|
+
*/
|
|
76
|
+
strokeColor?: ColorValue;
|
|
77
|
+
/**
|
|
78
|
+
* The stroke colors to use for the path.
|
|
79
|
+
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
80
|
+
* @platform iOS: Supported
|
|
81
|
+
* @platform Android: Supported
|
|
82
|
+
*/
|
|
83
|
+
strokeColors?: ReadonlyArray<ColorValue>;
|
|
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?: WithDefault<Float, 1.0>;
|
|
92
|
+
/**
|
|
93
|
+
* Boolean to allow a polygon to be tappable and use the onPress function.
|
|
94
|
+
*
|
|
95
|
+
* @platform iOS: Google Maps only
|
|
96
|
+
* @platform Android: Supported
|
|
97
|
+
*/
|
|
98
|
+
tappable?: boolean;
|
|
99
|
+
}
|
|
100
|
+
declare const _default: HostComponent<PolylineFabricNativeProps>;
|
|
101
|
+
export default _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type { Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export interface UrlTileFabricNativeProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Doubles tile size from 256 to 512 utilising higher zoom levels
|
|
6
|
+
* i.e loading 4 higher zoom level tiles and combining them for one high-resolution tile.
|
|
7
|
+
* iOS does this automatically, even if it is not desirable always.
|
|
8
|
+
* NB! using this makes text labels smaller than in the original map style.
|
|
9
|
+
*
|
|
10
|
+
* @platform iOS: Not supported
|
|
11
|
+
* @platform Android: Supported
|
|
12
|
+
*/
|
|
13
|
+
doubleTileSize?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Allow tiles using the TMS coordinate system (origin bottom left) to be used,
|
|
16
|
+
* and displayed at their correct coordinates.
|
|
17
|
+
*
|
|
18
|
+
* @platform iOS: Supported
|
|
19
|
+
* @platform Android: Supported
|
|
20
|
+
*/
|
|
21
|
+
flipY?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The maximum native zoom level for this tile overlay i.e. the highest zoom level that the tile server provides.
|
|
24
|
+
* Tiles are auto-scaled for higher zoom levels.
|
|
25
|
+
*
|
|
26
|
+
* @platform iOS: Apple Maps only
|
|
27
|
+
* @platform Android: Supported
|
|
28
|
+
*/
|
|
29
|
+
maximumNativeZ?: WithDefault<Int32, 100>;
|
|
30
|
+
/**
|
|
31
|
+
* The maximum zoom level for this tile overlay.
|
|
32
|
+
*
|
|
33
|
+
* @platform iOS: Supported
|
|
34
|
+
* @platform Android: Supported
|
|
35
|
+
*/
|
|
36
|
+
maximumZ?: WithDefault<Int32, 100>;
|
|
37
|
+
/**
|
|
38
|
+
* The minimum zoom level for this tile overlay.
|
|
39
|
+
*
|
|
40
|
+
* @platform iOS: Supported
|
|
41
|
+
* @platform Android: Supported
|
|
42
|
+
*/
|
|
43
|
+
minimumZ?: Int32;
|
|
44
|
+
/**
|
|
45
|
+
* In offline-mode tiles are not fetched from the tile servers, rather only tiles stored in the cache directory are used.
|
|
46
|
+
* Furthermore, automated tile scaling is activated: if tile at a desired zoom level is not found from the cache directory,
|
|
47
|
+
* then lower zoom level tile is used (up to 4 levels lower) and scaled.
|
|
48
|
+
*
|
|
49
|
+
* @default false
|
|
50
|
+
* @platform iOS: Apple Maps only
|
|
51
|
+
* @platform Android: Supported
|
|
52
|
+
*/
|
|
53
|
+
offlineMode?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Corresponds to MKTileOverlay canReplaceMapContent i.e. if true then underlying iOS basemap is not shown.
|
|
56
|
+
*
|
|
57
|
+
* @default false
|
|
58
|
+
* @platform iOS: Apple Maps only
|
|
59
|
+
* @platform Android: Not supported
|
|
60
|
+
*/
|
|
61
|
+
shouldReplaceMapContent?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Defines maximum age in seconds for a cached tile before it's refreshed.
|
|
64
|
+
*
|
|
65
|
+
* NB! Refresh logic is "serve-stale-while-refresh"
|
|
66
|
+
* i.e. to ensure map availability a stale (over max age) tile is served
|
|
67
|
+
* while a tile refresh process is started in the background.
|
|
68
|
+
*
|
|
69
|
+
* @platform iOS: Apple Maps only
|
|
70
|
+
* @platform Android: Supported
|
|
71
|
+
*/
|
|
72
|
+
tileCacheMaxAge?: Int32;
|
|
73
|
+
/**
|
|
74
|
+
* Enable caching of tiles in the specified directory.
|
|
75
|
+
* Directory can be specified either as a normal path or in URL format (`file://`).
|
|
76
|
+
*
|
|
77
|
+
* Tiles are stored in tileCachePath directory as `/{z}/{x}/{y}` i.e. in sub-directories 2-levels deep,
|
|
78
|
+
* filename is tile y-coordinate without any filetype-extension.
|
|
79
|
+
*
|
|
80
|
+
* NB! All cache management needs to be implemented by client e.g. deleting tiles to manage use of storage space etc.
|
|
81
|
+
*
|
|
82
|
+
* @platform iOS: Apple Maps only
|
|
83
|
+
* @platform Android: Supported
|
|
84
|
+
*/
|
|
85
|
+
tileCachePath?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Tile size, default size is 256 (for tiles of 256 _ 256 pixels).
|
|
88
|
+
* High-res (aka 'retina') tiles are 512 (tiles of 512 _ 512 pixels)
|
|
89
|
+
*
|
|
90
|
+
* @platform iOS: Apple Maps only
|
|
91
|
+
* @platform Android: Supported
|
|
92
|
+
*/
|
|
93
|
+
tileSize?: WithDefault<Int32, 256>;
|
|
94
|
+
/**
|
|
95
|
+
* The url template of the map tileserver.
|
|
96
|
+
* (URLTile) The patterns {x} {y} {z} will be replaced at runtime.
|
|
97
|
+
* For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png.
|
|
98
|
+
*
|
|
99
|
+
* It is also possible to refer to tiles in local filesystem with file:///top-level-directory/sub-directory/{z}/{x}/{y}.png URL-format.
|
|
100
|
+
* (WMSTile) The patterns {minX} {maxX} {minY} {maxY} {width} {height} will be replaced at runtime according to EPSG:900913 specification bounding box.
|
|
101
|
+
* For example, https://demo.geo-solutions.it/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:poi&styles=&bbox={minX},{minY},{maxX},{maxY}&width={width}&height={height}&srs=EPSG:900913&format=image/png&transparent=true&format_options=dpi:213.
|
|
102
|
+
*
|
|
103
|
+
* @platform iOS: Supported
|
|
104
|
+
* @platform Android: Supported
|
|
105
|
+
*/
|
|
106
|
+
urlTemplate: string;
|
|
107
|
+
}
|
|
108
|
+
declare const _default: HostComponent<UrlTileFabricNativeProps>;
|
|
109
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type { Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export interface WMSTileFabricNativeProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* The maximum native zoom level for this tile overlay i.e. the highest zoom level that the tile server provides.
|
|
6
|
+
* Tiles are auto-scaled for higher zoom levels.
|
|
7
|
+
*
|
|
8
|
+
* @platform iOS: Apple Maps only
|
|
9
|
+
* @platform Android: Supported
|
|
10
|
+
*/
|
|
11
|
+
maximumNativeZ?: WithDefault<Int32, 100>;
|
|
12
|
+
/**
|
|
13
|
+
* The maximum zoom level for this tile overlay.
|
|
14
|
+
*
|
|
15
|
+
* @platform iOS: Supported
|
|
16
|
+
* @platform Android: Supported
|
|
17
|
+
*/
|
|
18
|
+
maximumZ?: WithDefault<Int32, 100>;
|
|
19
|
+
/**
|
|
20
|
+
* The minimum zoom level for this tile overlay.
|
|
21
|
+
*
|
|
22
|
+
* @platform iOS: Supported
|
|
23
|
+
* @platform Android: Supported
|
|
24
|
+
*/
|
|
25
|
+
minimumZ?: Int32;
|
|
26
|
+
/**
|
|
27
|
+
* In offline-mode tiles are not fetched from the tile servers, rather only tiles stored in the cache directory are used.
|
|
28
|
+
* Furthermore, automated tile scaling is activated: if tile at a desired zoom level is not found from the cache directory,
|
|
29
|
+
* then lower zoom level tile is used (up to 4 levels lower) and scaled.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
* @platform iOS: Apple Maps only
|
|
33
|
+
* @platform Android: Supported
|
|
34
|
+
*/
|
|
35
|
+
offlineMode?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Corresponds to MKTileOverlay canReplaceMapContent i.e. if true then underlying iOS basemap is not shown.
|
|
38
|
+
*
|
|
39
|
+
* @default false
|
|
40
|
+
* @platform iOS: Apple Maps only
|
|
41
|
+
* @platform Android: Not supported
|
|
42
|
+
*/
|
|
43
|
+
shouldReplaceMapContent?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Defines maximum age in seconds for a cached tile before it's refreshed.
|
|
46
|
+
*
|
|
47
|
+
* NB! Refresh logic is "serve-stale-while-refresh"
|
|
48
|
+
* i.e. to ensure map availability a stale (over max age) tile is served
|
|
49
|
+
* while a tile refresh process is started in the background.
|
|
50
|
+
*
|
|
51
|
+
* @platform iOS: Apple Maps only
|
|
52
|
+
* @platform Android: Supported
|
|
53
|
+
*/
|
|
54
|
+
tileCacheMaxAge?: Int32;
|
|
55
|
+
/**
|
|
56
|
+
* Enable caching of tiles in the specified directory.
|
|
57
|
+
* Directory can be specified either as a normal path or in URL format (`file://`).
|
|
58
|
+
*
|
|
59
|
+
* Tiles are stored in tileCachePath directory as `/{z}/{x}/{y}` i.e. in sub-directories 2-levels deep,
|
|
60
|
+
* filename is tile y-coordinate without any filetype-extension.
|
|
61
|
+
*
|
|
62
|
+
* NB! All cache management needs to be implemented by client e.g. deleting tiles to manage use of storage space etc.
|
|
63
|
+
*
|
|
64
|
+
* @platform iOS: Apple Maps only
|
|
65
|
+
* @platform Android: Supported
|
|
66
|
+
*/
|
|
67
|
+
tileCachePath?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Tile size, default size is 256 (for tiles of 256 _ 256 pixels).
|
|
70
|
+
* High-res (aka 'retina') tiles are 512 (tiles of 512 _ 512 pixels)
|
|
71
|
+
*
|
|
72
|
+
* @platform iOS: Supported
|
|
73
|
+
* @platform Android: Supported
|
|
74
|
+
*/
|
|
75
|
+
tileSize?: WithDefault<Int32, 256>;
|
|
76
|
+
/**
|
|
77
|
+
* The url template of the map tileserver.
|
|
78
|
+
* (URLTile) The patterns {x} {y} {z} will be replaced at runtime.
|
|
79
|
+
* For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png.
|
|
80
|
+
*
|
|
81
|
+
* It is also possible to refer to tiles in local filesystem with file:///top-level-directory/sub-directory/{z}/{x}/{y}.png URL-format.
|
|
82
|
+
* (WMSTile) The patterns {minX} {maxX} {minY} {maxY} {width} {height} will be replaced at runtime according to EPSG:900913 specification bounding box.
|
|
83
|
+
* For example, https://demo.geo-solutions.it/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:poi&styles=&bbox={minX},{minY},{maxX},{maxY}&width={width}&height={height}&srs=EPSG:900913&format=image/png&transparent=true&format_options=dpi:213.
|
|
84
|
+
*
|
|
85
|
+
* @platform iOS: Supported
|
|
86
|
+
* @platform Android: Supported
|
|
87
|
+
*/
|
|
88
|
+
urlTemplate: string;
|
|
89
|
+
}
|
|
90
|
+
declare const _default: HostComponent<WMSTileFabricNativeProps>;
|
|
91
|
+
export default _default;
|