featureCollection->featureArray as $feature) { if (!$feature->geometry) { $e = new mb_exception("Feature doesn't have a geometry."); return null; } $geometry = $feature->geometry; $str .= $geometry->toGml3(); } return $str; } } ?>