fix syntax of route linestring

This commit is contained in:
Sarah Hoffmann
2014-02-07 21:31:26 +01:00
parent e0b1e3b66d
commit dbdf767030

View File

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