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)";
$aResult['aPolyPoints'][] = array($aPoint[1], $aPoint[2]);
}
}
- $aResult['aBoundingBox'] = array($aPointPolygon['minlat'],$aPointPolygon['maxlat'],$aPointPolygon['minlon'],$aPointPolygon['maxlon']);
+ $aResult['aBoundingBox'] = array((string)$aPointPolygon['minlat'],(string)$aPointPolygon['maxlat'],(string)$aPointPolygon['minlon'],(string)$aPointPolygon['maxlon']);
}
// Is there an icon set for this type of result?