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) if ($this->aRoutePoints)
{ {
$sViewboxCentreSQL = "ST_SetSRID('LINESTRING("; $sViewboxCentreSQL = "ST_SetSRID('LINESTRING(";
$bFirst = false; $bFirst = true;
foreach($this->aRouteaPoints as $aPoint) foreach($this->aRoutePoints as $aPoint)
{ {
if (!$bFirst) $sViewboxCentreSQL .= ","; if (!$bFirst) $sViewboxCentreSQL .= ",";
$sViewboxCentreSQL .= $aPoint[1].' '.$aPoint[0]; $sViewboxCentreSQL .= $aPoint[1].' '.$aPoint[0];
$bFirst = false;
} }
$sViewboxCentreSQL .= ")'::geometry,4326)"; $sViewboxCentreSQL .= ")'::geometry,4326)";