Skip to content

Commit

Permalink
Update click.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Hokite authored Nov 6, 2023
1 parent 5ce6aba commit ed65ef0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion click.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script type="text/javascript" src="//dapi.kakao.com/v2/maps/sdk.js?appkey=0093745d6e4797bd4c103fb856dd5b68"></script>
</head>
<body>
<div id="map" style="width: 500px; height: 400px;"></div>
<div id="map" style="width: 1000px; height: 1000px;"></div>

<script>
var mapContainer = document.getElementById('map');
Expand All @@ -31,6 +31,15 @@
markers.push(marker);

alert('클릭한 위치 - 위도: ' + lat + ', 경도: ' + lng);

// 서버로 좌표 데이터 전송
fetch('/save-coordinates', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ lat, lng })
});
});
</script>
</body>
Expand Down

0 comments on commit ed65ef0

Please sign in to comment.