-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkakao.d.ts
100 lines (84 loc) · 1.97 KB
/
kakao.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
declare namespace kakao {
namespace maps {
function isInitialized(): boolean;
function init(appKey: string): void;
class LatLng {
constructor(lat: number, lng: number);
}
class Map {
constructor(container: HTMLElement, options: MapOptions);
setLevel(level:number):void;
getCenter(): LatLng;
setCenter(latlng: LatLng): void;
relayout(): void;
}
interface MapOptions {
center: LatLng;
level: number;
}
class Marker {
title: string;
constructor(options: MarkerOptions);
}
interface MarkerOptions {
map: Map;
position: LatLng;
image?: MarkerImage;
zIndex?:number;
}
class MarkerImage {
constructor(src: string, size: Size, options?: MarkerImageOptions);
}
interface MarkerImageOptions {
offset: Point;
}
class Size {
constructor(width: number, height: number);
}
class Point {
constructor(x: number, y: number);
}
namespace services {
class Geocoder {
addressSearch(
address: string,
callback: (result: GeocoderResult[], status: Status) => void
): void;
}
interface GeocoderResult {
address_name: string;
x: string;
y: string;
}
enum Status {
OK = 'OK',
}
}
// MarkerClusterer 추가
class MarkerClusterer {
constructor(options: MarkerClustererOptions);
addMarker(marker: Marker): void;
addMarkers(markers: Marker[]): void;
removeMarker(marker: Marker): void;
removeMarkers(markers: Marker[]): void;
clear(): void;
}
interface MarkerClustererOptions {
map: Map;
averageCenter?: boolean;
minLevel?: number;
disableClickZoom?: boolean;
gridSize?: number;
styles?: object[];
zIndex?:number;
}
}
}
declare global {
interface Window {
kakao: typeof kakao;
}
}
declare interface Window {
Kakao: any;
}