-
Notifications
You must be signed in to change notification settings - Fork 151
/
index.d.ts
235 lines (235 loc) · 6.05 KB
/
index.d.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
import React, { Component } from 'react';
import { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
declare const RNNaverMapView: any;
export interface Coord {
latitude: number;
longitude: number;
}
export interface Region extends Coord {
latitudeDelta: number;
longitudeDelta: number;
}
export declare enum TrackingMode {
None = 0,
NoFollow = 1,
Follow = 2,
Face = 3
}
export declare enum MapType {
Basic = 0,
Navi = 1,
Satellite = 2,
Hybrid = 3,
Terrain = 4
}
export declare enum LayerGroup {
LAYER_GROUP_BUILDING = "building",
LAYER_GROUP_TRANSIT = "transit",
LAYER_GROUP_BICYCLE = "bike",
LAYER_GROUP_TRAFFIC = "ctt",
LAYER_GROUP_CADASTRAL = "landparcel",
LAYER_GROUP_MOUNTAIN = "mountain"
}
export declare enum Gravity {
NO_GRAVITY = 0,
AXIS_SPECIFIED = 1,
AXIS_PULL_BEFORE = 2,
AXIS_PULL_AFTER = 4,
AXIS_X_SHIFT = 0,
AXIS_Y_SHIFT = 4,
TOP = 48,
BOTTOM = 80,
LEFT = 3,
RIGHT = 5,
CENTER_VERTICAL = 16,
CENTER_HORIZONTAL = 1
}
export declare enum Align {
Center = 0,
Left = 1,
Right = 2,
Top = 3,
Bottom = 4,
TopLeft = 5,
TopRight = 6,
BottomRight = 7,
BottomLeft = 8
}
export interface Rect {
left?: number;
top?: number;
right?: number;
bottom?: number;
}
export interface NaverMapViewProps {
style?: StyleProp<ViewStyle>;
center?: Coord & {
zoom?: number;
tilt?: number;
bearing?: number;
};
tilt?: number;
bearing?: number;
mapPadding?: Rect;
logoMargin?: Rect;
logoGravity?: Gravity;
onInitialized?: Function;
onCameraChange?: (event: {
latitude: number;
longitude: number;
zoom: number;
contentsRegion: [Coord, Coord, Coord, Coord, Coord];
coveringRegion: [Coord, Coord, Coord, Coord, Coord];
}) => void;
onMapClick?: (event: {
x: number;
y: number;
latitude: number;
longitude: number;
}) => void;
onTouch?: () => void;
showsMyLocationButton?: boolean;
compass?: boolean;
scaleBar?: boolean;
zoomControl?: boolean;
mapType?: MapType;
buildingHeight?: number;
minZoomLevel?: number;
maxZoomLevel?: number;
nightMode?: boolean;
scrollGesturesEnabled?: boolean;
zoomGesturesEnabled?: boolean;
tiltGesturesEnabled?: boolean;
rotateGesturesEnabled?: boolean;
stopGesturesEnabled?: boolean;
liteModeEnabled?: boolean;
useTextureView?: boolean;
}
export default class NaverMapView extends Component<NaverMapViewProps, {}> {
ref?: RNNaverMapView;
nodeHandle?: null | number;
private resolveRef;
animateToCoordinate: (coord: Coord) => void;
animateToTwoCoordinates: (c1: Coord, c2: Coord) => void;
animateToCoordinates: (coords: Coord[], bounds?: {
top: number;
bottom: number;
left: number;
right: number;
}) => void;
animateToRegion: (region: Region) => void;
setLocationTrackingMode: (mode: number) => void;
setLayerGroupEnabled: (group: LayerGroup, enabled: boolean) => void;
showsMyLocationButton: (show: boolean) => void;
private dispatchViewManagerCommand;
handleOnCameraChange: (event: React.SyntheticEvent<{}, {
latitude: number;
longitude: number;
zoom: number;
contentsRegion: [Coord, Coord, Coord, Coord, Coord];
coveringRegion: [Coord, Coord, Coord, Coord, Coord];
}>) => void;
handleOnMapClick: (event: React.SyntheticEvent<{}, {
x: number;
y: number;
latitude: number;
longitude: number;
}>) => void;
render(): JSX.Element;
}
interface RNNaverMapView extends React.Component<{}, any> {
}
export interface MapOverlay {
coordinate: Coord;
onClick?: () => void;
}
export interface MarkerProps extends MapOverlay {
anchor?: {
x: number;
y: number;
};
pinColor?: string;
rotation?: number;
flat?: boolean;
image?: ImageSourcePropType;
width?: number;
height?: number;
alpha?: number;
angle?: number;
hidden?: boolean;
zIndex?: number;
iconPerspectiveEnabled?: boolean;
isHideCollidedSymbols?: boolean;
isHideCollidedMarkers?: boolean;
isHideCollidedCaptions?: boolean;
isForceShowIcon?: boolean;
animated?: boolean;
caption?: {
text?: string;
align?: Align;
textSize?: number;
color?: string;
haloColor?: string;
offset?: number;
requestedWidth?: number;
minZoom?: number;
maxZoom?: number;
};
subCaption?: {
text?: string;
textSize?: number;
color?: string;
haloColor?: string;
requestedWidth?: number;
minZoom?: number;
maxZoom?: number;
};
}
export declare class Marker extends Component<MarkerProps> {
render(): JSX.Element;
}
export interface CircleProps extends MapOverlay {
radius?: number;
color?: string;
outlineWidth?: number;
outlineColor?: string;
zIndex?: number;
}
export declare class Circle extends Component<CircleProps> {
render(): JSX.Element;
}
interface PolylineProps extends Omit<MapOverlay, "coordinate"> {
coordinates: Coord[];
strokeWidth?: number;
strokeColor?: string;
}
export declare class Polyline extends Component<PolylineProps> {
render(): JSX.Element;
}
interface PolygonProps extends Omit<MapOverlay, "coordinate"> {
coordinates: Coord[];
outlineWidth?: number;
outlineColor?: string;
color?: string;
holes?: Coord[][];
}
export declare class Polygon extends Component<PolygonProps> {
render(): JSX.Element;
}
export interface PathProps extends Omit<MapOverlay, "coordinate"> {
coordinates: Coord[];
width?: number;
color?: string;
outlineWidth?: number;
passedColor?: string;
outlineColor?: string;
passedOutlineColor?: string;
pattern?: ImageSourcePropType;
patternInterval?: number;
progress?: number;
zIndex?: number;
}
export declare class Path extends Component<PathProps> {
render(): JSX.Element;
}
export {};