]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / Geocode.php
index b9e26f0381dc9aef3055ebcdc28a8ffd15b637df..1dd5a0e5ea3dd484d963d362959d2aafeae369c1 100644 (file)
@@ -18,7 +18,7 @@ class Geocode
     protected $aLangPrefOrder = array();
 
     protected $aExcludePlaceIDs = array();
-    protected $bReverseInPlan = false;
+    protected $bReverseInPlan = true;
 
     protected $iLimit = 20;
     protected $iFinalLimit = 10;
@@ -149,6 +149,10 @@ class Geocode
 
     private function viewboxImportanceFactor($fX, $fY)
     {
+        if (!$this->aViewBox) {
+            return 1;
+        }
+
         $fWidth = ($this->aViewBox[2] - $this->aViewBox[0])/2;
         $fHeight = ($this->aViewBox[3] - $this->aViewBox[1])/2;