Created
August 9, 2014 00:36
-
-
Save kkd927/46f710a1c5589279081b to your computer and use it in GitHub Desktop.
[다음지도 API] 지도 중심점 이동하기
This file contains hidden or 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 | |
}); | |
}) | |
function setCenter() { | |
map.setCenter(new daum.maps.LatLng(37.53723910162246, 127.003362714821)); | |
} | |
function panTo() { | |
map.panTo(new daum.maps.LatLng(37.53730198471141, 127.00744728571883)); | |
} | |
</script> | |
<div id="map" style="width:600px;height:600px;"></div> | |
<form> | |
<button type="button" onclick="setCenter()">중심점 이동하기</button> | |
<button type="button" onclick="panTo()">중심점 부드럽게 이동하기</button> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment