<?php	
function add_map()
{
    $lp_general = get_option('lp_general');

   if (isset($lp_general['street'])) {
   $address_street=$lp_general['street'];
   } else {
   	$address_street= "";
   }
    

    
      if (isset($lp_general['cityState'])) {
   $address_cityState=$lp_general['cityState'];
   } else {
   $address_cityState = "";
   }
    

      if (isset($lp_general['country'])) {
   $address_country=$lp_general['country'];
   } else {
    $address_country = "";
   }
    
    

     $prepAddr = str_replace(' ', '+', "'.$address_street.$address_cityState.$address_country.'");
     $geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$prepAddr.'&sensor=false');
      $output= json_decode($geocode);
    return $output;
}
?>
