/** * * @param string $string * @return GMapBounds * @author fabriceb * @since Apr 21, 2010 */ public static function createFromString($string) { preg_match('/\\(\\((.*?)\\), \\((.*?)\\)\\)/', $string, $matches); if (count($matches) == 3) { $sw = GMapCoord::createFromString($matches[1]); $ne = GMapCoord::createFromString($matches[2]); if (!is_null($sw) && !is_null($ne)) { return new GMapBounds($sw, $ne); } return null; } //((48.82415805606007,%202.308330535888672),%20(48.867086142850226,%202.376995086669922)) }