X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/002c94211724e5c47471ff2475b7226f3c87b353..9ab59cdf423777105470235363919018a8cc25bb:/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)";