From: Sarah Hoffmann Date: Fri, 7 Feb 2014 20:31:26 +0000 (+0100) Subject: fix syntax of route linestring X-Git-Tag: v2.2.0~8 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/dbdf767030f1adc10e0559ac6dd3fef2b4a5ed29 fix syntax of route linestring --- diff --git a/lib/Geocode.php b/lib/Geocode.php index e3fa25b6..132be9a5 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -417,11 +417,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)";