diff --git a/src/Netzmacht/Contao/Leaflet/LeafletMapElement.php b/src/Netzmacht/Contao/Leaflet/LeafletMapElement.php index 7968145..212285a 100644 --- a/src/Netzmacht/Contao/Leaflet/LeafletMapElement.php +++ b/src/Netzmacht/Contao/Leaflet/LeafletMapElement.php @@ -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'][] = ''; $this->Template->mapId = $mapId; - $this->Template->map = $this->mapService->getJavascript($this->leaflet_map, $mapId); +// $this->Template->map = $map; } catch(\Exception $e) { throw $e; }