mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
Allow option of structured search queries (params amenity,street,city,county,state,country)
This commit is contained in:
14
lib/lib.php
14
lib/lib.php
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user