본문으로 건너뛰기

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

NameType
«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

NameType
appkeystring
idstring
librariesLibraries
nonceundefined | string
retriesnumber
urlstring

Defined in

packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:123


status

get status(): LoaderStatus

Returns

LoaderStatus

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

NameType
fn(e?: LoaderErorr) => void

Returns

void

Defined in

packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:175


loadErrorCallback

Private loadErrorCallback(event): void

Parameters

NameType
eventLoaderErorr

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

NameType
callback(err?: LoaderErorr) => void

Returns

fn

▸ (err?): void

Parameters
NameType
err?LoaderErorr
Returns

void

Defined in

packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:134


equalOptions

Static Private equalOptions(a, b): boolean

Parameters

NameType
aObject
a.appkeystring
a.idstring
a.librariesLibraries
a.nonceundefined | string
a.retriesnumber
a.urlstring
bObject
b.appkeystring
b.idstring
b.librariesLibraries
b.nonceundefined | string
b.retriesnumber
b.urlstring

Returns

boolean

Defined in

packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:303


removeLoadEventLisnter

Static removeLoadEventLisnter(callback): boolean

Parameters

NameType
callback(err?: LoaderErorr) => void

Returns

boolean

Defined in

packages/react-kakao-maps-sdk/src/util/kakaoMapApiLoader.ts:142