-
-
Notifications
You must be signed in to change notification settings - Fork 848
/
NativeMapViewModule.ts
54 lines (52 loc) · 1.84 KB
/
NativeMapViewModule.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* eslint-disable @typescript-eslint/ban-types */
import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
import { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
import { TurboModuleRegistry } from 'react-native';
export interface Spec extends TurboModule {
takeSnap: (viewRef: Int32 | null, writeToDisk: boolean) => Promise<Object>;
queryTerrainElevation: (
viewRef: Int32 | null,
coordinates: ReadonlyArray<number>,
) => Promise<Object>;
setSourceVisibility: (
viewRef: Int32 | null,
visible: boolean,
sourceId: string,
sourceLayerId: string,
) => Promise<Object>;
getCenter: (viewRef: Int32 | null) => Promise<Object>;
getCoordinateFromView: (
viewRef: Int32 | null,
atPoint: ReadonlyArray<number>,
) => Promise<Object>;
getPointInView: (
viewRef: Int32 | null,
atCoordinate: ReadonlyArray<number>,
) => Promise<Object>;
getZoom: (viewRef: Int32 | null) => Promise<Object>;
getVisibleBounds: (viewRef: Int32 | null) => Promise<Object>;
queryRenderedFeaturesAtPoint: (
viewRef: Int32 | null,
atPoint: ReadonlyArray<number>,
withFilter: ReadonlyArray<Object>,
withLayerIDs: ReadonlyArray<string>,
) => Promise<Object>;
queryRenderedFeaturesInRect: (
viewRef: Int32 | null,
withBBox: ReadonlyArray<number>,
withFilter: ReadonlyArray<Object>,
withLayerIDs: ReadonlyArray<string>,
) => Promise<Object>;
setHandledMapChangedEvents: (
viewRef: Int32 | null,
events: ReadonlyArray<string>,
) => Promise<Object>;
clearData: (viewRef: Int32 | null) => Promise<Object>;
querySourceFeatures: (
viewRef: Int32 | null,
sourceId: string,
withFilter: ReadonlyArray<Object>,
withSourceLayerIDs: ReadonlyArray<string>,
) => Promise<Object>;
}
export default TurboModuleRegistry.getEnforcing<Spec>('RNMBXMapViewModule');