에러 내용은 아래와 같습니다
어떤 문제인가요…?ㅜㅜ
Uncaught TypeError: a.xf is not a function
at q.X.A (kakao.js:118)
at new q (kakao.js:24)
at Object.success (loginProcess:201)
at c (VM4007 jquery.min.js:2)
at Object.fireWith [as resolveWith] (VM4007 jquery.min.js:2)
at l (VM4007 jquery.min.js:2)
at XMLHttpRequest. (VM4007 jquery.min.js:2)
var geocoder = new kakao.maps.services.Geocoder();
var container = document.getElementById(‘map’);
var options = {
center: new kakao.maps.LatLng(, ),
level: 3
};
var map = new kakao.maps.Map(container, options); // 지도 생성
var imageSrc = “https://t1.daumcdn.net/localimg/localimages/07/mapapidoc/markerStar.png”;
var area = "";
var id = "";
var x = "";
var y = "";
var positions = new Array();
$.ajax({
url : "",
type : "post",
dataType : "json",
success(map) {
for(var j = 0; j < map.length; j++) {
area = map[j].AREA;
id = map[j].DEVICE_ID;
var callback = function(result, status) {
if (status === kakao.maps.services.Status.OK) {
//console.log(result);
x = result.map(e => e.x);
y = result.map(e => e.y);
}
};
positions[j] = {"title":id, latlng:new kakao.maps.LatLng(y, x)};
geocoder.addressSearch(area, callback);
}
for (var i = 0; i < positions.length; i ++) {
// 마커 이미지의 이미지 크기 입니다
var imageSize = new kakao.maps.Size(24, 35);
// 마커 이미지를 생성합니다
var markerImage = new kakao.maps.MarkerImage(imageSrc, imageSize);
// 마커를 생성합니다
var marker = new kakao.maps.Marker({
map: map, // 마커를 표시할 지도
position: positions[i].latlng, // 마커를 표시할 위치
title : positions[i].title, // 마커의 타이틀, 마커에 마우스를 올리면 타이틀이 표시됩니다
image : markerImage // 마커 이미지
});
}
},
error(error) {
console.log(error);
}
});