]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix syntax of route linestring
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 7 Feb 2014 20:31:26 +0000 (21:31 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 7 Feb 2014 20:31:26 +0000 (21:31 +0100)
lib/Geocode.php

index e3fa25b690f63c86507522567a25f6b5a92503ec..132be9a54aa54602135d63d2a723fbf63d4f4526 100644 (file)
                        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)";