Use L.Contao as reference to the Contao integration object.

This commit is contained in:
David Molineus
2015-01-15 01:10:36 +01:00
parent 8186a0b3ee
commit 6fbc1a9bf3
5 changed files with 36 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
<div id="<?php echo $mapId; ?>" style="<?php echo $style; ?>"></div>
<?php $GLOBALS['TL_BODY'][] = <<<HTML
<script>
ContaoLeaflet.addMap('{$mapId}', function() {
L.Contao.addMap('{$mapId}', function() {
{$javascript}
return { map: map, layers: layers, controls: controls, icons: icons };
}());</script>

View File

@@ -1,4 +1,4 @@
ContaoLeaflet.addMap('<?php echo $mapId; ?>', function() {
L.Contao.addMap('<?php echo $mapId; ?>', function() {
<?php echo $javascript; ?>
return { map: map, layers: layers, controls: controls, icons: icons };