mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-30 03:54:10 +01:00
Pass map to child elements.
This commit is contained in:
@@ -121,7 +121,7 @@ class MapMapper extends AbstractMapper
|
||||
}
|
||||
|
||||
foreach ($collection as $control) {
|
||||
$control = $mapper->handle($control, $bounds);
|
||||
$control = $mapper->handle($control, $bounds, null, $map);
|
||||
|
||||
if ($control instanceof Control) {
|
||||
$control->addTo($map);
|
||||
@@ -149,7 +149,7 @@ class MapMapper extends AbstractMapper
|
||||
continue;
|
||||
}
|
||||
|
||||
$layer = $mapper->handle($layer, $bounds);
|
||||
$layer = $mapper->handle($layer, $bounds, null, $map);
|
||||
if ($layer instanceof Layer) {
|
||||
$layer->addTo($map);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user