mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 11:04:08 +01:00
Output the map javscript in the template.
This commit is contained in:
@@ -9,4 +9,5 @@
|
||||
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php $GLOBALS['TL_BODY'][] = '<script>' . $this->javascript .'</script>'; ?>
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
|
||||
<?php $GLOBALS['TL_BODY'][] = '<script>' . $this->javascript .'</script>'; ?>
|
||||
|
||||
@@ -120,8 +120,7 @@ abstract class AbstractMapHybrid extends AbstractHybrid
|
||||
$mapId = $this->getIdentifier();
|
||||
$map = $this->mapProvider->generate($this->get('leaflet_map'), null, $mapId, $template);
|
||||
|
||||
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
|
||||
|
||||
$this->template->set('javascript', $map);
|
||||
$this->template->set('mapId', $mapId);
|
||||
|
||||
$style = '';
|
||||
|
||||
Reference in New Issue
Block a user