map

다음맵 로드뷰

by kay posted Aug 29, 2013
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

다음맵 로드뷰 샘플입니다..


testUrl : http://www.uhoon.co.kr/test/1980.html


로드뷰.png


<!DOCTYPE html>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>로드뷰</title>
	<script src="http://code.jquery.com/jquery-latest.min.js"></script>
	<script type="text/javascript" src="http://apis.daum.net/maps/maps3.js?apikey=API키" charset="utf-8"></script>
	<script type="text/javascript">
		function init() {
			var p = new daum.maps.LatLng(37.567874958332034, 126.97975671440324);
			var rc = new daum.maps.RoadviewClient();
			var rv = new daum.maps.Roadview(document.getElementById("roadview"));
			rc.getNearestPanoId(p, 50, function (panoid) {
				rv.setPanoId(panoid, p);
			});
			daum.maps.event.addListener(rv, "position_changed", function () {
				$("#latlon").val(rv.getPosition());
			});
		}
	</script>
</head>

<body onload="init()">
	<div id="roadview" style="width:600px;height:400px;"></div>
	<input type="text" id="latlon" style="width:450px;"/>
</body>

</html>