]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/lib.php
make number of polygon outputs allowed a constant
[nominatim.git] / lib / lib.php
index 1959ded3d4748738215e4349f3bb35a1aad25267..8a4918182c55ec4d36d0bec999c7e9d8e36321bc 100644 (file)
 
                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;
+        }
+