Array ( [lon] => -106.374 [lat] => 39.6403 )
stdClass Object ( [results] => Array ( [0] => stdClass Object ( [address_components] => Array ( [0] => stdClass Object ( [long_name] => Vail [short_name] => Vail [types] => Array ( [0] => locality [1] => political ) ) [1] => stdClass Object ( [long_name] => Eagle County [short_name] => Eagle County [types] => Array ( [0] => administrative_area_level_2 [1] => political ) ) [2] => stdClass Object ( [long_name] => Colorado [short_name] => CO [types] => Array ( [0] => administrative_area_level_1 [1] => political ) ) [3] => stdClass Object ( [long_name] => United States [short_name] => US [types] => Array ( [0] => country [1] => political ) ) ) [formatted_address] => Vail, CO, USA [geometry] => stdClass Object ( [bounds] => stdClass Object ( [northeast] => stdClass Object ( [lat] => 39.6522939 [lng] => -106.2797469 ) [southwest] => stdClass Object ( [lat] => 39.6146279 [lng] => -106.4407729 ) ) [location] => stdClass Object ( [lat] => 39.6402638 [lng] => -106.3741955 ) [location_type] => APPROXIMATE [viewport] => stdClass Object ( [northeast] => stdClass Object ( [lat] => 39.6522939 [lng] => -106.2797469 ) [southwest] => stdClass Object ( [lat] => 39.6146279 [lng] => -106.4407729 ) ) ) [types] => Array ( [0] => locality [1] => political ) ) ) [status] => OK )
<?php
include_once("../include/GoogleMap.php");
include_once("../include/JSMin.php");
$MAP_OBJECT = new GoogleMapAPI();
$MAP_OBJECT->_minify_js = isset($_REQUEST["min"])?FALSE:TRUE;
//setDSN is optional
$MAP_OBJECT->setDSN("mysql://user:[email protected]/db_name");
$geocodes = $MAP_OBJECT->getGeoCode("Vail, CO");
$geocodes_full = $MAP_OBJECT->geoGetCoordsFull("Vail, CO");
?>
<html>
<head>
</head>
<body onLoad="">
<h2>Cached response:</h2>
<pre><?=print_r($geocodes,true)?></pre>
<h2>Full response:</h2>
<pre><?=print_r($geocodes_full,true)?></pre>
</body>
</html>