forked from Snck3rs/contao-leaflet-maps
Implement an insert tag.
This commit is contained in:
@@ -6,11 +6,6 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="<?php echo $this->mapId; ?>" style="<?php echo $this->mapStyle; ?>"></div>
|
||||
<?php if ($this->map): ?>
|
||||
<script>
|
||||
<?php echo $this->map; ?>
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<div id="<?php echo $mapId; ?>"></div>
|
||||
<div id="<?php echo $mapId; ?>" style="<?php echo $style; ?>"></div>
|
||||
<?php $GLOBALS['TL_BODY'][] = <<<HTML
|
||||
<script>
|
||||
<?php include \Controller::getTemplate('leaflet_map_js'); ?>
|
||||
</script>
|
||||
ContaoLeaflet.addMap('{$mapId}', function() {
|
||||
{$javascript}
|
||||
return { map: map, layers: layers, controls: controls, icons: icons };
|
||||
}());</script>
|
||||
HTML;
|
||||
|
||||
Reference in New Issue
Block a user