diff --git a/suiro/Extramak.js b/suiro/Extramak.js
deleted file mode 100644
index 53efbae..0000000
--- a/suiro/Extramak.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var unko=[38.72859248614108,139.82299320874214];
-
-var redMarker = L.ExtraMarkers.icon({
- innerHTML:'',
- icon: 'fa-coffee',
- markerColor: 'red',
- shape: 'square',
- prefix: 'fa',
- extraClasses:'movie'
-});
-
-//pop= ''
-
-var red_unko=L.marker(unko, {icon: redMarker}).addTo(mymap);
-
-console.log(red_unko);
diff --git a/suiro/catgps.js b/suiro/catgps.js
new file mode 100644
index 0000000..e7a34ba
--- /dev/null
+++ b/suiro/catgps.js
@@ -0,0 +1,132 @@
+function distance(x1, y1, x2, y2) { // ヒュベニ式による距離概算
+ rx = 6378137; // 赤道半径(m) WGS84
+ ry = 6356752.314; // 極半径(m) WGS84
+ e2=(rx*rx-ry*ry)/rx/rx; // 離心率 E^2
+ dx = (x2-x1)*Math.PI/180; // 経度の差をラジアン変換
+ dy = (y2-y1)*Math.PI/180; // 緯度の差をラジアン変換
+ my = (y1+y2)/2.0*Math.PI/180; // 緯度の平均をラジアン変換
+ w = Math.sqrt(1-e2*Math.sin(my)*Math.sin(my));
+ m = rx*(1-e2)/Math.pow(w,3); // 子午線曲率半径
+ n = rx/w; // 卯酉線曲率半径
+ return Math.sqrt(Math.pow(dy*m,2) + Math.pow(dx*n*Math.cos(my),2));
+}
+
+function game(){
+ var threshold = 10; // 何m接近をゴールとするか
+
+ var timerInterval = 10000; // GPS失敗で何秒後に再取得か
+ var tmId = null;
+ var i = 0;//, countD = document.getElementById("countdown");
+
+ //var info = document.getElementById("info");
+
+ var point = L.marker(mymap.getCenter());
+ //
+ var stop = document.getElementById("gps_off");
+
+ var gps = document.getElementById("gps_on");
+ var nowTrying = null;
+ var doflag=true;
+
+ function tryGetGPS() {
+ clearTimer();
+ //ser.textContent = "GPS取得..."
+ nowTrying = navigator.geolocation.getCurrentPosition(
+ onSuccess, onError,{
+ maximumAge: 0, timeout: 3000, enableHighAccuracy: true})
+ }
+
+ function onemore() {
+ if (nowTrying || tmId) {
+ //info.textContent = "既にGPS取得試行or待機中です";
+ } else {
+ startTimer();
+ //tm.textContent=""+naiyo[0]+"";
+ }
+ }
+
+ function startTimer() {
+ if (tmId==null && doflag){
+ tmId = setTimeout(tryGetGPS, 5000);
+ //ser.textContent = "5秒後にGPS取得…";
+ //tme.textContent= "周りに注意して使用しましょう!";
+ }
+ }
+
+ function clearTimer() {
+ if (tmId) {
+ clearTimeout(tmId);
+ //nowTrying=nil;
+ }
+ }
+
+ function countDown(){
+ if (doflag){
+ alert("周りに注意して使用して下さい");
+ //alert(""+naiyo[0]+"")
+ tryGetGPS();
+ } else{
+ tryGetGPS();
+ doflag=true;
+ tmId=null;
+ }
+ }
+
+ function stopCountDown() {
+ doflag=false;
+ //countD.textContent = "stop!";
+ //ser.innerHTML = "startボタンをもう一度押すと始まります";
+ }
+
+ function onSuccess(pos) {
+ nowTrying = null;
+ tmId=null;
+ mymap.setZoom(18);
+ var latlng = L.latLng([pos.coords.latitude, pos.coords.longitude]);
+ //ser.textContent = "現在の位置は"+latlng+"です。";
+ mymap.panTo(latlng);
+
+ //point.setPopupContent("あなたの位置はここです").openPopup().setLatLng(latlng);
+ point.bindPopup("あなたの位置はここです").setLatLng(latlng).addTo(mymap);
+ var lat = latlng.lat, lng = latlng.lng;
+ //alert(iro);
+ var g=100000,d=0,i=0, come,color,near_point;
+ //var m=feature.geometry.coordinates;
+
+ for(i=0; i',
-// className:'',
-// //if not class name marker has select box
-// iconAnchor: [22, 40],
-// popupAnchor: [-10,-30],
-// shadowUrl: 'https://www.yatex.org/gitbucket/natto/leaflet/raw/master/images/marker-shadow.png',
-// shadowSize: [68, 95],
-// shadowAnchor: [22, 94],
-// tooltipAnchor:[0,-20]
-// });
-// }else{
-// var mkdIcon=L.divIcon({
-// html:'',
-// className:'Movie',
-// //if not class name marker has select box
-// iconAnchor: [22, 40],
-// popupAnchor: [-10,-30],
-// shadowUrl: 'https://www.yatex.org/gitbucket/natto/leaflet/raw/master/images/marker-shadow.png',
-// shadowSize: [68, 95],
-// shadowAnchor: [22, 94]
-// });
-// }
-// mcon.setIcon(mkdIcon);
-// };
-
function mak_click(marker,map){
marker.on('click', function(o){
map.closePopup();
@@ -394,13 +366,13 @@
//console.log("pop");
});
-var ati=document.getElementById("aps");
+// var ati=document.getElementById("aps");
-function aaaa(){
- //alert("unko");
-};
+// function aaaa(){
+// //alert("unko");
+// };
-aps.addEventListener("click",aaaa,false);
+// aps.addEventListener("click",aaaa,false);
/*
マーカーに対する変更
diff --git a/suiro/map.html b/suiro/map.html
index 18a54ac..0f8b917 100644
--- a/suiro/map.html
+++ b/suiro/map.html
@@ -9,15 +9,10 @@
-
+
-
-
-
-
-
@@ -46,12 +41,14 @@
@@ -71,6 +79,7 @@
+