1 function call_gps(classroomType) { 2 // GPSæ©è½ã®å©ç¨å¯å¦ãã§ã㯠3 if (!navigator.geolocation) { 4 alert('GPSæ©è½ããå©ç¨ã«ãªããã¨ãã§ãã¾ããã'); 5 return false; 6 } 7 8 // æå®¤æ¤ç´¢ã®ã¿ã¤ããè¨å® 9 if (typeof classroomType === 'undefined') { 10 classroomType = 'classroom_normal'; 11 } 12 switch (classroomType) { 13 case 'classroom_normal': 14 case 'classroom_baby_kumon': 15 break; 16 default: 17 classroomType = 'classroom_normal'; 18 break; 19 } 20 21 // GPSæ©è½ã®ä½¿ç¨ 22 navigator.geolocation.getCurrentPosition(function (position) { 23 var lat = position.coords.latitude; // 緯度 24 var lng = position.coords.longitude; // çµåº¦ 25 26 // ç·¯åº¦å¤æ 27 var latConverted = (lat + lat * 0.00010696 - lng * 0.000017467 - 0.0046020 ) * 3600; 28 // çµåº¦å¤æ 29 var lngConverted = (lng + lat * 0.000046047 + lng * 0.000083049 - 0.010041) * 3600; 30 31 // å°å³URL 32 var redirect_url = '/enter/search/classroom_map.php' 33 + '?classroom_type=' + classroomType 34 + '&x=' + lngConverted 35 + '&y=' + latConverted 36 + '&gps=1'; 37 // ãªãã¤ã¬ã¯ã 38 location.href = redirect_url; 39 40 return false; 41 }, function (err) { 42 switch (err.code) { 43 case 1: 44 msg = 'ä½ç½®æ å ±ã®å©ç¨ã許å¯ããã¦ãã¾ãã'; 45 break; 46 case 2: 47 msg = 'ããã¤ã¹ã®ä½ç½®ãå¤å®ã§ãã¾ãã'; 48 break; 49 case 3: 50 msg = 'ã¿ã¤ã ã¢ã¦ããã¾ãã'; 51 break; 52 default: 53 msg = ''; 54 break; 55 } 56 if (msg != '') { 57 alert(msg); 58 } 59 return false; 60 }, { 61 enableHighAccuracy: true 62 , maximumAge: 0 63 }); 64 }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.