Exemplo n.º 1
0
 public function testAsyncWithValidValue()
 {
     $this->map->setAsync(true);
     $this->assertTrue($this->map->isAsync());
 }
Exemplo n.º 2
0
 /**
  * Renders the map javascripts.
  *
  * @param \Ivory\GoogleMap\Map $map The map.
  *
  * @return string The HTML output.
  */
 public function renderJavascripts(Map $map)
 {
     $output = array();
     if (!$map->isAsync()) {
         $output[] = $this->renderJsLibraries($map);
     }
     $output[] = '<script type="text/javascript">' . PHP_EOL;
     $output[] = $this->renderJsBefore($map);
     $output[] = $this->renderJsContainer($map);
     $output[] = $this->renderJsAfter($map);
     $output[] = '</script>' . PHP_EOL;
     if ($map->isAsync()) {
         $output[] = $this->renderJsLibraries($map);
     }
     return implode('', $output);
 }
 /**
  * {@inheritdoc}
  */
 public function renderAfter(Map $map)
 {
     if ($map->isAsync()) {
         return '}' . PHP_EOL;
     }
 }
 /**
  * {@inheritdoc}
  */
 public function renderAfter(Map $map)
 {
     if ($map->isAsync()) {
         return '}' . PHP_EOL . $this->renderLibrary($this->source, $this->callback);
     }
 }