diff --git a/map/last/last-map.js b/map/last/last-map.js index 167e945..e874004 100644 --- a/map/last/last-map.js +++ b/map/last/last-map.js @@ -1,5 +1,5 @@ -function iconClick() { - var clickCount = 0; +//function iconClick() { +//var clickCount = 0; var mymap = L.map("mymap").setView([38.891, 139.824], 14); L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: @@ -51,15 +51,15 @@ -var marker = L.marker([38.919584, 139.827638]).addTo(mymap).bindPopup('地図上のどこかをクリックしてください').openPopup(); - function moveIcon(e) { - marker.setLatLng(e.latlng).bindPopup( - ++clickCount + "回目のクリックです.\n" + e.latlng - ).openPopup(); - } - mymap.on('click', moveIcon); -} -document.addEventListener("DOMContentLoaded", iconClick); +//var marker = L.marker([38.919584, 139.827638]).addTo(mymap).bindPopup('地図上のどこかをクリックしてください').openPopup(); +// function moveIcon(e) { +// marker.setLatLng(e.latlng).bindPopup( +// ++clickCount + "回目のクリックです.\n" + e.latlng +// ).openPopup(); +// } +// mymap.on('click', moveIcon); +//} +//document.addEventListener("DOMContentLoaded", iconClick); function startCountdown() { var time = 10; @@ -68,12 +68,12 @@ var timer = setInterval(function() { countdown.innerHTML = time; time--; - + if (time < 0) { clearInterval(timer); alert("Time's up!"); } - if (point = 5) { + if (point == 5) { clearInterval(timer); alert("clear!酒田の平和は守られた。"); }