1var watchId = null; 2 3function getLocation() { 4 if (navigator.geolocation) { 5 // 기존 ìì²ì´ ìë¤ë©´ ì¤ì§ 6 if (watchId !== null) { 7 navigator.geolocation.clearWatch(watchId); 8 } 9 10 watchId = navigator.geolocation.watchPosition( 11 getPositionAndSetCookie, 12 handleError, 13 { 14 enableHighAccuracy: true, 15 timeout: 10000, 16 maximumAge: 0 17 } 18 ); 19 } else { 20 alert('Geolocationì ì§ìíì§ ìë ë¸ë¼ì°ì ì ëë¤.'); 21 } 22} 23 24function getPositionAndSetCookie(position) { 25 var latitude = position.coords.latitude; 26 var longitude = position.coords.longitude; 27 var cookieValue = latitude + ',' + longitude; 28 29 console.log("ìë:", latitude, "ê²½ë:", longitude); // ëë²ê¹ ì© ë¡ê·¸ ì¶ê° 30 setCookie('user_location', cookieValue, 365); 31 32 // ð HTTPS ì²´í¬ í 리ëë ì ì¤í 33 if (window.location.protocol === "https:") { 34 location.href = g5_bbs_url + '/board.php?mode=nearby'; 35 } else { 36 alert("ìì¹ ì 보를 ê°ì ¸ì¤ë ¤ë©´ HTTPS íê²½ìì ì¤íí´ì¼ í©ëë¤."); 37 } 38} 39 40function setCookie(name, value, exdays) { 41 var d = new Date(); 42 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 43 var expires = "expires=" + d.toUTCString(); 44 document.cookie = name + "=" + value + ";" + expires + ";path=/"; 45} 46 47function handleError(error) { 48 switch (error.code) { 49 case error.PERMISSION_DENIED: 50 alert("â ì¬ì©ì ìì¹ ê¶íì´ ê±°ë¶ëììµëë¤."); 51 break; 52 case error.POSITION_UNAVAILABLE: 53 alert("â ìì¹ ì 보를 ì¬ì©í ì ììµëë¤."); 54 break; 55 case error.TIMEOUT: 56 alert("â³ ìì¹ ì ë³´ ìì² ìê°ì´ ì´ê³¼ëììµëë¤."); 57 break; 58 case error.UNKNOWN_ERROR: 59 alert("â ì ì ìë ì¤ë¥ê° ë°ìíìµëë¤."); 60 break; 61 } 62 63 console.error("ìì¹ ì ë³´ ìë¬:", error); 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.