|
|
|
|
|
request객체에 Lat랑 Lon 값을 저장한후에 저 지점으로 이동하고싶은데 잘안되네요 map.drawZoomAndCenter("Seongju", 11); lpoint=new YGeoPoint(lat,lon) map.panToLatLon(lpoint)
이런식으로 쓰면 자꾸 340번째 줄에 Lon이 null이라고 에러가 납니다 소스보기를 했을경우에는 340줄도 없구요
전체소스
<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <% request.setCharacterEncoding("EUC-KR"); %> <%@ page import="info.location.*" %> <%Searchkey key=(Searchkey)request.getAttribute("key"); System.out.println(key.getInfo_Lon()); %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=EUC-KR"> <title>지역 이름 가져오기</title> <script type="text/javascript " src="<%= request.getContextPath() %>/map/mapMake.js"></script> <script type="text/javascript " src="<%= request.getContextPath() %>/map/ajax.js"></script> <script type="text/javascript " src="<%= request.getContextPath() %>/info/map/findWhere.js"></script> <script type="text/javascript "> function locationName(){ var map = new YMap(document.getElementById('map')); // map.addTypeControl(); map.addZoomLong(); // map.addPanControl(); var lpoint= new YGeoPoint(<%=key.getInfo_Lat()%>,<%=key.getInfo_Lon()%>); map.drawZoomAndCenter("Seongju", 11); map.panToLatLon(lpoint,100); YEvent.Capture(map, EventsList.MouseDoubleClick, getLocationName); // map.disablePanOnDoubleClick(); } function getLocationName(_e, _c){ var params = "latitude=" + _c.Lat + "&longitude=" + _c.Lon; new ajax.Request("<%= request.getContextPath() %>/map/getLocation.jsp", params, loadLocationName, "GET"); } </script> <style type="text/css"> #map{ height:290px; width:760px; } </style> </head> <body onl oad="locationName();"> <center> <div id="map"></div> <form action="<%=request.getContextPath()%>/info/searchlocation.do" method=post name=form> <br>State : <input id="state" name="info_state" type="text"></input> <br>County : <input id="county" name="info_county" type="text"></input> <input type="text" name="info_Lat" /> <input type="text" name="info_Lon" /> </form> </center> </body> </html>
|
http://kr.blog.yahoo.com/gugi_openapi/trackback/12/63
-
거기오픈API 2008.08.26 09:45
-
var lpoint= new YGeoPoint(<%=key.getInfo_Lat()%>,<%=key.getInfo_Lon()%>);
이 부분에 값이 들어 있는지 확인해 주세요. 그리고, YGeoPoint에 값이 있다면 구지 map.drawZoomAndCenter("Seongju", 11);와 같이 하지 않고 바로 map.drawZoomAndCenter(lpoint, 11); 하시면 됩니다. 감사합니다.
답글쓰기
-
-
hricain9 2008.08.26 10:40
-
해결했습니다 감사합니다^^
답글쓰기
-
|
|
|
|
|
|
|
|
|
|
 안녕하세요?
이전에도 한번 물어봤었는데 혹시 지도가 영문으로 가능한지요?
지도 메쉬업을 이용해 외국인을 대상으로 한국 홍보사이트를 만들려고 하는데,
지도가 한국어로만 되어 있어서 애로사항이 있습니다.
혹시, 첨부한 지도의 줌레벨까지만이라고 영문지명이 포함된 지도를 제공해 주시면 안되나요?
북한 지역을 보면 한글,영문으로 지명이 같이 표기되어 있어서 외국인이 보기도 좋을 듯 한데요.
영문지명도 지원된다면 야후맵이 더 많이 사용될 것 같은데요.
그럼 답변 부탁합니다.
|
http://kr.blog.yahoo.com/gugi_openapi/trackback/12/61
-
거기오픈API 2008.08.24 22:15
-
영문지도와 관련하여서 담당자에게 문의후 재 답글 달도록 하겠습니다.
감사합니다.~
답글쓰기
-
-
거기오픈API 2008.08.25 10:11
-
안녕하세요 야후! 지도 담당자입니다.
좋은 의견 감사 드립니다. 말씀하신 제안사항에 대해서는 바로 진행하기는 다소 어려울 것 같고요 ^^ 향후 개편 때 추가하여 반드시 현재 줌레벨에 대해서는 넣도록 하겠습니다.
감사합니다.
답글쓰기
-
-
siriush78 2008.08.26 11:02
-
참고로.. 야후! 거기 API(야후 코리아에서 만든 것)에서는 한글 지원이 되어서 한글로 표시되는데.. 개선 되기 전까지 임시방편으로 Yahoo! Map(yahoo.com) 영문 API를 가져다가 쓰시면 전부다 영문으로 표시됩니다.
그런데.. 문제는.. '도' 규모의 행정구역표시가 없고 물론 경계선도 없습니다. 또한 '시'가 표시되긴 한다만.. 크기가 좀 이상합니다.. 남한을 한화면에 보게되면 청주가 서울보다 크게 보입니다. -0-;
답글쓰기
-
-
kwm8908 2008.08.26 17:05
-
yahoo.com 지도는 영문으로 지원은 되지만, 한국에 대해서는 zoom level이 올라가면 상세 지역에 대한 지도 서비스가 되지 않아 사용하기는 좀 어려울 것 같습니다.
정보 감사합니다.
답글쓰기
-
|
|
|
|
|
|
|
|
|
|
지도의 사이즈를 줄이려고 하는데 IE에서 스크립트 에러가 납니다. 그런데 400*400 으로 하면 에러가 안나네요~
<style type="text/css">#map{height: 110px;width: 225px;}</style>
<script type="text/javascript "> <!-- var map; function StartYMap()
{ // 지도 오브젝트를 생성 합니다. map = new YMap(document.getElementById('map')); // 지도 확대/축소 콘트롤을 추가합니다. map.addZoomShort(); // 지도 이동 콘트롤을 추가합니다. map.removeZoomScale(); // 지도보기 유형을 선택합니다. map.drawZoomAndCenter(encodeURIComponent("서울 종로구 종로6가 "),3);
var newMarker= new YMarker(encodeURIComponent("서울 종로구 종로6가 ")); map.addOverlay(newMarker);
// 지도 크기 설정 map.resizeTo(new YSize(225,110));
} window.onload = StartYMap; //--></script>

파이어폭스에서는 에러없이 잘 동작합니다. 제가 잘못 한건가요?
|
http://kr.blog.yahoo.com/gugi_openapi/trackback/12/56
-
거기오픈API 2008.08.22 11:19
-
안녕하세요.
지도 초기화시 drawzoomandcenter를 할 때 poi로 사용하시면 위와 같은 경우가 발생 할 수 있음을 확인 하였습니다. 일단, map.drawZoomAndCenter(new YGeoPoint(36.1,127.3),3);와 같이 point형태로 하시면 오류를 회피하실 수 있습니다. 버그 관련해서는 별도로 확인해 보도록 하겠습니다. 감사합니다.
답글쓰기
-
-
거기오픈API 2008.08.22 13:31
-
관련된 버그가 Fix되었습니다.
감사합니다.
답글쓰기
-
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko"> <head> <meta http-equiv="content-type" content="text/html; charset=euc-kr" /> <title>XML로부터 객체 생성</title> <script type="text/javascript "> var ajax = {}; ajax.xhr = {}; ajax.xhr.Request = function(url, params, callback, method) { this.url = url; this.params = params; this.callback = callback; this.method = method; this.send(); } ajax.xhr.Request.prototype = { getXMLHttpRequest: function() { if (window.ActiveXObject) { try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e1) { return null; } } } else if (window.XMLHttpRequest) { return new XMLHttpRequest(); } else { return null; } }, send: function() { this.req = this.getXMLHttpRequest(); var httpMethod = this.method ? this.method : 'GET'; if (httpMethod != 'GET' && httpMethod != 'POST') { httpMethod = 'GET'; } var httpParams = (this.params == null || this.params == '') ? null : this.params; var httpUrl = this.url; if (httpMethod == 'GET' && httpParams != null) { httpUrl = httpUrl + "?" + httpParams; } this.req.open(httpMethod, httpUrl, true); this.req.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded'); var request = this; this.req.onreadystatechange = function() { request.onStateChange.call(request); } this.req.send(httpMethod == 'POST' ? httpParams : null); }, onStateChange: function() { this.callback(this.req); } } window.onload = function() { new ajax.xhr.Request("http://kr.open.gugi.yahoo.com/service/rgc.php", "appid=VyY1f0DV34G8HA3UnPbygP8VofLY38zM57lJ7wC7HS3qyxGTBiqrfKa7Qqpetfw&latitude=37.4997677193116&longitude=129.0294189453125&output=xml", viewInfo, "GET"); } function viewInfo(req) { if (req.readyState == 4) { if (req.status == 200) { var docXML = req.responseXML; var code = docXML.getElementsByTagName("Found") .item(0).firstChild.nodeVal ue; if (code == '1') { var country = docXML.getElementsByTagName("country") .item(0).firstChild.nodeVal ue; var state = docXML.getElementsByTagName("state") .item(0).firstChild.nodeVal ue; var county = docXML.getElementsByTagName("county") .item(0).firstChild.nodeVal ue; var town = docXML.getElementsByTagName("town") .item(0).firstChild.nodeVal ue; alert(country+state+county+town); } else { alert("실패"); } } else { alert("에러 발생:"+req.status); } } } </script> </head> <body> </body> </html>
브라우져에서xml로 결과가나오는데 이것을 돔을사용해서 접근해서 정보를 가져오려고 하는데 잘안되네요 브라우져실행하면 접근권한이없다고 나오는데 잘알려주세요
|
http://kr.blog.yahoo.com/gugi_openapi/trackback/12/55
-
거기오픈API 2008.08.22 13:33
-
안녕하세요. Ajax를 통해 OpenAPI를 사용하는 경우 일반적으로 Domain이 다른 host의 API호출시 보안경고가 발생합니다. 이것을 해결하기 위해서는 json callback을 이용하시거나, proxy페이지를 두시는 방법을 사용
하셔야 합니다. 감사합니다.
답글쓰기
-
|
|
|
|
|
|
|
|
|
|
results에 50이나 100을 입력해도, 기본적으로 20개 밖에 결과나 안 나옵니다.
된다면, sample url 하나만, 적어 주세요.
|
http://kr.blog.yahoo.com/gugi_openapi/trackback/12/54
-
거기오픈API 2008.08.11 10:26
-
안녕하세요.
관련된 부분을 확인해 보고 바로 답변드리도록 하겠습니다.
감사합니다.
답글쓰기
-
|
|
|
|
|
|
|
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|