[FAQ] 지도/로컬 API 문의 전 꼭 읽어 주세요.
cordova, ionic, angluar를 이용해서 kakao map api를 활용중입니다.
웹이나, 안드로이드에선 잘 되는데, ios에서 이상하게 kakao.maps.Size()를 찾아내질 못해요. (아마 index,html에 있는 외부 스크립트를 못읽어오는듯)
declare const kakao: any;
export class myComponent implements OnInit {
private imageSrc = '이미지url';
private selectedImageSrc = '이미지url';
private wishedImageSrc = '이미지url';
private markerImage = new kakao.maps.MarkerImage(this.imageSrc, new kakao.maps.Size(32, 33));
private markerSelectedImage = new kakao.maps.MarkerImage(this.selectedImageSrc, new kakao.maps.Size(48, 49));
private markerWishedImage = new kakao.maps.MarkerImage(this.wishedImageSrc, new kakao.maps.Size(32, 33));
}
index.html
<script type="text/javascript" src="https://dapi.kakao.com/v2/maps/sdk.js?appkey='app key'"></script>
ios 오류
[error] - ERROR Error: Uncaught (in promise): TypeError: undefined is not a constructor (evaluating ‘new kakao.maps.Size(32,33)’)
n@capacitor://localhost/2536.0af0ec0ab1c0b132.js:1:31422
@capacitor://localhost/2536.0af0ec0ab1c0b132.js:1:3775
wc@capacitor://localhost/main.c8b57f375c383453.js:129:353577
_c@capacitor://localhost/main.c8b57f375c383453.js:129:399658
create@capacitor://localhost/main.c8b57f375c383453.js:129:399831
createComponent@capacitor://localhost/main.c8b57f375c383453.js:129:426215
activateWith@capacitor://localhost/main.c8b57f375c383453.js:129:1096458
activateRoutes@capacitor://localhost/main.c8b57f375c383453.js:129:1006510
@capacitor://localhost/main.c8b57f375c383453.js:129:1005595
forEach@[native code]
activateChildRoutes@capacitor://localhost/main.c8b57f375c383453.js:129:1005570
activateRoutes@capacitor://localhost/main.c8b57f375c383453.js:129:1006603
@capacitor://localhost/main.c8b57f375c383453.js:129:1005595
forEach@[native code]
activateChildRoutes@capacitor://localhost/main.c8b57f375c383453.js:129:1005570
activateRoutes@capacitor://localhost/main.c8b57f375c383453.js:129:1005899
@capacitor://localhost/main.c8b57f375c383453.js:129:1005595
forEach@[native code]
activateChildRoutes@capacitor://localhost/main.c8b57f375c383453.js:129:1005570
activate@capacitor://localhost/main.c8b57f375c383453.js:129:1004126
@capacitor://localhost/main.c8b57f375c383453.js:129:1029596
@capacitor://localhost/main.c8b57f375c383453.js:129:140771
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:145933
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:140764
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:140764
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:135133
_trySubscribe@capacitor://localhost/main.c8b57f375c383453.js:129:121922
@capacitor://localhost/main.c8b57f375c383453.js:129:121869
E@capacitor://localhost/main.c8b57f375c383453.js:129:152031
subscribe@capacitor://localhost/main.c8b57f375c383453.js:129:121769
@capacitor://localhost/main.c8b57f375c383453.js:129:140742
@capacitor://localhost/main.c8b57f375c383453.js:129:153963
@capacitor://localhost/main.c8b57f375c383453.js:129:121822
E@capacitor://localhost/main.c8b57f375c383453.js:129:152031
subscribe@capacitor://localhost/main.c8b57f375c383453.js:129:121769
@capacitor://localhost/main.c8b57f375c383453.js:129:144841
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:140764
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:145117
@capacitor://localhost/main.c8b57f375c383453.js:129:137230
next@capacitor://localhost/main.c8b57f375c383453.js:129:126248
@capacitor://localhost/main.c8b57f375c383453.js:129:139233
@capacitor://localhost/main.c8b57f375c383453.js:129:137402
complete@capacitor://localhost/main.c8b57f375c383453.js:129:126436
@capacitor://localhost/main.c8b57f375c383453.js:129:135152
_trySubscribe@capacitor://localhost/main.c8b57f375c383453.js:129:121922
@capacitor://localhost/main.c8b57f375c383453.js:129:121869
E@capacitor://localhost/main.c8b57f375c383453.js:129:152031
subscribe@capacitor://localhost/main.c8b57f375c383453.js:129:121769
@capacitor://localho
ios만 안되는걸로 보아, 카카오 api 문제는 아닌거같은데, 그래도 혹시 비슷한 경우를 알고 해결한 방법이 있으시거나 하시면 답변 부탁드리겠습니다…