diff --git a/leaflet/GPS/gps-chase.js b/leaflet/GPS/gps-chase.js index 2448afd..4e619e8 100644 --- a/leaflet/GPS/gps-chase.js +++ b/leaflet/GPS/gps-chase.js @@ -35,6 +35,10 @@ gpsmarker.setLatLng(latlng).setPopupContent( "ここは lat="+latlng.lat+", lng="+latlng.lng+" です." ).openPopup(); + if (latlng.lat = 38.8972) { + gpsmarker.setPopupContent("GOAL") + } + else{gpsmarker.setPopupContent("aaa")} // ★★★★★ ここまでの latlng.lat と latlng.lng を // if文などで判定して、特定の場所に近づいたら「GOAL!」と // 表示するように変えてみよ。 @@ -50,4 +54,7 @@ document.getElementById("start").addEventListener("click", tryWatchGPS); // STOPボタンに停止を仕込む document.getElementById("stop").addEventListener("click", stopGPS); -}, false); \ No newline at end of file +}, false); + +38.897243190006016 +139.84136683213003 \ No newline at end of file