src/Helper/Base/BoundHelper.php
public function renderExtends(Bound $bound)
    {
        $output = array();

        foreach ($bound->getExtends() as $extend) {
            if (($extend instanceof Marker) || ($extend instanceof InfoWindow)) {
                $output[] = sprintf(
                    '%s.extend(%s.getPosition());'.PHP_EOL,
                    $bound->getJavascriptVariable(),
                    $extend->getJavascriptVariable()
                );
            } elseif (($extend instanceof Polyline)
                || ($extend instanceof EncodedPolyline)
                || ($extend instanceof Polygon)
            ) {
                $output[] = sprintf(
                    '%s.getPath().forEach(function(element){%s.extend(element)});'.PHP_EOL,
                    $extend->getJavascriptVariable(),
                    $bound->getJavascriptVariable()
                );
            } elseif (($extend instanceof Rectangle) || ($extend instanceof GroundOverlay)) {
                $output[] = sprintf(
                    '%s.union(%s);'.PHP_EOL,
                    $bound->getJavascriptVariable(),
                    $extend->getBound()->getJavascriptVariable()
                );
            } elseif ($extend instanceof Circle) {
                $output[] = sprintf(
                    '%s.union(%s.getBounds());'.PHP_EOL,
                    $bound->getJavascriptVariable(),
                    $extend->getJavascriptVariable()
                );
            }
        }

        return implode('', $output);
    }
public function renderExtends(Bound $bound)
    {
        $output = array();

        foreach ($bound->getExtends() as $extend) {
            if (($extend instanceof Marker) || ($extend instanceof InfoWindow)) {
                $output[] = sprintf(
                    '%s.extend(%s.getPosition());'.PHP_EOL,
                    $bound->getJavascriptVariable(),
                    $extend->getJavascriptVariable()
                );
            } elseif (($extend instanceof Polyline)
                || ($extend instanceof EncodedPolyline)
                || ($extend instanceof Polygon)
            ) {
                $output[] = sprintf(
                    '%s.getPath().forEach(function(element){%s.extend(element)});'.PHP_EOL,
                    $extend->getJavascriptVariable(),
                    $bound->getJavascriptVariable()
                );
            } elseif (($extend instanceof Rectangle) || ($extend instanceof GroundOverlay)) {
                $output[] = sprintf(
                    '%s.union(%s);'.PHP_EOL,
                    $bound->getJavascriptVariable(),
                    $extend->getBound()->getJavascriptVariable()
                );
            } elseif ($extend instanceof Circle) {
                $output[] = sprintf(
                    '%s.union(%s.getBounds());'.PHP_EOL,
                    $bound->getJavascriptVariable(),
                    $extend->getJavascriptVariable()
                );
            }
        }

        return implode('', $output);
    }
Renders the bound's extend of a marker.

@param \Ivory\GoogleMap\Base\Bound $bound The bound.

@return string The JS output.