mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 03:24:37 +01:00
Add javscript to the footer.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user