X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2a4198f94d1c52bb7e0042cf1b4074f277538384..c9a63508943d92cfe2a1f5d2c12454662bb46770:/lib/SearchDescription.php?ds=sidebyside diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 358e6969..506d4202 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -588,6 +588,9 @@ class SearchDescription $sSQL .= "p.postcode = '".reset($this->aName)."'"; $sSQL .= $this->countryCodeSQL(' AND p.country_code'); + if ($this->oContext->bViewboxBounded) { + $sSQL .= ' AND ST_Intersects('.$this->oContext->sqlViewboxSmall.', geometry)'; + } $sSQL .= $this->oContext->excludeSQL(' AND p.place_id'); $sSQL .= " LIMIT $iLimit";