/** * Renders the decode path method. * * @param string $encodedPath The encoded path. * * @throws \Ivory\GoogleMap\Exception\HelperException If the encoded path is not valid. * * @return string The JS output. */ public function renderDecodePath($encodedPath) { if (!is_string($encodedPath)) { throw HelperException::invalidEncodedPath(); } return sprintf('google.maps.geometry.encoding.decodePath("%s")', addslashes($encodedPath)); }