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

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

        return sprintf(
            '%s = new google.maps.KmlLayer("%s", %s);'.PHP_EOL,
            $kmlLayer->getJavascriptVariable(),
            $kmlLayer->getUrl(),
            $this->jsonBuilder->build()
        );
    }
public function render ( KMLLayer $ kmlLayer , Map $ map ) { $ this -> jsonBuilder -> reset ( ) -> setValue ( '[map]' , $ map -> getJavascriptVariable ( ) , false ) -> setValues ( $ kmlLayer -> getOptions ( ) ) ; return sprintf ( '%s = new google.maps.KmlLayer("%s", %s);' . PHP_EOL , $ kmlLayer -> getJavascriptVariable ( ) , $ kmlLayer -> getUrl ( ) , $ this -> jsonBuilder -> build ( ) ) ; }
Renders a kml layer.

@param \Ivory\GoogleMap\Layers\KMLLayer $kmlLayer The KML layer.
@param \Ivory\GoogleMap\Map             $map      The map.

@return string The JS output.
Renders a kml layer .