featureArray, $aFeature); } public function toGeoJSON () { $str = ""; $str .= "{\"type\": \"FeatureCollection\", \"features\": ["; $len = count($this->featureArray); if ($len > 0) { for ($i=0; $i < $len; $i++) { if ($i > 0) { $str .= ","; } $str .= $this->featureArray[$i]->toGeoJSON(); } } $str .= "]}"; return $str; } /** * * * * * */ public function getBbox () { if (!is_array($this->featureArray) || count($this->featureArray) === 0) { return null; } $bBoxArray = array(); for ($i = 0; $i < count($this->featureArray);$i++) { $currentBbox = $this->featureArray[$i]->getBbox(); if(!is_null($currentBbox)) { $bBoxArray[] = $currentBbox; } } return Mapbender_bbox::union($bBoxArray); } public function getFeatureMemberCount () { return count($this->featureArray); } } ?>