³»Á¤º¸

ÁÖ¹®Á¶È¸.°ü¸®

Ä¿¹Â´ÏƼ

¼Ö·ç¼Ç °ü·Ã °Ô½ÃÆÇ
 


 

Å׸¶Çü ÀÚÀ¯°Ô½ÃÆÇ

 


¤ýÀÛ¼ºÀÚ ¿ÃÆ÷¼ÒÇÁÆ®
¤ýÀÛ¼ºÀÏ 2011/11/30 08:27
¤ýºÐ ·ù HTML
¤ýÁ¶È¸: 2304      
¤ýIP: 115.xxx.217
html5_À§Ä¡ÃßÀû
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
#map{
width : 1024px;
height: 600px;
}
</style>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
window.onload = function(){
document.getElementById("start").onclick = function(){
// °è¼Ó À§Ä¡Á¤º¸¹Þ°í ½ÍÀ»¶§ watchPosition»ç¿ë
//¼º°ø½Ã successÇÔ¼ö, ½ÇÆнà errorÇÔ¼ö È£Ãâ
//maximumAge À§Ä¡Á¤º¸ ¹ÞÀº ½Ã°£
watchId = window.navigator.geolocation.watchPosition(success, error, {
enableHigtAccuracy: document.getElementById("gps").checked,
maximumAge: 0

});

};

document.getElementById("stop").onclick = function(){
// TODO À§Ä¡ ÃßÀûÀ» ÁßÁöÇÑ´Ù.
//watchPosition¿¡ ³Ö¾îÁÖ¾ú´Â id°ªÀ» ÀÎÀÚ·Î
window.navigator.geolocation.clearWatch(watchId);

};

// TODO ±¸±Û¸ÊÀ» ºÒ·¯¿Â´Ù.(±¸±Û¸Ê open api -> http://code.google.com/apis/maps)
// LatLng ¸í·ÉÀº http://maps.google.com/maps/api/js¿¡ Á¤ÀÇµÈ Å¬·¡½º
// À§µµ, °æµµ¸¦ °¡Áö°í Àִ Ŭ·¡½º
var center = new google.maps.LatLng(37.519768, 126.939769);
map = new google.maps.Map(document.getElementById("map"), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom:17,
center: center
});
}

// À§Ä¡ È®ÀÎ ¼º°ø ½Ã
function success(position){
// TODO ÁöµµÀÇ Áß¾ÓÀ» ÇöÀç À§Ä¡·Î ¼¼ÆÃÇÑ´Ù. À§µµ, °æµµ ÀÎÀÚ
var center = new google.maps.LatLng(
position.coords.latitude,
position.coords.longitude
);
map.setCenter(center);
// TODO ¸¶Ä¿ Ç¥½Ã
var marker = new google.maps.Marker({
position: center,
title: "³»À§Ä¡",
map: map
});
}

// À§Ä¡ È®ÀÎ ½ÇÆÐ ½Ã
function error(error){
log("Á¶È¸ ½ÇÆÐ: " + error.code);
}
</script>
</head>
<body>
<h1>ÇöÀç À§Ä¡ ÃßÀû</h1>
<button id="start">½ÃÀÛ</button>
<button id="stop">ÁßÁö</button>
<input type="checkbox" id="gps">GPS »ç¿ë
<div id="map">
Áöµµ¸¦ ·Îµù ÁßÀÔ´Ï´Ù...
</div>
</body>
</html>

 

   

   
¹øÈ£     ±Û Á¦ ¸ñ ÀÛ¼ºÀÏ Á¶È¸
11 ¸ÞŸÅÂ±× ¼Ó¼º Á¤¸® 2014/01/31 (±Ý) 2418
10 CSS display ¼Ó¼º - inline°ú block 2012/06/01 (±Ý) 1704
9 ·¹À̾î Ç×»ó Áß¾Ó Á¤·Ä 2012/05/27 (ÀÏ) 1544
8 ¸ÞŸÅÂ±× Á¤¸® 2012/01/31 (È­) 1636
7 html5_Geolocation API 2011/11/30 (¼ö) 1635
6 html5_À§Ä¡ÃßÀû 2011/11/30 (¼ö) 2304
5 HTML5 Tip & Tech (1) - ±âÃÊ 2011/11/24 (¸ñ) 1648
4 HTML5¶õ ¹«¾ùÀΰ¡? 2011/11/24 (¸ñ) 1921
3 CSS float ¿ä¼Ò Áß¾Ó Á¤·Ä ½ÃÅ°±â. (NO WIDTH) 2011/11/16 (¼ö) 1751
2 Å×À̺í table ¼¿Æеùcellpadding Áٹٲ޹æÁö 2011/08/12 (±Ý) 1877
1 Å×À̺í Å©±â°íÁ¤. ÁÙ¹Ù²Þ ¹æÁö 2011/08/11 (¸ñ) 2163
1

 

 

 

Àå¹Ù±¸´Ï 0
»óÇ°º¸°üÇÔ 0
¿À´Ãº»¸ñ·Ï 0
°è»ê±â
Æ÷Åа˻ö
ȸ»ç¼Ò°³ £ü  ±¤°í¹®ÀÇ £ü  Á¦ÈÞ¹®ÀÇ £ü  ÀÌ¿ë¾à°ü £ü  û¼Ò³â º¸È£Á¤Ã¥ £ü  °³ÀÎÁ¤º¸ Ãë±Þ¹æħ £ü  °í°´¼¾ÅÍ £ü  »çÀÌÆ®¸Ê
ÁÖ¼Ò : ¼­¿ïƯº°½Ã ¼ºµ¿±¸ ¿ë´ä25±æ 15-1(¿ë´äµ¿) | »óÈ£ : ¿ÃÆ÷¼ÒÇÁÆ®(allfor.kr) | ´ëÇ¥ÀÚ:±è¿µ±æ | ¾÷Å : ¼­ºñ½º.¼Ò¸Å | Á¾¸ñ : ȨÆäÀÌÁöÁ¦ÀÛ. ¼Ö·ç¼Ç°³¹ß. Åë½ÅÆǸŠE-MAIL : admin@allfor.kr | ¢Ï : 070-8116-9964 | 010-5711-7987 | »ç¾÷ÀÚµî·Ï¹øÈ£ : 263-46-00104 | °³ÀÎÁ¤º¸°ü¸® Ã¥ÀÓÀÚ : ±è¿µ±æ