public function testKmlLayer()
 {
     $kmlLayer = $this->getMock('Ivory\\GoogleMap\\Layers\\KMLLayer');
     $this->map->addKMLLayer($kmlLayer);
     $this->assertSame(array($kmlLayer), $this->map->getKMLLayers());
 }
 /**
  * Renders the javascript container KML layer.
  *
  * @param \Ivory\GoogleMap\Map $map The map.
  *
  * @return string The JS output.
  */
 public function renderJsContainerKMLLayers(Map $map)
 {
     $output = array();
     foreach ($map->getKMLLayers() as $kmlLayer) {
         $output[] = sprintf('%s.kml_layers.%s = %s', $this->getJsContainerName($map), $kmlLayer->getJavascriptVariable(), $this->kmlLayerHelper->render($kmlLayer, $map));
     }
     return implode('', $output);
 }