From e474712f8cbb09acd702d3d62041b469c9ed74b8 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 21 Mar 2007 09:32:43 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@587 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../components/naver_map/naver_map.class.php | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/modules/editor/components/naver_map/naver_map.class.php b/modules/editor/components/naver_map/naver_map.class.php index 472d43358..1fb69fa53 100644 --- a/modules/editor/components/naver_map/naver_map.class.php +++ b/modules/editor/components/naver_map/naver_map.class.php @@ -90,29 +90,50 @@ * * 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서 * DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경 + * + * 네이버 지도 open api 는 doctype에 대한 오류 및 기타 등등등등의 문제 때문에 iframe 을 만들고 컴포넌트를 다시 호출해서 html을 출력하게 한다. + * 네이버 지도 open api 가 xhtml1-transitional.dtd 를 지원하게 되면 다시 깔끔하게 고쳐야 함.. + * 2006년 3월 12일 하루 다 날렸다~~~ ㅡ.ㅜ **/ function transHTML($xml_obj) { $x = $xml_obj->attrs->x; $y = $xml_obj->attrs->y; $width = $xml_obj->attrs->width; $height = $xml_obj->attrs->height; - $id = "navermap".rand(11111111,99999999); - $body_code .= sprintf('
%s', $id, $width, $height,"\n"); - $footer_code = - sprintf( - '', - $id, $x, $y - ); - - Context::addJsFile("http://maps.naver.com/js/naverMap.naver?key=".$this->open_api_key); - Context::addHtmlFooter($footer_code); + $body_code = sprintf('
', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $width, $height); return $body_code; } + + function displayMap() { + $id = "navermap".rand(11111111,99999999); + $width = Context::get('width'); + $height = Context::get('height'); + $x = Context::get('x'); + $y = Context::get('y'); + + $html .= + sprintf( + ''. + ''. + ''. + ''. + ''. + ''. + ''. + '
'. + ''. + ''. + '', + $this->open_api_key, $id, $width, $height, $id, $x, $y + ); + print $html; + exit(); + } } ?>