From a576bdc32611974e310aa47813e3863e1c534a93 Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 29 Mar 2007 11:35:32 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@780 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../components/naver_map/naver_map.class.php | 33 ++++++++----------- .../components/naver_map/tpl/popup.html | 4 +-- .../editor/components/naver_map/tpl/popup.js | 10 +++--- 3 files changed, 18 insertions(+), 29 deletions(-) diff --git a/modules/editor/components/naver_map/naver_map.class.php b/modules/editor/components/naver_map/naver_map.class.php index 114f0bd7c..1e74b9eb2 100644 --- a/modules/editor/components/naver_map/naver_map.class.php +++ b/modules/editor/components/naver_map/naver_map.class.php @@ -100,12 +100,10 @@ function transHTML($xml_obj) { $x = $xml_obj->attrs->x; $y = $xml_obj->attrs->y; - $marker_1 = $xml_obj->attrs->marker_1; - $marker_2 = $xml_obj->attrs->marker_2; - $marker_3 = $xml_obj->attrs->marker_3; + $marker = $xml_obj->attrs->marker; $width = $xml_obj->attrs->width; $height = $xml_obj->attrs->height; - $body_code = sprintf('
', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker_1, $marker_2, $marker_3, $width, $height); + $body_code = sprintf('
', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height); return $body_code; } @@ -124,9 +122,7 @@ $y = Context::get('y'); if(!$y) $y = 529730; - $marker_1 = Context::get('marker_1'); - $marker_2 = Context::get('marker_2'); - $marker_3 = Context::get('marker_3'); + $marker = Context::get('marker'); $html = ''. ''. @@ -155,19 +151,16 @@ if($x&&$y) $html .= 'mapObj.setCenterAndZoom(new NPoint('.$x.','.$y.'),3);'; - if($marker_1) { - $icon_url = 'http://static.naver.com/local/map_img/set/icos_free_a.gif'; - $html .= 'mapObj.addOverlay( new NMark(new NPoint('.$marker_1.'),new NIcon("'.$icon_url.'",new NSize(15,14))) );'; - } - - if($marker_2) { - $icon_url = 'http://static.naver.com/local/map_img/set/icos_free_b.gif'; - $html .= 'mapObj.addOverlay( new NMark(new NPoint('.$marker_2.'),new NIcon("'.$icon_url.'",new NSize(15,14))) );'; - } - - if($marker_3) { - $icon_url = 'http://static.naver.com/local/map_img/set/icos_free_c.gif'; - $html .= 'mapObj.addOverlay( new NMark(new NPoint('.$marker_3.'),new NIcon("'.$icon_url.'",new NSize(15,14))) );'; + if($marker) { + $marker_list = explode('|@|', $marker); + $icon_no = 0; + for($i=0;$i - - - +
{$component_info->title} ver. {$component_info->version} {$lang->about_component}
diff --git a/modules/editor/components/naver_map/tpl/popup.js b/modules/editor/components/naver_map/tpl/popup.js index d1d1823d3..b3b60447a 100644 --- a/modules/editor/components/naver_map/tpl/popup.js +++ b/modules/editor/components/naver_map/tpl/popup.js @@ -34,9 +34,7 @@ function insertNaverMap(obj) { var x = xGetElementById("map_x").value; var y = xGetElementById("map_y").value; - var marker_1 = xGetElementById("marker_1").value; - var marker_2 = xGetElementById("marker_2").value; - var marker_3 = xGetElementById("marker_3").value; + var marker = xGetElementById("marker").value; var address = xGetElementById("address").value; var width = xGetElementById("map_width").value; @@ -45,7 +43,7 @@ function insertNaverMap(obj) { var height = xGetElementById("map_height").value; if(!height) height= 480; - var text = "
"; + var text = "
"; opener.editorFocus(opener.editorPrevSrl); @@ -106,8 +104,8 @@ function complete_search_address(ret_obj, response_tags, selected_address) { /* 마커 표시 */ var marker_count = 1; function addMarker(pos) { - if(marker_count>4) return; - xGetElementById("marker_"+marker_count).value = pos; + if(marker_count>10) return; + xGetElementById("marker").value += '|@|'+pos; marker_count++; return true; }