다음 블로그 검색연동 ( XML , JSON )

Open API/Daum|2016. 10. 31. 09:26
반응형



다음 블로그 검색 결과 XML로 받기


* API Url

 : http://dna.daum.net/apis/search


* Test Url

 : http://apis.daum.net/search/blog?q=uhoon.co.kr&apikey=DAUM_SEARCH_DEMO_APIKEY


* API Key 

 : http://dna.daum.net/myapi/dashboard


기타 검색 및 상세 옵션은 API 를 참고해주시고 블로그 검색을 위한 옵션입니다.



Request Parameter 

 

요청변수 설명
q string (필수) 검색을 원하는 질의어
result integer : 기본값 10, 최소 1, 최대 20 한 페이지에 출력될 결과수
pageno integer : 기본값 1, 최소 1, 최대 500 검색 결과 페이지 번호
sort string : date(기본값), accu
  • 검색 결과의 정렬순서
  • date : 최신글순
  • accu : 정확도순
output string : xml(기본값), json 결과형식
callback string 콜백함수(output이 json일 경우)




Response Parameter


출력 변수 설명
title string 검색 제목
link string 서비스 URL
description string 검색 결과의 간략한 소개
lastBuildDate string 검색 시간
totalCount integer 전체 검색 결과의 수
pageCount integer 전체 검색 결과의 페이지수
result integer 한 페이지에 출력될 결과수
item - 개별 검색 결과 정보
title string 개별 검색 결과의 제목
description string 개발 검색 결과의 본문 요약
link string 개별 검색 결과의 link url
comment string 관련 링크
author string 출처
pubDate string 등록일



댓글()

다음맵 로드뷰

Open API/Daum|2016. 10. 31. 09:23
반응형

다음맵에서 지원하는 로드뷰 샘플 코드입니다.


추가로 위경도 정보를 읽어와서 표시할수 있도록 했습니다.




<!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=51e40b674ec6f718ea6f04246c850e6de7ec841a" 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>


댓글()

다음맵 api 마커 + 말풍선

Open API/Daum|2016. 10. 31. 09:12
반응형



다음맵 API를 이용한 기본 마커 + 말풍선 샘플 코드입니다.


<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width, target-densityDpi=device-dpi"> <title>용산전쟁기념관</title> <style type="text/css"> html, body, #map {margin: 0; padding: 0; width: 100%; height: 100%} </style> <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.53592870797618, 126.97726376303085) });    var icon = new daum.maps.MarkerImage( 'http://maps.google.com/mapfiles/kml/pal3/icon46.png', new daum.maps.Size(20, 20), new daum.maps.Point(20, 20) ); var marker = new daum.maps.Marker({ position: new daum.maps.LatLng(37.5367, 126.9772), image : icon }); marker.setMap(map);    var infowindow = new daum.maps.InfoWindow({ content: '<a href="http://www.warmemo.co.kr" target="_blank" style="margin:1em;line-height:2;text-decoration:none">장소 : 용산전쟁기념관 기획전시실   <BR>     프로그램명: 코코몽 녹색놀이터 <br>     기간 : 2012.12.01-2012.12.31<br>     예약현황 : 80개 단체 5000명(현재)</a>' });   daum.maps.event.addListener(marker, "click", function() { infowindow.open(map, marker); });   daum.maps.event.addListener(map, "click", function() { infowindow.close(); });     var marker1 = new daum.maps.Marker({ position: new daum.maps.LatLng(37.5245, 126.9805), image : icon });   marker1.setMap(map); var infowindow1 = new daum.maps.InfoWindow({ content: '<a href="http://www.museum.go.kr" target="_blank" style="margin:1em;line-height:2;text-decoration:none">장소 : 국립중앙 박물관   <BR>     프로그램명: 2013 웨딩페어 <BR>     기간 : 2012.12.01-2012.12.31<BR>     예약현황 : 2개 단체 20000명(현재)</a>' });   daum.maps.event.addListener(marker1, "click", function() { infowindow1.open(map, marker1); });   daum.maps.event.addListener(map, "click", function() { infowindow1.close(); }); } </script> </head> <body onload="init()"> <div id="map"></div>    </body> </html>


댓글()