mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-02 21:14:15 +01:00
Add javscript to the footer.
This commit is contained in:
@@ -52,9 +52,12 @@ class LeafletMapElement extends \ContentElement
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$mapId = 'map_' . ($this->cssID[0] ?: $this->id);
|
$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->mapId = $mapId;
|
||||||
$this->Template->map = $this->mapService->getJavascript($this->leaflet_map, $mapId);
|
// $this->Template->map = $map;
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user