<html><head>
<script type="text/javascript" src="http://api.maps.yahoo.com/v2.0/fl/javascript/apiloader.js"></script>
<style type="text/css">
#mapContainer { 
height: 600px; 
width: 800px; 

</style> 
<title>GeoCoding API Example</title>
</head><body>
<form action="/php/ymap/geo3.php" method="GET">
<input type="text" size="80" name="location" />
</form>
<?php
include './geo.inc';
if(!empty(
$_REQUEST['location'])) {
  
$a yahoo_geo($_REQUEST['location']);
  echo 
"[ {$a['Latitude']}{$a['Longitude']} ] {$a['precision']}-level coordinate accuracy<br />\n";
  
$mtitle ''
  if(!empty(
$a['Address'])) { 
    echo 
$a['Address'].', '
    
$mtitle $a['Address'];
  }
  if(!empty(
$a['City'])) {
    echo 
$a['City'].', ';
    if(!
$mtitle$mtitle $a['City'];
  }
  if(!empty(
$a['State'])) echo $a['State'].' ';
  if(!empty(
$a['Zip'])) echo $a['Zip'].' ';
  if(!empty(
$a['Country'])) echo $a['Country'].' ';
  
$info str_replace("\n",'',nl2br(print_r($a,true)));
}
?>
<div id="mapContainer"></div>
<script type="text/javascript">
var latlon = new LatLon(<?php echo $a['Latitude']?><?php echo $a['Longitude']?>);
var mymap = new Map("mapContainer", "rlerdorf", latlon, 3);
mymap.addTool( new PanTool(), true );
marker1 = new CustomPOIMarker('A','<?php echo $mtitle?>', '<?php echo $info?>', '0x0012f0', '0x88CCFF'); 
mymap.addMarkerByLatLon(marker1, latlon);
</script> 
<a href="http://developer.yahoo.net/about"> <img src="http://us.dev1.yimg.com/us.yimg.com/i/us/nt/bdg/websrv_120_1.gif" border="0"></a>
&nbsp;&nbsp;&nbsp;<a href="/php/ymap/geo3.phps">[Source Code]</a>
</body></html>