From f0832388feb4d58e2cfc0c80442b31adc4ff4221 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 19 Jan 2015 12:58:16 +0100 Subject: [PATCH] Change addTo map behaviour. --- src/Netzmacht/Contao/Leaflet/Mapper/MapMapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Netzmacht/Contao/Leaflet/Mapper/MapMapper.php b/src/Netzmacht/Contao/Leaflet/Mapper/MapMapper.php index 4da06bb..da2a7a2 100644 --- a/src/Netzmacht/Contao/Leaflet/Mapper/MapMapper.php +++ b/src/Netzmacht/Contao/Leaflet/Mapper/MapMapper.php @@ -118,7 +118,7 @@ class MapMapper extends AbstractMapper $control = $mapper->handle($control, $bounds); if ($control instanceof Control) { - $map->addControl($control); + $control->addTo($map); } } } @@ -145,7 +145,7 @@ class MapMapper extends AbstractMapper $layer = $mapper->handle($layer, $bounds); if ($layer instanceof Layer) { - $map->addLayer($layer); + $layer->addTo($map); } } }