On postcode searches observe given bounded viewbox

This commit is contained in:
marc tobias
2019-04-02 14:49:31 +02:00
parent 2a4198f94d
commit c9a6350894
2 changed files with 15 additions and 0 deletions

View File

@@ -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";