Class: Loader
Kakao Map Api Loader
new Loader(options).load()
함수를 이용하여 Api를 비동기적으로 삽입할 수 있습니다.
해당 Loader를 이용시 react-kakao-maps-sdk
내부에서 injection 되는 이벤트를 감지하여 kakao map api 로딩 이후에 렌더링을 진행합니다.
Constructors
constructor
• new Loader(«destructured»
)
Parameters
Name | Type |
---|---|
«destructured» | LoaderOptions |
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:80
Properties
appkey
• Readonly
appkey: string
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:68
callbacks
• Private
callbacks: (e?
: LoaderErorr
) => void
[] = []
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:74
done
• Private
done: boolean
= false
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:75
errors
• Private
errors: LoaderErorr
[] = []
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:77
id
• Readonly
id: string
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:67
libraries
• Readonly
libraries: Libraries
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:70
loading
• Private
loading: boolean
= false
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:76
nonce
• Readonly
nonce: undefined
| string
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:71
onEvent
• Private
onEvent: undefined
| LoaderErorr
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:78
retries
• Readonly
retries: number
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:72
url
• Readonly
url: string
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:69
instance
▪ Static
Private
instance: Loader
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:64
loadEventCallback
▪ Static
Private
loadEventCallback: Set
\<(e?
: LoaderErorr
) => void
>
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:65
Accessors
failed
• Private
get
failed(): boolean
Returns
boolean
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:171
options
• get
options(): Object
Returns
Object
Name | Type |
---|---|
appkey | string |
id | string |
libraries | Libraries |
nonce | undefined | string |
retries | number |
url | string |
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:123
status
• get
status(): LoaderStatus
Returns
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:158
Methods
callback
▸ Private
callback(): void
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:287
createUrl
▸ createUrl(): string
Returns
string
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:267
deleteScript
▸ Private
deleteScript(): void
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:280
execute
▸ Private
execute(): void
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:194
load
▸ load(): Promise
\<typeof kakao
>
Returns
Promise
\<typeof kakao
>
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:146
loadCallback
▸ Private
loadCallback(fn
): void
Parameters
Name | Type |
---|---|
fn | (e? : LoaderErorr ) => void |
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:175
loadErrorCallback
▸ Private
loadErrorCallback(event
): void
Parameters
Name | Type |
---|---|
event | LoaderErorr |
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:239
reset
▸ Private
reset(): void
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:186
resetIfRetryingFailed
▸ Private
resetIfRetryingFailed(): void
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:180
setScript
▸ Private
setScript(): void
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:216
addLoadEventLisnter
▸ Static
addLoadEventLisnter(callback
): (err?
: LoaderErorr
) => void
Parameters
Name | Type |
---|---|
callback | (err? : LoaderErorr ) => void |
Returns
fn
▸ (err?
): void
Parameters
Name | Type |
---|---|
err? | LoaderErorr |
Returns
void
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:134
equalOptions
▸ Static
Private
equalOptions(a
, b
): boolean
Parameters
Name | Type |
---|---|
a | Object |
a.appkey | string |
a.id | string |
a.libraries | Libraries |
a.nonce | undefined | string |
a.retries | number |
a.url | string |
b | Object |
b.appkey | string |
b.id | string |
b.libraries | Libraries |
b.nonce | undefined | string |
b.retries | number |
b.url | string |
Returns
boolean
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:303
removeLoadEventLisnter
▸ Static
removeLoadEventLisnter(callback
): boolean
Parameters
Name | Type |
---|---|
callback | (err? : LoaderErorr ) => void |
Returns
boolean
Defined in
packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:142