테스트 사이트 - 개발 중인 베타 버전입니다

좌표&새주소 검색페이지(로드뷰 표시)

Daum API 를 활용한 좌표, 새주소 검색페이지 입니다.

소스 바로 뿌리구요~알아서 쓰실분만 쓰시고 질문은 사절입니다~^^

$apikey = "api코드 넣기"; => 요부분만 넣고 실행시키면 바로 됩니다~

http://www.shotbirdie.com/contents/shotbirdie_coordinate.php


--------------------------------------------------------------------------
<?
$g4_path = ".";
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/mw.builder.lib.php");

if($coordinatesh == 'ok'){
$g4[title] = "자료실 > 좌표&새주소 검색 : $_GET[coordinate]";
}else{
$g4[title] = "자료실 > 좌표&새주소 검색";
}

// http://www.shotbirdie.com/contents/shotbirdie_coordinate.php

@include_once("$g4[path]/head.php");

?>

<style>
.small3 { font-size:8pt; color:#FF3300; font-family:돋움; letter-spacing: -1px; line-height:180%}
.search_txt {color:#ffffff;}
</style>


</head>


<?
//상단메뉴
@include "./shotbirdie_search_top.php";
?>

<script type="text/javascript" language=JavaScript>
var bReset = true;
function chkReset(f)
{
if (bReset) { if ( f.coordinate.value == '주소기입시 번지까지만 입력' ) f.coordinate.value = ''; bReset = false; }
}
</script>

<!--상단검색-->
<table width="730" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="29"><img src="http://www.shotbirdie.com/contents/images/cdn/shotbirdie/search_left.gif" width="29" height="79"></td>
<td valign="top" background="http://www.shotbirdie.com/contents/images/cdn/shotbirdie/search_bodybg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3" height="6"></td>
<td height="6"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="500" class="search_txt">좌표&새주소 검색 (주소기입시 번지까지만 입력해주세요)</td>
<td class="search_txt"><div align="right"></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="39"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<form type="get" action="<?=$PHP_SELF?>" action="javascript:fsearchbox_submit(document.fsearchbox);">
<tr>
<td>
<?
if($_GET[coordinate]){
$shvalue = $_GET[coordinate];
}else{
$shvalue = "주소기입시 번지까지만 입력";
}
?>
<input name='coordinate' maxlength=30 itemname="좌표&새주소 검색" value="<?=$shvalue?>" required style="width:620; height:22px;" onFocus="this.value=''" onMouseOver='chkReset(this.form);'>
<input type='hidden' name='coordinatesh' value='ok'>
</td>
<td width="60"><div align="right">
<input name="image" type=image src="http://www.shotbirdie.com/contents/images/cdn/shotbirdie/search_bt.gif" align=absmiddle width="49" height="21" border=0>
</div></td>
</tr>
</form>

</table></td>
</tr>
</table></td>
<td width="20"><img src="http://www.shotbirdie.com/contents/images/cdn/shotbirdie/search_right.gif" width="20" height="79"></td>
</tr>
</table>

<?
//echo "$latlng[0] - $latlng[1]";
$apikey = "api코드 넣기";
$url = "http://apis.daum.net/local/geo/addr2coord?apikey=$apikey&q=$_GET[coordinate]&output=xml";

$xml = simplexml_load_file("$url");
$lng = $xml->item->{'lng'};
$lat = $xml->item->{'lat'};
$newAddress = $xml->item->{'newAddress'};
$title = $xml->item->{'title'};

if($lng){
echo "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*좌표 : lng - $lng / lat - $lat<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*새주소 : $title<br><br>";
?>

<table width="730" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<!--로드뷰-->
<iframe src="./shotbirdie_IP_sh_iframe1.php?latlng0=<?=$lat?>&latlng1=<?=$lng?>" frameborder="0" border="0" width="730" height="460" scrolling="no"></iframe></td>
</tr>
</table>


<?
} //end if($lng){

@include_once("$g4[path]/tail.php");
?>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 1개

게시글 목록

번호 제목
34706
34693
34563
34536
34521
34480
34479
34466
34437
34436
34435
34406
34398
34387
34382
34375
34364
34336
34294
34293