티스토리 뷰
<body>에 다음지도 API 사용
<body onload="init()"> 을 사용하지 않고 jQuery 를 이용하여 로딩될때 바로 실행하게 변경
$( function() { } )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://apis.daum.net/maps/maps3.js?apikey=DAUM_MAPS_DEMO_APIKEY" charset="utf-8"></script> | |
<script type="text/javascript"> | |
var map; | |
$( function init() { | |
map = new daum.maps.Map(document.getElementById('map'), { | |
center: new daum.maps.LatLng(37.537123, 127.005523), | |
level: 3 | |
}); | |
} ) | |
</script> | |
<div class="container"> | |
<div id="map" style="width:600px;height:400px;"></div> | |
</div> |
댓글