public function render(Rectangle $rectangle, Map $map)
    {
        $this->jsonBuilder
            ->reset()
            ->setValue('[map]', $map->getJavascriptVariable(), false)
            ->setValue('[bounds]', $rectangle->getBound()->getJavascriptVariable(), false)
            ->setValues($rectangle->getOptions());

        return sprintf(
            '%s = new google.maps.Rectangle(%s);'.PHP_EOL,
            $rectangle->getJavascriptVariable(),
            $this->jsonBuilder->build()
        );
    }
public function render(Rectangle $rectangle, Map $map)
    {
        $this->jsonBuilder
            ->reset()
            ->setValue('[map]', $map->getJavascriptVariable(), false)
            ->setValue('[bounds]', $rectangle->getBound()->getJavascriptVariable(), false)
            ->setValues($rectangle->getOptions());

        return sprintf(
            '%s = new google.maps.Rectangle(%s);'.PHP_EOL,
            $rectangle->getJavascriptVariable(),
            $this->jsonBuilder->build()
        );
    }
public function render ( Rectangle $ rectangle , Map $ map ) { $ this -> jsonBuilder -> reset ( ) -> setValue ( '[map]' , $ map -> getJavascriptVariable ( ) , false ) -> setValue ( '[bounds]' , $ rectangle -> getBound ( ) -> getJavascriptVariable ( ) , false ) -> setValues ( $ rectangle -> getOptions ( ) ) ; return sprintf ( '%s = new google.maps.Rectangle(%s);' . PHP_EOL , $ rectangle -> getJavascriptVariable ( ) , $ this -> jsonBuilder -> build ( ) ) ; }
Renders a rectangle.

@param \Ivory\GoogleMap\Overlays\Rectangle $rectangle The rectangle.
@param \Ivory\GoogleMap\Map                $map       The map.

@return string The JS output.
Renders a rectangle .