@rnmapbox/maps 10.0.0-beta.74 → 10.0.0-beta.75
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/rctmgl/src/main/java-v10/com/mapbox/rctmgl/components/camera/CameraStop.kt +61 -46
- package/index.d.ts +28 -257
- package/javascript/components/ImageSource.tsx +81 -0
- package/javascript/components/{MapView.js → MapView.tsx} +456 -383
- package/javascript/components/NativeBridgeComponent.tsx +1 -1
- package/javascript/components/RasterDemSource.tsx +105 -0
- package/javascript/components/RasterSource.tsx +124 -0
- package/javascript/modules/offline/{OfflineCreatePackOptions.js → OfflineCreatePackOptions.ts} +21 -6
- package/javascript/modules/offline/{OfflinePack.js → OfflinePack.ts} +19 -4
- package/javascript/modules/offline/{offlineManager.js → offlineManager.ts} +77 -21
- package/javascript/modules/snapshot/{SnapshotOptions.js → SnapshotOptions.ts} +27 -3
- package/javascript/modules/snapshot/{snapshotManager.js → snapshotManager.ts} +1 -1
- package/javascript/utils/geoUtils.ts +91 -0
- package/javascript/utils/{index.js → index.ts} +41 -19
- package/lib/commonjs/components/ImageSource.js +8 -25
- package/lib/commonjs/components/ImageSource.js.map +1 -1
- package/lib/commonjs/components/MapView.js +30 -289
- package/lib/commonjs/components/MapView.js.map +1 -1
- package/lib/commonjs/components/NativeBridgeComponent.js.map +1 -1
- package/lib/commonjs/components/RasterDemSource.js +3 -37
- package/lib/commonjs/components/RasterDemSource.js.map +1 -1
- package/lib/commonjs/components/RasterSource.js +2 -46
- package/lib/commonjs/components/RasterSource.js.map +1 -1
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js +2 -4
- package/lib/commonjs/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/commonjs/modules/offline/OfflinePack.js.map +1 -1
- package/lib/commonjs/modules/offline/offlineManager.js +1 -2
- package/lib/commonjs/modules/offline/offlineManager.js.map +1 -1
- package/lib/commonjs/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/commonjs/modules/snapshot/snapshotManager.js.map +1 -1
- package/lib/commonjs/utils/geoUtils.js +15 -23
- package/lib/commonjs/utils/geoUtils.js.map +1 -1
- package/lib/commonjs/utils/index.js +3 -6
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/components/ImageSource.js +8 -25
- package/lib/module/components/ImageSource.js.map +1 -1
- package/lib/module/components/MapView.js +31 -290
- package/lib/module/components/MapView.js.map +1 -1
- package/lib/module/components/NativeBridgeComponent.js.map +1 -1
- package/lib/module/components/RasterDemSource.js +4 -38
- package/lib/module/components/RasterDemSource.js.map +1 -1
- package/lib/module/components/RasterSource.js +3 -47
- package/lib/module/components/RasterSource.js.map +1 -1
- package/lib/module/modules/offline/OfflineCreatePackOptions.js +2 -4
- package/lib/module/modules/offline/OfflineCreatePackOptions.js.map +1 -1
- package/lib/module/modules/offline/OfflinePack.js.map +1 -1
- package/lib/module/modules/offline/offlineManager.js +0 -1
- package/lib/module/modules/offline/offlineManager.js.map +1 -1
- package/lib/module/modules/snapshot/SnapshotOptions.js.map +1 -1
- package/lib/module/modules/snapshot/snapshotManager.js.map +1 -1
- package/lib/module/utils/geoUtils.js +7 -18
- package/lib/module/utils/geoUtils.js.map +1 -1
- package/lib/module/utils/index.js +3 -5
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/components/ImageSource.d.ts +32 -0
- package/lib/typescript/components/ImageSource.d.ts.map +1 -0
- package/lib/typescript/components/MapView.d.ts +472 -0
- package/lib/typescript/components/MapView.d.ts.map +1 -0
- package/lib/typescript/components/NativeBridgeComponent.d.ts +1 -1
- package/lib/typescript/components/NativeBridgeComponent.d.ts.map +1 -1
- package/lib/typescript/components/PointAnnotation.d.ts +1 -1
- package/lib/typescript/components/RasterDemSource.d.ts +46 -0
- package/lib/typescript/components/RasterDemSource.d.ts.map +1 -0
- package/lib/typescript/components/RasterSource.d.ts +59 -0
- package/lib/typescript/components/RasterSource.d.ts.map +1 -0
- package/lib/typescript/components/ShapeSource.d.ts +1 -1
- package/lib/typescript/components/VectorSource.d.ts +1 -1
- package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts +22 -0
- package/lib/typescript/modules/offline/OfflineCreatePackOptions.d.ts.map +1 -0
- package/lib/typescript/modules/offline/OfflinePack.d.ts +24 -0
- package/lib/typescript/modules/offline/OfflinePack.d.ts.map +1 -0
- package/lib/typescript/modules/offline/offlineManager.d.ts +219 -0
- package/lib/typescript/modules/offline/offlineManager.d.ts.map +1 -0
- package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts +41 -0
- package/lib/typescript/modules/snapshot/SnapshotOptions.d.ts.map +1 -0
- package/lib/typescript/modules/snapshot/snapshotManager.d.ts +51 -0
- package/lib/typescript/modules/snapshot/snapshotManager.d.ts.map +1 -0
- package/lib/typescript/utils/geoUtils.d.ts +23 -0
- package/lib/typescript/utils/geoUtils.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +48 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/package.json +3 -1
- package/javascript/components/ImageSource.js +0 -82
- package/javascript/components/RasterDemSource.js +0 -106
- package/javascript/components/RasterSource.js +0 -124
- package/javascript/utils/geoUtils.d.ts +0 -10
- package/javascript/utils/geoUtils.js +0 -73
- package/javascript/utils/index.d.ts +0 -27
- package/lib/commonjs/utils/geoUtils.d.js +0 -2
- package/lib/commonjs/utils/geoUtils.d.js.map +0 -1
- package/lib/commonjs/utils/index.d.js +0 -2
- package/lib/commonjs/utils/index.d.js.map +0 -1
- package/lib/module/utils/geoUtils.d.js +0 -2
- package/lib/module/utils/geoUtils.d.js.map +0 -1
- package/lib/module/utils/index.d.js +0 -2
- package/lib/module/utils/index.d.js.map +0 -1
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { ViewProps, NativeSyntheticEvent, NativeMethods, LayoutChangeEvent } from 'react-native';
|
|
3
|
+
import { type NativeArg, type OrnamentPositonProp } from '../utils';
|
|
4
|
+
import Logger from '../utils/Logger';
|
|
5
|
+
import { FilterExpression } from '../utils/MapboxStyles';
|
|
6
|
+
export declare const NATIVE_MODULE_NAME = "RCTMGLMapView";
|
|
7
|
+
export declare const ANDROID_TEXTURE_NATIVE_MODULE_NAME = "RCTMGLAndroidTextureMapView";
|
|
8
|
+
export declare type Point = {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
export declare type Position = [number, number];
|
|
13
|
+
declare type BBox = [number, number, number, number];
|
|
14
|
+
export declare type RegionPayload = {
|
|
15
|
+
zoomLevel: number;
|
|
16
|
+
heading: number;
|
|
17
|
+
animated: boolean;
|
|
18
|
+
isUserInteraction: boolean;
|
|
19
|
+
visibleBounds: GeoJSON.Position[];
|
|
20
|
+
pitch: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* v10 only - experimental
|
|
24
|
+
*/
|
|
25
|
+
export declare type MapState = {
|
|
26
|
+
properties: {
|
|
27
|
+
center: GeoJSON.Position;
|
|
28
|
+
bounds: {
|
|
29
|
+
ne: GeoJSON.Position;
|
|
30
|
+
sw: GeoJSON.Position;
|
|
31
|
+
};
|
|
32
|
+
zoom: number;
|
|
33
|
+
heading: number;
|
|
34
|
+
pitch: number;
|
|
35
|
+
};
|
|
36
|
+
gestures: {
|
|
37
|
+
isGestureActive: boolean;
|
|
38
|
+
isAnimatingFromGesture: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
declare type Props = ViewProps & {
|
|
42
|
+
/**
|
|
43
|
+
* The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport.
|
|
44
|
+
*/
|
|
45
|
+
contentInset?: number | number[];
|
|
46
|
+
/**
|
|
47
|
+
* The projection used when rendering the map
|
|
48
|
+
*/
|
|
49
|
+
projection?: 'mercator' | 'globe';
|
|
50
|
+
/**
|
|
51
|
+
* Style URL for map - notice, if non is set it _will_ default to `MapboxGL.StyleURL.Street`
|
|
52
|
+
*/
|
|
53
|
+
styleURL?: string;
|
|
54
|
+
/**
|
|
55
|
+
* StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec
|
|
56
|
+
*/
|
|
57
|
+
styleJSON?: string;
|
|
58
|
+
/**
|
|
59
|
+
* iOS: The preferred frame rate at which the map view is rendered.
|
|
60
|
+
* The default value for this property is MGLMapViewPreferredFramesPerSecondDefault,
|
|
61
|
+
* which will adaptively set the preferred frame rate based on the capability of
|
|
62
|
+
* the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.
|
|
63
|
+
*
|
|
64
|
+
* Android: The maximum frame rate at which the map view is rendered, but it can't exceed the ability of device hardware.
|
|
65
|
+
* This property can be set to arbitrary integer values.
|
|
66
|
+
*/
|
|
67
|
+
preferredFramesPerSecond?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Automatically change the language of the map labels to the system’s preferred language,
|
|
70
|
+
* this is not something that can be toggled on/off
|
|
71
|
+
*/
|
|
72
|
+
localizeLabels?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Enable/Disable zoom on the map
|
|
75
|
+
*/
|
|
76
|
+
zoomEnabled?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Enable/Disable scroll on the map
|
|
79
|
+
*/
|
|
80
|
+
scrollEnabled?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Enable/Disable pitch on map
|
|
83
|
+
*/
|
|
84
|
+
pitchEnabled?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Enable/Disable rotation on map
|
|
87
|
+
*/
|
|
88
|
+
rotateEnabled?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles,
|
|
91
|
+
* [requires](https://www.mapbox.com/help/how-attribution-works/) these copyright notices to accompany any map that features Mapbox-designed styles, OpenStreetMap data, or other Mapbox data such as satellite or terrain data.
|
|
92
|
+
* If that applies to this map view, do not hide this view or remove any notices from it.
|
|
93
|
+
*
|
|
94
|
+
* You are additionally [required](https://www.mapbox.com/help/how-mobile-apps-work/#telemetry) to provide users with the option to disable anonymous usage and location sharing (telemetry).
|
|
95
|
+
* If this view is hidden, you must implement this setting elsewhere in your app. See our website for [Android](https://www.mapbox.com/android-docs/map-sdk/overview/#telemetry-opt-out) and [iOS](https://www.mapbox.com/ios-sdk/#telemetry_opt_out) for implementation details.
|
|
96
|
+
*
|
|
97
|
+
* Enable/Disable attribution on map. For iOS you need to add MGLMapboxMetricsEnabledSettingShownInApp=YES
|
|
98
|
+
* to your Info.plist
|
|
99
|
+
*/
|
|
100
|
+
attributionEnabled?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map. By default on Android, the attribution with information icon (i) will be on the bottom left, while on iOS the mapbox logo will be on bottom left with information icon (i) on bottom right. Read more about mapbox attribution [here](https://docs.mapbox.com/help/getting-started/attribution/)
|
|
103
|
+
*/
|
|
104
|
+
attributionPosition?: OrnamentPositonProp;
|
|
105
|
+
/**
|
|
106
|
+
* MapView's tintColor
|
|
107
|
+
*/
|
|
108
|
+
tintColor?: string | number[];
|
|
109
|
+
/**
|
|
110
|
+
* Enable/Disable the logo on the map.
|
|
111
|
+
*/
|
|
112
|
+
logoEnabled?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map
|
|
115
|
+
*/
|
|
116
|
+
logoPosition?: OrnamentPositonProp;
|
|
117
|
+
/**
|
|
118
|
+
* Enable/Disable the compass from appearing on the map
|
|
119
|
+
*/
|
|
120
|
+
compassEnabled: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* [`mapbox` (v10) implementation only] Enable/Disable if the compass should fade out when the map is pointing north
|
|
123
|
+
*/
|
|
124
|
+
compassFadeWhenNorth?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* [`mapbox` (v10) implementation only] Adds compass offset, e.g. `{top: 8, left: 8}` will put the compass in top-left corner of the map
|
|
127
|
+
*/
|
|
128
|
+
compassPosition?: OrnamentPositonProp;
|
|
129
|
+
/**
|
|
130
|
+
* Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight
|
|
131
|
+
*/
|
|
132
|
+
compassViewPosition?: number;
|
|
133
|
+
/**
|
|
134
|
+
* Add margins to the compass with x and y values
|
|
135
|
+
*/
|
|
136
|
+
compassViewMargins?: Point;
|
|
137
|
+
/**
|
|
138
|
+
* [iOS, `mapbox` (v10) implementation only] A string referencing an image key. Requires an `Images` component.
|
|
139
|
+
*/
|
|
140
|
+
compassImage?: string;
|
|
141
|
+
/**
|
|
142
|
+
* [`mapbox` (v10) implementation only] Enable/Disable the scale bar from appearing on the map
|
|
143
|
+
*/
|
|
144
|
+
scaleBarEnabled?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* [`mapbox` (v10) implementation only] Adds scale bar offset, e.g. `{top: 8, left: 8}` will put the scale bar in top-left corner of the map
|
|
147
|
+
*/
|
|
148
|
+
scaleBarPosition?: OrnamentPositonProp;
|
|
149
|
+
/**
|
|
150
|
+
* [Android only] Enable/Disable use of GLSurfaceView instead of TextureView.
|
|
151
|
+
*/
|
|
152
|
+
surfaceView?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Map press listener, gets called when a user presses the map
|
|
155
|
+
*/
|
|
156
|
+
onPress?: (feature: GeoJSON.Feature) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Map long press listener, gets called when a user long presses the map
|
|
159
|
+
*/
|
|
160
|
+
onLongPress?: (feature: GeoJSON.Feature) => void;
|
|
161
|
+
/**
|
|
162
|
+
* <v10 only
|
|
163
|
+
*
|
|
164
|
+
* This event is triggered whenever the currently displayed map region is about to change.
|
|
165
|
+
*
|
|
166
|
+
* @param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
|
|
167
|
+
*/
|
|
168
|
+
onRegionWillChange?: (feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>) => void;
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* This event is triggered whenever the currently displayed map region is changing.
|
|
172
|
+
*
|
|
173
|
+
* @param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
|
|
174
|
+
*/
|
|
175
|
+
onRegionIsChanging?: (feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>) => void;
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
* This event is triggered whenever the currently displayed map region finished changing.
|
|
179
|
+
*
|
|
180
|
+
* @param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
|
|
181
|
+
*/
|
|
182
|
+
onRegionDidChange?: (feature: GeoJSON.Feature<GeoJSON.Point, RegionPayload>) => void;
|
|
183
|
+
/**
|
|
184
|
+
* iOS, v10 only, deprecated will be removed in next version - please use onRegionIsChanging.
|
|
185
|
+
*/
|
|
186
|
+
onCameraChanged?: (state: MapState) => void;
|
|
187
|
+
/**
|
|
188
|
+
* iOS, v10 only, deprecated will be removed in next version - please use onRegionDidChange
|
|
189
|
+
*/
|
|
190
|
+
onMapIdle?: (state: MapState) => void;
|
|
191
|
+
/**
|
|
192
|
+
* This event is triggered when the map is about to start loading a new map style.
|
|
193
|
+
*/
|
|
194
|
+
onWillStartLoadingMap?: () => void;
|
|
195
|
+
/**
|
|
196
|
+
* This is triggered when the map has successfully loaded a new map style.
|
|
197
|
+
*/
|
|
198
|
+
onDidFinishLoadingMap?: () => void;
|
|
199
|
+
/**
|
|
200
|
+
* This event is triggered when the map has failed to load a new map style. On v10 it's deprecated and replaced by onMapLoadingError
|
|
201
|
+
* @deprecated use onMapLoadingError
|
|
202
|
+
*/
|
|
203
|
+
onDidFailLoadingMap?: () => void;
|
|
204
|
+
/**
|
|
205
|
+
* This event is tiggered when there is an error during map load. V10 only, replaces onDidFailLoadingMap, might be called multiple times and not exclusive with onDidFinishLoadingMap.
|
|
206
|
+
*/
|
|
207
|
+
onMapLoadingError?: () => void;
|
|
208
|
+
/**
|
|
209
|
+
* This event is triggered when the map will start rendering a frame.
|
|
210
|
+
*/
|
|
211
|
+
onWillStartRenderingFrame?: () => void;
|
|
212
|
+
/**
|
|
213
|
+
* This event is triggered when the map finished rendering a frame.
|
|
214
|
+
*/
|
|
215
|
+
onDidFinishRenderingFrame?: () => void;
|
|
216
|
+
/**
|
|
217
|
+
* This event is triggered when the map fully finished rendering a frame.
|
|
218
|
+
*/
|
|
219
|
+
onDidFinishRenderingFrameFully?: () => void;
|
|
220
|
+
/**
|
|
221
|
+
* This event is triggered when the map will start rendering the map.
|
|
222
|
+
*/
|
|
223
|
+
onWillStartRenderingMap?: () => void;
|
|
224
|
+
/**
|
|
225
|
+
* This event is triggered when the map finished rendering the map.
|
|
226
|
+
*/
|
|
227
|
+
onDidFinishRenderingMap?: () => void;
|
|
228
|
+
/**
|
|
229
|
+
* This event is triggered when the map fully finished rendering the map.
|
|
230
|
+
*/
|
|
231
|
+
onDidFinishRenderingMapFully?: () => void;
|
|
232
|
+
/**
|
|
233
|
+
* This event is triggered when the user location is updated.
|
|
234
|
+
*/
|
|
235
|
+
onUserLocationUpdate?: (feature: Location) => void;
|
|
236
|
+
/**
|
|
237
|
+
* This event is triggered when a style has finished loading.
|
|
238
|
+
*/
|
|
239
|
+
onDidFinishLoadingStyle?: () => void;
|
|
240
|
+
/**
|
|
241
|
+
* The emitted frequency of regionwillchange events
|
|
242
|
+
*/
|
|
243
|
+
regionWillChangeDebounceTime?: number;
|
|
244
|
+
/**
|
|
245
|
+
* The emitted frequency of regiondidchange events
|
|
246
|
+
*/
|
|
247
|
+
regionDidChangeDebounceTime?: number;
|
|
248
|
+
};
|
|
249
|
+
declare type CallbablePropKeys = 'onRegionWillChange' | 'onRegionIsChanging' | 'onRegionDidChange' | 'onUserLocationUpdate' | 'onWillStartLoadingMap' | 'onMapLoadingError' | 'onDidFinishLoadingMap' | 'onDidFailLoadingMap' | 'onWillStartRenderingFrame' | 'onDidFinishRenderingFrame' | 'onDidFinishRenderingFrameFully' | 'onWillStartRenderingMap' | 'onDidFinishRenderingMap' | 'onDidFinishRenderingMapFully' | 'onDidFinishLoadingStyle' | 'onMapIdle' | 'onCameraChanged';
|
|
250
|
+
declare type Debounced<F> = F & {
|
|
251
|
+
clear(): void;
|
|
252
|
+
flush(): void;
|
|
253
|
+
};
|
|
254
|
+
declare const MapView_base: {
|
|
255
|
+
new (...args: any[]): {
|
|
256
|
+
_nativeModuleName: string;
|
|
257
|
+
_onAndroidCallback: (e: any) => void;
|
|
258
|
+
_callbackMap: Map<string, any>;
|
|
259
|
+
_preRefMapMethodQueue: {
|
|
260
|
+
method: {
|
|
261
|
+
name: string;
|
|
262
|
+
args: NativeArg[];
|
|
263
|
+
};
|
|
264
|
+
resolver: (value: NativeArg) => void;
|
|
265
|
+
}[];
|
|
266
|
+
_addAddAndroidCallback<ReturnType_1>(id: string, resolve: (value: ReturnType_1) => void, reject: (error: Error) => void): void;
|
|
267
|
+
_removeAndroidCallback(id: string): void;
|
|
268
|
+
_onAndroidCallbackO(e: React.SyntheticEvent<Element, import("./NativeBridgeComponent").RNMBEvent<{
|
|
269
|
+
[key: string]: string;
|
|
270
|
+
}>>): void;
|
|
271
|
+
_runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
|
|
272
|
+
_runNativeCommand<RefType_1, ReturnType_2 = NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: NativeArg[]): Promise<ReturnType_2>;
|
|
273
|
+
context: unknown;
|
|
274
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: object) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
275
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
276
|
+
render(): React.ReactNode;
|
|
277
|
+
readonly props: object;
|
|
278
|
+
state: Readonly<{}>;
|
|
279
|
+
refs: {
|
|
280
|
+
[key: string]: React.ReactInstance;
|
|
281
|
+
};
|
|
282
|
+
componentDidMount?(): void;
|
|
283
|
+
shouldComponentUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
284
|
+
componentWillUnmount?(): void;
|
|
285
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
286
|
+
getSnapshotBeforeUpdate?(prevProps: object, prevState: Readonly<{}>): any;
|
|
287
|
+
componentDidUpdate?(prevProps: object, prevState: Readonly<{}>, snapshot?: any): void;
|
|
288
|
+
componentWillMount?(): void;
|
|
289
|
+
UNSAFE_componentWillMount?(): void;
|
|
290
|
+
componentWillReceiveProps?(nextProps: object, nextContext: any): void;
|
|
291
|
+
UNSAFE_componentWillReceiveProps?(nextProps: object, nextContext: any): void;
|
|
292
|
+
componentWillUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): void;
|
|
293
|
+
UNSAFE_componentWillUpdate?(nextProps: object, nextState: Readonly<{}>, nextContext: any): void;
|
|
294
|
+
};
|
|
295
|
+
} & {
|
|
296
|
+
new (props: Props | Readonly<Props>): React.PureComponent<Props, {}, any>;
|
|
297
|
+
new (props: Props, context: any): React.PureComponent<Props, {}, any>;
|
|
298
|
+
contextType?: React.Context<any> | undefined; /**
|
|
299
|
+
* Map camera will perform updates based on provided config. Deprecated use Camera#setCamera.
|
|
300
|
+
* @deprecated use Camera#setCamera
|
|
301
|
+
*/
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* MapView backed by Mapbox Native GL
|
|
305
|
+
*/
|
|
306
|
+
declare class MapView extends MapView_base {
|
|
307
|
+
static defaultProps: Props;
|
|
308
|
+
logger: Logger;
|
|
309
|
+
_onDebouncedRegionWillChange: Debounced<(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
|
|
310
|
+
isAnimatingFromUserInteraction: boolean;
|
|
311
|
+
}>) => void>;
|
|
312
|
+
_onDebouncedRegionDidChange: Debounced<(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
|
|
313
|
+
isAnimatingFromUserInteraction: boolean;
|
|
314
|
+
}>) => void>;
|
|
315
|
+
_nativeRef?: RCTMGLMapViewRefType;
|
|
316
|
+
state: {
|
|
317
|
+
isReady: boolean | null;
|
|
318
|
+
region: null;
|
|
319
|
+
width: number;
|
|
320
|
+
height: number;
|
|
321
|
+
isUserInteraction: boolean;
|
|
322
|
+
};
|
|
323
|
+
constructor(props: Props);
|
|
324
|
+
componentDidMount(): void;
|
|
325
|
+
componentWillUnmount(): void;
|
|
326
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
327
|
+
_setHandledMapChangedEvents(props: Props): void;
|
|
328
|
+
/**
|
|
329
|
+
* Converts a geographic coordinate to a point in the given view’s coordinate system.
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* const pointInView = await this._map.getPointInView([-37.817070, 144.949901]);
|
|
333
|
+
*
|
|
334
|
+
* @param {Array<number>} coordinate - A point expressed in the map view's coordinate system.
|
|
335
|
+
* @return {Array}
|
|
336
|
+
*/
|
|
337
|
+
getPointInView(coordinate: Position): Promise<Position>;
|
|
338
|
+
/**
|
|
339
|
+
* Converts a point in the given view’s coordinate system to a geographic coordinate.
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* const coordinate = await this._map.getCoordinateFromView([100, 100]);
|
|
343
|
+
*
|
|
344
|
+
* @param {Array<number>} point - A point expressed in the given view’s coordinate system.
|
|
345
|
+
* @return {Array}
|
|
346
|
+
*/
|
|
347
|
+
getCoordinateFromView(point: Position): Promise<Position>;
|
|
348
|
+
/**
|
|
349
|
+
* The coordinate bounds (ne, sw) visible in the user’s viewport.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* const visibleBounds = await this._map.getVisibleBounds();
|
|
353
|
+
*
|
|
354
|
+
* @return {Array}
|
|
355
|
+
*/
|
|
356
|
+
getVisibleBounds(): Promise<[Position, Position]>;
|
|
357
|
+
/**
|
|
358
|
+
* Returns an array of rendered map features that intersect with a given point.
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* this._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1', 'id2'])
|
|
362
|
+
*
|
|
363
|
+
* @param {Array<Number>} coordinate - A point expressed in the map view’s coordinate system.
|
|
364
|
+
* @param {Array=} filter - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.
|
|
365
|
+
* @param {Array=} layerIDs - A array of layer id's to filter the features by
|
|
366
|
+
* @return {FeatureCollection}
|
|
367
|
+
*/
|
|
368
|
+
queryRenderedFeaturesAtPoint(coordinate: Position, filter?: FilterExpression | [], layerIDs?: string[]): Promise<GeoJSON.FeatureCollection | undefined>;
|
|
369
|
+
/**
|
|
370
|
+
* Returns an array of rendered map features that intersect with the given rectangle,
|
|
371
|
+
* restricted to the given style layers and filtered by the given predicate. In v10,
|
|
372
|
+
* passing an empty array will query the entire visible bounds of the map.
|
|
373
|
+
*
|
|
374
|
+
* @example
|
|
375
|
+
* this._map.queryRenderedFeaturesInRect([30, 40, 20, 10], ['==', 'type', 'Point'], ['id1', 'id2'])
|
|
376
|
+
*
|
|
377
|
+
* @param {Array<Number>} bbox - A rectangle expressed in the map view’s coordinate system. For v10, this can be an empty array to query the visible map area.
|
|
378
|
+
* @param {Array=} filter - A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array.
|
|
379
|
+
* @param {Array=} layerIDs - A array of layer id's to filter the features by
|
|
380
|
+
* @return {FeatureCollection}
|
|
381
|
+
*/
|
|
382
|
+
queryRenderedFeaturesInRect(bbox: BBox | [], filter?: FilterExpression | [], layerIDs?: string[] | null): Promise<GeoJSON.FeatureCollection | undefined>;
|
|
383
|
+
/**
|
|
384
|
+
* Map camera will perform updates based on provided config. Deprecated use Camera#setCamera.
|
|
385
|
+
* @deprecated use Camera#setCamera
|
|
386
|
+
*/
|
|
387
|
+
setCamera(): void;
|
|
388
|
+
_runNative<ReturnType>(methodName: string, args?: NativeArg[]): Promise<ReturnType>;
|
|
389
|
+
/**
|
|
390
|
+
* Takes snapshot of map with current tiles and returns a URI to the image
|
|
391
|
+
* @param {Boolean} writeToDisk If true will create a temp file, otherwise it is in base64
|
|
392
|
+
* @return {String}
|
|
393
|
+
*/
|
|
394
|
+
takeSnap(writeToDisk?: boolean): Promise<string>;
|
|
395
|
+
/**
|
|
396
|
+
* Returns the current zoom of the map view.
|
|
397
|
+
*
|
|
398
|
+
* @example
|
|
399
|
+
* const zoom = await this._map.getZoom();
|
|
400
|
+
*
|
|
401
|
+
* @return {Number}
|
|
402
|
+
*/
|
|
403
|
+
getZoom(): Promise<number>;
|
|
404
|
+
/**
|
|
405
|
+
* Returns the map's geographical centerpoint
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* const center = await this._map.getCenter();
|
|
409
|
+
*
|
|
410
|
+
* @return {Array<Number>} Coordinates
|
|
411
|
+
*/
|
|
412
|
+
getCenter(): Promise<Position>;
|
|
413
|
+
/**
|
|
414
|
+
* Queries the currently loaded data for elevation at a geographical location.
|
|
415
|
+
* The elevation is returned in meters relative to mean sea-level.
|
|
416
|
+
* Returns null if terrain is disabled or if terrain data for the location hasn't been loaded yet.
|
|
417
|
+
*
|
|
418
|
+
* @param {Array<Number>} coordinate - the coordinates to query elevation at
|
|
419
|
+
* @return {Number}
|
|
420
|
+
*/
|
|
421
|
+
queryTerrainElevation(coordinate: Position): Promise<number>;
|
|
422
|
+
/**
|
|
423
|
+
* Sets the visibility of all the layers referencing the specified `sourceLayerId` and/or `sourceId`
|
|
424
|
+
*
|
|
425
|
+
* @example
|
|
426
|
+
* await this._map.setSourceVisibility(false, 'composite', 'building')
|
|
427
|
+
*
|
|
428
|
+
* @param {boolean} visible - Visibility of the layers
|
|
429
|
+
* @param {String} sourceId - Identifier of the target source (e.g. 'composite')
|
|
430
|
+
* @param {String=} sourceLayerId - Identifier of the target source-layer (e.g. 'building')
|
|
431
|
+
*/
|
|
432
|
+
setSourceVisibility(visible: boolean, sourceId: string, sourceLayerId?: string | null): void;
|
|
433
|
+
/**
|
|
434
|
+
* Show the attribution and telemetry action sheet.
|
|
435
|
+
* If you implement a custom attribution button, you should add this action to the button.
|
|
436
|
+
*/
|
|
437
|
+
showAttribution(): Promise<NativeArg>;
|
|
438
|
+
_onPress(e: NativeSyntheticEvent<{
|
|
439
|
+
payload: GeoJSON.Feature;
|
|
440
|
+
}>): void;
|
|
441
|
+
_onLongPress(e: NativeSyntheticEvent<{
|
|
442
|
+
payload: GeoJSON.Feature;
|
|
443
|
+
}>): void;
|
|
444
|
+
_onRegionWillChange(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
|
|
445
|
+
isAnimatingFromUserInteraction: boolean;
|
|
446
|
+
}>): void;
|
|
447
|
+
_onRegionDidChange(payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload>): void;
|
|
448
|
+
_onChange(e: NativeSyntheticEvent<{
|
|
449
|
+
type: string;
|
|
450
|
+
payload: GeoJSON.Feature<GeoJSON.Point, RegionPayload & {
|
|
451
|
+
isAnimatingFromUserInteraction: boolean;
|
|
452
|
+
}>;
|
|
453
|
+
}>): void;
|
|
454
|
+
_onLayout(e: LayoutChangeEvent): void;
|
|
455
|
+
_handleOnChange<T>(propName: CallbablePropKeys, payload: object): void;
|
|
456
|
+
_getContentInset(): number[] | undefined;
|
|
457
|
+
_setNativeRef(nativeRef: RCTMGLMapViewRefType): void;
|
|
458
|
+
setNativeProps(props: NativeProps): void;
|
|
459
|
+
_setStyleURL(props: Props): void;
|
|
460
|
+
render(): JSX.Element;
|
|
461
|
+
}
|
|
462
|
+
declare type NativeProps = Omit<Props, 'onPress' | 'onLongPress'> & {
|
|
463
|
+
onPress(event: NativeSyntheticEvent<{
|
|
464
|
+
payload: GeoJSON.Feature;
|
|
465
|
+
}>): void;
|
|
466
|
+
onLongPress(event: NativeSyntheticEvent<{
|
|
467
|
+
payload: GeoJSON.Feature;
|
|
468
|
+
}>): void;
|
|
469
|
+
};
|
|
470
|
+
declare type RCTMGLMapViewRefType = Component<NativeProps> & Readonly<NativeMethods>;
|
|
471
|
+
export default MapView;
|
|
472
|
+
//# sourceMappingURL=MapView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../javascript/components/MapView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAKL,SAAS,EACT,oBAAoB,EACpB,aAAa,EAEb,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,UAAU,CAAC;AAElB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAWzD,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD,eAAO,MAAM,kCAAkC,gCAAgC,CAAC;AAQhF,oBAAY,KAAK,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,oBAAY,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACxC,aAAK,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C,oBAAY,aAAa,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB,UAAU,EAAE;QACV,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC;QACzB,MAAM,EAAE;YACN,EAAE,EAAE,OAAO,CAAC,QAA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AAC,EAAE,oBAAoB,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,OAAO,CAAC,OAAO,CACtB,OAAO,CAAC,KAAK,EACb,aAAa,GAAG;YAAE,8BAA8B,EAAE,OAAO,CAAA;SAAE,CAC5D,CAAC;KACH,CAAC;IAiFJ,SAAS,CAAC,CAAC,EAAE,iBAAiB;IAQ9B,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM;IAO/D,gBAAgB;IAYhB,aAAa,CAAC,SAAS,EAAE,oBAAoB;IAK7C,cAAc,CAAC,KAAK,EAAE,WAAW;IAMjC,YAAY,CAAC,KAAK,EAAE,KAAK;IAkBzB,MAAM;CA0CP;AAED,aAAK,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAAC,GAAG;IAC1D,OAAO,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IACzE,WAAW,CAAC,KAAK,EAAE,oBAAoB,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;CAC9E,CAAC;AAEF,aAAK,oBAAoB,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAU7E,eAAe,OAAO,CAAC"}
|
|
@@ -22,7 +22,7 @@ declare const NativeBridgeComponent: <Props extends object, BaseComponent extend
|
|
|
22
22
|
_removeAndroidCallback(id: string): void;
|
|
23
23
|
_onAndroidCallbackO(e: React.SyntheticEvent<Element, RNMBEvent>): void;
|
|
24
24
|
_runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
|
|
25
|
-
_runNativeCommand<RefType_1, ReturnType_2 = NativeArg>(methodName: string, nativeRef: RefType_1, args?: NativeArg[]): Promise<ReturnType_2>;
|
|
25
|
+
_runNativeCommand<RefType_1, ReturnType_2 = NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: NativeArg[]): Promise<ReturnType_2>;
|
|
26
26
|
context: unknown;
|
|
27
27
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
28
28
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeBridgeComponent.d.ts","sourceRoot":"","sources":["../../../javascript/components/NativeBridgeComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,UAAU,CAAC;AAIvE,oBAAY,SAAS,CAAC,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,IAAI;IAC/D,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,qBAAqB,4DAEU,GAAG,EAAE,6EAGtB,MAAM;kBAWD,GAAG,EAAE;2BARP,MAAM;gCACD,GAAG,KAAK,IAAI;sBACtB,IAAI,MAAM,EAAE,GAAG,CAAC;;oBAEpB;gBAAE,MAAM,MAAM,CAAC;gBAAC,IAAI,EAAE,SAAS,EAAE,CAAA;aAAE;8BACzB,SAAS,KAAK,IAAI;;iDAahC,MAAM,oCACsB,IAAI,kBACpB,KAAK,KAAK,IAAI;mCAKL,MAAM;+BAIV,MAAM,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC;;2EAmCjD,MAAM
|
|
1
|
+
{"version":3,"file":"NativeBridgeComponent.d.ts","sourceRoot":"","sources":["../../../javascript/components/NativeBridgeComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,UAAU,CAAC;AAIvE,oBAAY,SAAS,CAAC,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,IAAI;IAC/D,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,qBAAqB,4DAEU,GAAG,EAAE,6EAGtB,MAAM;kBAWD,GAAG,EAAE;2BARP,MAAM;gCACD,GAAG,KAAK,IAAI;sBACtB,IAAI,MAAM,EAAE,GAAG,CAAC;;oBAEpB;gBAAE,MAAM,MAAM,CAAC;gBAAC,IAAI,EAAE,SAAS,EAAE,CAAA;aAAE;8BACzB,SAAS,KAAK,IAAI;;iDAahC,MAAM,oCACsB,IAAI,kBACpB,KAAK,KAAK,IAAI;mCAKL,MAAM;+BAIV,MAAM,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC;;2EAmCjD,MAAM,2CAEZ,SAAS,EAAE;;;;;;;;;;;;;;;;;;;;;;;iBA2BpB,CAAC;AAEJ,eAAe,qBAAqB,CAAC"}
|
|
@@ -93,7 +93,7 @@ declare const PointAnnotation_base: {
|
|
|
93
93
|
[key: string]: string;
|
|
94
94
|
}>>): void;
|
|
95
95
|
_runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
|
|
96
|
-
_runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
|
|
96
|
+
_runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
|
|
97
97
|
context: unknown;
|
|
98
98
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: object) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
99
99
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import AbstractSource from './AbstractSource';
|
|
3
|
+
export declare const NATIVE_MODULE_NAME = "RCTMGLRasterDemSource";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* A string that uniquely identifies the source.
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* A URL to a TileJSON configuration file describing the source’s contents and other metadata.
|
|
11
|
+
*/
|
|
12
|
+
url?: string;
|
|
13
|
+
/**
|
|
14
|
+
* An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.
|
|
15
|
+
* Example: https://example.com/raster-tiles/{z}/{x}/{y}.png
|
|
16
|
+
*/
|
|
17
|
+
tileUrlTemplates?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.
|
|
20
|
+
* The value should be between 0 and 22, inclusive, and less than
|
|
21
|
+
* maxZoomLevel, if specified. The default value for this option is 0.
|
|
22
|
+
*/
|
|
23
|
+
minZoomLevel?: number;
|
|
24
|
+
/**
|
|
25
|
+
* An unsigned integer that specifies the maximum zoom level at which to display tiles from the source.
|
|
26
|
+
* The value should be between 0 and 22, inclusive, and less than
|
|
27
|
+
* minZoomLevel, if specified. The default value for this option is 22.
|
|
28
|
+
*/
|
|
29
|
+
maxZoomLevel?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Size of the map tiles.
|
|
32
|
+
* Mapbox urls default to 256, all others default to 512.
|
|
33
|
+
*/
|
|
34
|
+
tileSize?: number;
|
|
35
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
36
|
+
};
|
|
37
|
+
declare type NativeProps = Props;
|
|
38
|
+
declare class RasterDemSource extends AbstractSource<Props, NativeProps> {
|
|
39
|
+
static defaultProps: {
|
|
40
|
+
id: any;
|
|
41
|
+
};
|
|
42
|
+
constructor(props: Props);
|
|
43
|
+
render(): JSX.Element;
|
|
44
|
+
}
|
|
45
|
+
export default RasterDemSource;
|
|
46
|
+
//# sourceMappingURL=RasterDemSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RasterDemSource.d.ts","sourceRoot":"","sources":["../../../javascript/components/RasterDemSource.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAQ9C,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D,aAAK,KAAK,GAAG;IACX;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;CACtD,CAAC;AAEF,aAAK,WAAW,GAAG,KAAK,CAAC;AAEzB,cAAM,eAAgB,SAAQ,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC;IAC9D,MAAM,CAAC,YAAY;;MAEjB;gBAEU,KAAK,EAAE,KAAK;IASxB,MAAM;CA4BP;AAKD,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../types/BaseProps';
|
|
3
|
+
import AbstractSource from './AbstractSource';
|
|
4
|
+
export declare const NATIVE_MODULE_NAME = "RCTMGLRasterSource";
|
|
5
|
+
declare type Props = BaseProps & {
|
|
6
|
+
/**
|
|
7
|
+
* A string that uniquely identifies the source.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* A URL to a TileJSON configuration file describing the source’s contents and other metadata.
|
|
12
|
+
*/
|
|
13
|
+
url?: string;
|
|
14
|
+
/**
|
|
15
|
+
* An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.
|
|
16
|
+
* Example: https://example.com/raster-tiles/{z}/{x}/{y}.png
|
|
17
|
+
*/
|
|
18
|
+
tileUrlTemplates?: string[];
|
|
19
|
+
/**
|
|
20
|
+
* An unsigned integer that specifies the minimum zoom level at which to display tiles from the source.
|
|
21
|
+
* The value should be between 0 and 22, inclusive, and less than
|
|
22
|
+
* maxZoomLevel, if specified. The default value for this option is 0.
|
|
23
|
+
*/
|
|
24
|
+
minZoomLevel?: number;
|
|
25
|
+
/**
|
|
26
|
+
* An unsigned integer that specifies the maximum zoom level at which to display tiles from the source.
|
|
27
|
+
* The value should be between 0 and 22, inclusive, and less than
|
|
28
|
+
* minZoomLevel, if specified. The default value for this option is 22.
|
|
29
|
+
*/
|
|
30
|
+
maxZoomLevel?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Size of the map tiles.
|
|
33
|
+
* Mapbox urls default to 256, all others default to 512.
|
|
34
|
+
*/
|
|
35
|
+
tileSize?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Influences the y direction of the tile coordinates. (tms inverts y axis)
|
|
38
|
+
*/
|
|
39
|
+
tms?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* An HTML or literal text string defining the buttons to be displayed in an action sheet when the
|
|
42
|
+
* source is part of a map view’s style and the map view’s attribution button is pressed.
|
|
43
|
+
*/
|
|
44
|
+
attribution?: string;
|
|
45
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
46
|
+
};
|
|
47
|
+
declare type NativeProps = Props;
|
|
48
|
+
/**
|
|
49
|
+
* RasterSource is a map content source that supplies raster image tiles to be shown on the map.
|
|
50
|
+
* The location of and metadata about the tiles are defined either by an option dictionary
|
|
51
|
+
* or by an external file that conforms to the TileJSON specification.
|
|
52
|
+
*/
|
|
53
|
+
declare class RasterSource extends AbstractSource<Props, NativeProps> {
|
|
54
|
+
static defaultProps: Props;
|
|
55
|
+
constructor(props: Props);
|
|
56
|
+
render(): JSX.Element;
|
|
57
|
+
}
|
|
58
|
+
export default RasterSource;
|
|
59
|
+
//# sourceMappingURL=RasterSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RasterSource.d.ts","sourceRoot":"","sources":["../../../javascript/components/RasterSource.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAI9C,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAMvD,aAAK,KAAK,GAAG,SAAS,GAAG;IACvB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;CACtD,CAAC;AAEF,aAAK,WAAW,GAAG,KAAK,CAAC;AAEzB;;;;GAIG;AACH,cAAM,YAAa,SAAQ,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC;IAC3D,MAAM,CAAC,YAAY,EAAE,KAAK,CAExB;gBAEU,KAAK,EAAE,KAAK;IASxB,MAAM;CA8BP;AAKD,eAAe,YAAY,CAAC"}
|
|
@@ -115,7 +115,7 @@ declare const ShapeSource_base: {
|
|
|
115
115
|
[key: string]: string;
|
|
116
116
|
}>>): void;
|
|
117
117
|
_runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
|
|
118
|
-
_runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
|
|
118
|
+
_runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
|
|
119
119
|
context: unknown;
|
|
120
120
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: object) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
121
121
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -84,7 +84,7 @@ declare const VectorSource_base: {
|
|
|
84
84
|
[key: string]: string;
|
|
85
85
|
}>>): void;
|
|
86
86
|
_runPendingNativeCommands<RefType>(nativeRef: RefType): Promise<void>;
|
|
87
|
-
_runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
|
|
87
|
+
_runNativeCommand<RefType_1, ReturnType_2 = import("../utils").NativeArg>(methodName: string, nativeRef: RefType_1 | undefined, args?: import("../utils").NativeArg[]): Promise<ReturnType_2>;
|
|
88
88
|
context: unknown;
|
|
89
89
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: object) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
90
90
|
forceUpdate(callback?: (() => void) | undefined): void;
|