Skip to content

Commit

Permalink
fix syntax of route linestring
Browse files Browse the repository at this point in the history
  • Loading branch information
lonvia committed Feb 7, 2014
1 parent e0b1e3b commit dbdf767
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Geocode.php
Expand Up @@ -417,11 +417,12 @@ function lookup()
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)";

Expand Down

0 comments on commit dbdf767

Please sign in to comment.