Skip to main content

Class: Loader

Kakao Map Api Loader

new Loader(options).load() 함수를 이용하여 Api를 비동기적으로 삽입할 수 있습니다.

해당 Loader를 이용시 react-kakao-maps-sdk 내부에서 injection 되는 이벤트를 감지하여 kakao map api 로딩 이후에 렌더링을 진행합니다.

Constructors

constructor

new Loader(__namedParameters)

Parameters

NameType
__namedParametersLoaderOptions

Defined in

src/util/kakaoMapApiLoader.ts:76

Properties

appkey

Readonly appkey: string

Defined in

src/util/kakaoMapApiLoader.ts:64


callbacks

Private callbacks: (e?: ErrorEvent) => void[] = []

Defined in

src/util/kakaoMapApiLoader.ts:70


done

Private done: boolean = false

Defined in

src/util/kakaoMapApiLoader.ts:71


errors

Private errors: ErrorEvent[] = []

Defined in

src/util/kakaoMapApiLoader.ts:73


id

Readonly id: string

Defined in

src/util/kakaoMapApiLoader.ts:63


libraries

Readonly libraries: Libraries

Defined in

src/util/kakaoMapApiLoader.ts:66


loading

Private loading: boolean = false

Defined in

src/util/kakaoMapApiLoader.ts:72


nonce

Readonly nonce: undefined | string

Defined in

src/util/kakaoMapApiLoader.ts:67


onerrorEvent

Private onerrorEvent: undefined | ErrorEvent

Defined in

src/util/kakaoMapApiLoader.ts:74


retries

Readonly retries: number

Defined in

src/util/kakaoMapApiLoader.ts:68


url

Readonly url: string

Defined in

src/util/kakaoMapApiLoader.ts:65


instance

Static Private instance: Loader

Defined in

src/util/kakaoMapApiLoader.ts:60


loadcheckcallbacks

Static Private loadcheckcallbacks: (e?: ErrorEvent) => void[] = []

Defined in

src/util/kakaoMapApiLoader.ts:61

Accessors

failed

Private get failed(): boolean

Returns

boolean

Defined in

src/util/kakaoMapApiLoader.ts:176


options

get options(): Object

Returns

Object

NameType
appkeystring
idstring
librariesLibraries
nonceundefined | string
retriesnumber
urlstring

Defined in

src/util/kakaoMapApiLoader.ts:105


status

get status(): LoaderStatus

Returns

LoaderStatus

Defined in

src/util/kakaoMapApiLoader.ts:163

Methods

callback

Private callback(): void

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:296


createUrl

createUrl(): string

Returns

string

Defined in

src/util/kakaoMapApiLoader.ts:276


deleteScript

Private deleteScript(): void

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:289


execute

Private execute(): void

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:199


load

load(): Promise<typeof kakao>

Returns

Promise<typeof kakao>

Defined in

src/util/kakaoMapApiLoader.ts:151


loadCallback

Private loadCallback(fn): void

Parameters

NameType
fn(e?: ErrorEvent) => void

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:180


loadErrorCallback

Private loadErrorCallback(event, source?, lineno?, colno?, error?): void

Parameters

NameType
eventstring | Event
source?string
lineno?number
colno?number
error?Error

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:244


reset

Private reset(): void

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:191


resetIfRetryingFailed

Private resetIfRetryingFailed(): void

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:185


setScript

Private setScript(): void

Returns

void

Defined in

src/util/kakaoMapApiLoader.ts:221


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

src/util/kakaoMapApiLoader.ts:313


isLoaded

Static isLoaded(): Promise<boolean>

Returns

Promise<boolean>

Defined in

src/util/kakaoMapApiLoader.ts:116