X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1f2ee8ed77695c2e475508f961db5b37f8d83bd6..f822b04dbe7caf9794b4f206fd8b75ad0ceafd15:/lib/Geocode.php?ds=sidebyside diff --git a/lib/Geocode.php b/lib/Geocode.php index c464aeed..532a7720 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -426,11 +426,12 @@ if ($this->aRoutePoints) { $sViewboxCentreSQL = "ST_SetSRID('LINESTRING("; - $bFirst = false; - foreach($this->aRouteaPoints as $aPoint) + $bFirst = true; + foreach($this->aRoutePoints as $aPoint) { if (!$bFirst) $sViewboxCentreSQL .= ","; $sViewboxCentreSQL .= $aPoint[1].' '.$aPoint[0]; + $bFirst = false; } $sViewboxCentreSQL .= ")'::geometry,4326)";