Pass map to child elements.

This commit is contained in:
David Molineus
2015-01-20 17:29:10 +01:00
parent 2dd0eb632d
commit 0c1df3b6d9

View File

@@ -121,7 +121,7 @@ class MapMapper extends AbstractMapper
} }
foreach ($collection as $control) { foreach ($collection as $control) {
$control = $mapper->handle($control, $bounds); $control = $mapper->handle($control, $bounds, null, $map);
if ($control instanceof Control) { if ($control instanceof Control) {
$control->addTo($map); $control->addTo($map);
@@ -149,7 +149,7 @@ class MapMapper extends AbstractMapper
continue; continue;
} }
$layer = $mapper->handle($layer, $bounds); $layer = $mapper->handle($layer, $bounds, null, $map);
if ($layer instanceof Layer) { if ($layer instanceof Layer) {
$layer->addTo($map); $layer->addTo($map);
} }