모바일에서 GPS가져오는 파일입니다.
유용하게 사용하세요 안되시면 쪽지주세요..
구글플레이안산놀이터에 적용된 파일입니다.
<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type='text/javascript' src='/js/jquery-1.7.2.min.js'></script>
<script type='text/javascript' src='/js/jquery.common.js'></script>
<script type='text/javascript' src='/js/swipe.js'></script>
<meta charset="utf-8" />
<script>
var geocoder = new google.maps.Geocoder();
var addr = "";
<head>
<title>jQuery Mobile</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type='text/javascript' src='/js/jquery-1.7.2.min.js'></script>
<script type='text/javascript' src='/js/jquery.common.js'></script>
<script type='text/javascript' src='/js/swipe.js'></script>
<meta charset="utf-8" />
<script>
var geocoder = new google.maps.Geocoder();
var addr = "";
if( navigator.geolocation )
{
//괄호 속 인자 ( 성공일 때 함수명, 실패일 때 함수명)
navigator.geolocation.getCurrentPosition( showPosition, handleError );
}
{
//괄호 속 인자 ( 성공일 때 함수명, 실패일 때 함수명)
navigator.geolocation.getCurrentPosition( showPosition, handleError );
}
else
{
alert('navigator.geolocation 브라우저 미지원');
}
{
alert('navigator.geolocation 브라우저 미지원');
}
function showPosition( position )
{
//alert( '위도 : '+position.coords.latitude + '\n경도 : ' + position.coords.longitude );
googl(position.coords.latitude,position.coords.longitude);
}
function handleError( evt )
{
alert( evt.message );
}
{
//alert( '위도 : '+position.coords.latitude + '\n경도 : ' + position.coords.longitude );
googl(position.coords.latitude,position.coords.longitude);
}
function handleError( evt )
{
alert( evt.message );
}
function googl(num1, num2){
var latlng = new google.maps.LatLng(num1, num2);
geocoder.geocode({'latLng': latlng}, function(results, status){
if( status == google.maps.GeocoderStatus.OK ) {
//alert(results[0].formatted_address);
// document.write(results[1].formatted_address);
//$("#add1").value('111');//results[1].formatted_address);
document.body.innerHTML = results[1].formatted_address;
var latlng = new google.maps.LatLng(num1, num2);
geocoder.geocode({'latLng': latlng}, function(results, status){
if( status == google.maps.GeocoderStatus.OK ) {
//alert(results[0].formatted_address);
// document.write(results[1].formatted_address);
//$("#add1").value('111');//results[1].formatted_address);
document.body.innerHTML = results[1].formatted_address;
}
else {
//document.write("Geocoder failed due to: " + status)
document.body.innerHTML += "Geocoder failed due to: " + status + "<br />";
//$("#address").html("Geocoder failed due to: " + status);;
}
});
}
else {
//document.write("Geocoder failed due to: " + status)
document.body.innerHTML += "Geocoder failed due to: " + status + "<br />";
//$("#address").html("Geocoder failed due to: " + status);;
}
});
}
</script>
</head>
<body>
<!-- <div id="add1" style="font-size:13px;"></div> -->
</body>
</html>
<!-- <div id="add1" style="font-size:13px;"></div> -->
</body>
</html>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 230 | 20년 전 | 2094 | ||
| 229 | 20년 전 | 3151 | ||
| 228 | 20년 전 | 3343 | ||
| 227 | 20년 전 | 2418 | ||
| 226 | 20년 전 | 5499 | ||
| 225 | 20년 전 | 2541 | ||
| 224 | 20년 전 | 2981 | ||
| 223 | 20년 전 | 4218 | ||
| 222 | 20년 전 | 2615 | ||
| 221 | 20년 전 | 2304 | ||
| 220 | 20년 전 | 3692 | ||
| 219 | 20년 전 | 2087 | ||
| 218 | 20년 전 | 3588 | ||
| 217 | 20년 전 | 2500 | ||
| 216 | 20년 전 | 2937 | ||
| 215 | 20년 전 | 2245 | ||
| 214 | 20년 전 | 3353 | ||
| 213 | 20년 전 | 2937 | ||
| 212 | 20년 전 | 3077 | ||
| 211 | 20년 전 | 2168 | ||
| 210 | 20년 전 | 1932 | ||
| 209 | 20년 전 | 2383 | ||
| 208 | 20년 전 | 2012 | ||
| 207 | 20년 전 | 1693 | ||
| 206 | 20년 전 | 1867 | ||
| 205 | 20년 전 | 3965 | ||
| 204 | 20년 전 | 1686 | ||
| 203 | 20년 전 | 2029 | ||
| 202 | 20년 전 | 2369 | ||
| 201 | 20년 전 | 1844 | ||
| 200 | 20년 전 | 2974 | ||
| 199 | 20년 전 | 2016 | ||
| 198 | 20년 전 | 2100 | ||
| 197 | 20년 전 | 3671 | ||
| 196 | 20년 전 | 3012 | ||
| 195 | 20년 전 | 2123 | ||
| 194 | 20년 전 | 10274 | ||
| 193 | 20년 전 | 2270 | ||
| 192 | 20년 전 | 1619 | ||
| 191 | 20년 전 | 2683 | ||
| 190 | 20년 전 | 2303 | ||
| 189 | 20년 전 | 1704 | ||
| 188 | 20년 전 | 1504 | ||
| 187 | 20년 전 | 1928 | ||
| 186 | 20년 전 | 1753 | ||
| 185 | 20년 전 | 1800 | ||
| 184 | 20년 전 | 2383 | ||
| 183 | 20년 전 | 1594 | ||
| 182 | 20년 전 | 1501 | ||
| 181 | 20년 전 | 1642 | ||
| 180 | 20년 전 | 2740 | ||
| 179 | 20년 전 | 1828 | ||
| 178 | 20년 전 | 1877 | ||
| 177 | 20년 전 | 2003 | ||
| 176 | 20년 전 | 1812 | ||
| 175 | 20년 전 | 1882 | ||
| 174 | 20년 전 | 1714 | ||
| 173 | 20년 전 | 2073 | ||
| 172 | 20년 전 | 1798 | ||
| 171 | 20년 전 | 2583 | ||
| 170 | 20년 전 | 2301 | ||
| 169 | 20년 전 | 2577 | ||
| 168 | 20년 전 | 1515 | ||
| 167 | 20년 전 | 1601 | ||
| 166 | 20년 전 | 2175 | ||
| 165 | 20년 전 | 1662 | ||
| 164 | 20년 전 | 3793 | ||
| 163 | 20년 전 | 2689 | ||
| 162 | 20년 전 | 2112 | ||
| 161 | 20년 전 | 2822 | ||
| 160 | 20년 전 | 1757 | ||
| 159 | 20년 전 | 1635 | ||
| 158 | 20년 전 | 2589 | ||
| 157 | 20년 전 | 1515 | ||
| 156 | 20년 전 | 1776 | ||
| 155 | 20년 전 | 3252 | ||
| 154 | 20년 전 | 1924 | ||
| 153 | 20년 전 | 1642 | ||
| 152 | 20년 전 | 4978 | ||
| 151 | 20년 전 | 4598 | ||
| 150 | 20년 전 | 3540 | ||
| 149 | 20년 전 | 3817 | ||
| 148 | 20년 전 | 7101 | ||
| 147 | 20년 전 | 3570 | ||
| 146 | 20년 전 | 2649 | ||
| 145 | 20년 전 | 2642 | ||
| 144 | 20년 전 | 7179 | ||
| 143 | 20년 전 | 4625 | ||
| 142 | 20년 전 | 1911 | ||
| 141 | 20년 전 | 3270 | ||
| 140 | 20년 전 | 1990 | ||
| 139 | 20년 전 | 1616 | ||
| 138 | 20년 전 | 2332 | ||
| 137 | 20년 전 | 1807 | ||
| 136 | 20년 전 | 1473 | ||
| 135 | 20년 전 | 1814 | ||
| 134 | 20년 전 | 2991 | ||
| 133 | 20년 전 | 2473 | ||
| 132 | 20년 전 | 1721 | ||
| 131 | 20년 전 | 1666 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기