Permalink
Browse files

fix syntax of route linestring

  • Loading branch information...
1 parent e0b1e3b commit dbdf767030f1adc10e0559ac6dd3fef2b4a5ed29 @lonvia lonvia committed Feb 7, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Geocode.php
View
@@ -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)";

0 comments on commit dbdf767

Please sign in to comment.