티스토리 뷰

<body>에 다음지도 API 사용


<body onload="init()"> 을 사용하지 않고 jQuery 를 이용하여 로딩될때 바로 실행하게 변경

$( function() { } )




<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>
view raw gistfile1.txt hosted with ❤ by GitHub
댓글