Пример #1
0
<?
  header ('Content-Type: text/xml; charset=utf-8'); 
  echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
?>
<?

include "NaverMap.php";
include "SeoulBus.php";

$type = $_GET["type"];
$pubtype = $_GET["pubtype"];

$naverMap = new NaverMap();
$seoulBus = new SeoulBus();
$BusList = array();

//1.주변의 버스 정류장을 찾는다.
if($type == "1")	
{
	$x = $_GET["x"];
	$y = $_GET["y"];

	$naverMap->FindBusStop($x,$y,500);	
	$naverMap->printBusStop();
}
else if($type == "2")
{
	$x = $_GET["x"];
	$y = $_GET["y"];
	$x1 = $_GET["x1"];
	$y1 = $_GET["y1"];
Пример #2
0
	   		die('<item><name>주변의 음식점이 없습니다.</name><longitude></longitude><latitude></latitude><addr></addr><phone></phone><category></category><des></des><id></id><bad></bad></item></result>');
		}
		foreach($this->result as $item)
		{
		    echo '<item>';
		    echo '<name>'.htmlspecialchars($item->name).'</name>';
 		    echo '<longitude>'.$item->x.'</longitude>';
		    echo '<latitude>'.$item->y.'</latitude>';		    
		    $foodStoreInfo = $this->getSiteInfo($item->comID);
			echo '<addr>'.$foodStoreInfo->addr.'</addr>';
			echo '<phone>'.$foodStoreInfo->phone.'</phone>';
			echo '<category>'.$foodStoreInfo->category.'</category>';
			echo '<des>'.$foodStoreInfo->des.'</des>';
		    echo '<bad>'.$item->bad.'</bad>';
    		echo '</item>';
    	}

	}
}

$naverMap = new NaverMap();

//Get data from Naver Map

$xpos = $_GET['xPos'];
$ypos = $_GET['yPos'];

$addr = $naverMap->GetAddress($xpos,$ypos);
$naverMap->GetFoodStore($xpos,$ypos,$addr);
$naverMap->printFoodStore();