kakao.maps.event.addListener(polygon, ‘click’, function (mouseEvent) {
var data = {area: name}
var area_json = {data : data}
axios.defaults.withCredentials = true;
const api = axios.create({
baseURL: "http://localhost:5000",
withCredentials: true
})
api.post('/info',{area : name},{withCredentials: true})
.then(function(response){
areaResult=response.data['result_list'];
const content =
'<div>' +
<Barchart></Barchart>+
'</div>';
infowindow.setContent(content);
infowindow.setPosition(mouseEvent.latLng);
infowindow.setMap(map);
})
.catch(function(error){
console.log(error);
});
});
infowwindow에 object가
뜨는데 다른곳에서 만든 barchart를 infowwindow에 띄울 방법이 없을까요?