/** * Create from native array format. * * @param array $native The native boundary. * * @return LatLngBounds * * @throws \InvalidArgumentException If the array format is not supported. */ public static function fromArray(array $native) { if (!isset($native[0]) || !isset($native[1])) { throw new \InvalidArgumentException('LatLngBounds array format not supported.'); } return new static(LatLng::fromArray($native[0]), LatLng::fromArray($native[1])); }