Allow option of structured search queries (params amenity,street,city,county,state,country)

This commit is contained in:
Brian Quinion
2012-11-02 17:52:33 +00:00
parent f87ea067ca
commit a0e39b67d5
2 changed files with 90 additions and 27 deletions

View File

@@ -890,3 +890,17 @@
return $iPlaceID;
}
function loadStructuredAddressElement(&$aStructuredQuery, &$iMinAddressRank, &$iMaxAddressRank, $aParams, $sKey, $iNewMinAddressRank, $iNewMaxAddressRank)
{
if (!isset($_GET[$sKey])) return false;
$sValue = trim($_GET[$sKey]);
if (!$sValue) return false;
$aStructuredQuery[$sKey] = $sValue;
if ($iMinAddressRank == 0 && $iMaxAddressRank == 30) {
$iMinAddressRank = $iNewMinAddressRank;
$iMaxAddressRank = $iNewMaxAddressRank;
}
return true;
}