diff --git a/map/domon/gps-game.js b/map/domon/gps-game.js index 55c52cd..c94f2d7 100644 --- a/map/domon/gps-game.js +++ b/map/domon/gps-game.js @@ -8,8 +8,8 @@ var pin2LatLng = L.latLng([38.934472, 139.843791]); var pins = [ - { name: "Location A", coordinates: pin1LatLng }, - { name: "Location B", coordinates: pin2LatLng } + { name: "町田商店", coordinates: pin1LatLng }, + { name: "ラーメン大", coordinates: pin2LatLng } ]; var pinIndex = null; @@ -33,8 +33,8 @@ pinIndex = null; // 2つのピンを表示 - L.marker(pin1LatLng).addTo(mymap); - L.marker(pin2LatLng).addTo(mymap); + L.marker(pin1LatLng).addTo(mymap).bindPopup("町田商店"); + L.marker(pin2LatLng).addTo(mymap).bindPopup("ラーメン大"); // 現在の位置をピンとして設定 navigator.geolocation.getCurrentPosition((pos) => { @@ -46,7 +46,7 @@ pinIndex = Math.random() < 0.5 ? 0 : 1; // ピン情報を表示 - document.getElementById("pin-info").textContent = `Pin 1: ${pins[0].name} [${pin1LatLng.lat.toFixed(6)}/${pin1LatLng.lng.toFixed(6)}], Pin 2: ${pins[1].name} [${pin2LatLng.lat.toFixed(6)}/${pin2LatLng.lng.toFixed(6)}]`; + document.getElementById("pin-info").textContent = `Pin 1: ${pins[0].name}, Pin 2: ${pins[1].name}`; watchId = navigator.geolocation.watchPosition( onSuccess, onError, { maximumAge: 0, timeout: 3000, enableHighAccuracy: true }); document.getElementById("title").textContent = "START!!";