echo " querystring='".htmlspecialchars($_SERVER['QUERY_STRING'], ENT_QUOTES)."'";
echo ">\n";
-if (!sizeof($aPlace)) {
+if (empty($aPlace)) {
if (isset($sError))
echo "<error>$sError</error>";
else echo '<error>Unable to geocode</error>';
}
echo '>'.htmlspecialchars($aPlace['langaddress']).'</result>';
- if (isset($aPlace['aAddress'])) {
+ if (isset($aPlace['address'])) {
echo '<addressparts>';
- foreach ($aPlace['aAddress'] as $sKey => $sValue) {
+ foreach ($aPlace['address']->getAddressNames() as $sKey => $sValue) {
$sKey = str_replace(' ', '_', $sKey);
echo "<$sKey>";
echo htmlspecialchars($sValue);