Add javscript to the footer.

This commit is contained in:
David Molineus
2014-12-29 16:39:32 +01:00
parent 1c04b0ccc3
commit 92d1a3906a

View File

@@ -52,9 +52,12 @@ class LeafletMapElement extends \ContentElement
{
try {
$mapId = 'map_' . ($this->cssID[0] ?: $this->id);
$map = $this->mapService->getJavascript($this->leaflet_map, $mapId);
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
$this->Template->mapId = $mapId;
$this->Template->map = $this->mapService->getJavascript($this->leaflet_map, $mapId);
// $this->Template->map = $map;
} catch(\Exception $e) {
throw $e;
}