좌표&새주소 검색페이지(로드뷰 표시)
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> </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> *좌표 : lng - $lng / lat - $lat<br> *새주소 : $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");
?>
소스 바로 뿌리구요~알아서 쓰실분만 쓰시고 질문은 사절입니다~^^
$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> </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> *좌표 : lng - $lng / lat - $lat<br> *새주소 : $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개
rumi717
12년 전
감사합니다~
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3109 |
gstaron
|
12년 전 | 4784 | |
| 3108 |
|
12년 전 | 6797 | |
| 3107 | 12년 전 | 6830 | ||
| 3106 |
|
12년 전 | 8211 | |
| 3105 | 12년 전 | 6274 | ||
| 3104 | 12년 전 | 4790 | ||
| 3103 |
|
12년 전 | 4868 | |
| 3102 | 12년 전 | 3945 | ||
| 3101 | 12년 전 | 6980 | ||
| 3100 | 12년 전 | 6033 | ||
| 3099 | 12년 전 | 9971 | ||
| 3098 | 12년 전 | 3675 | ||
| 3097 |
lainfox
|
12년 전 | 4450 | |
| 3096 |
|
12년 전 | 10421 | |
| 3095 | 12년 전 | 4444 | ||
| 3094 | 12년 전 | 5103 | ||
| 3093 |
하늘바람구름
|
12년 전 | 4290 | |
| 3092 |
|
12년 전 | 8893 | |
| 3091 |
|
12년 전 | 9324 | |
| 3090 |
|
12년 전 | 6551 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기