mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 20:43:52 +01:00
Pass map to child elements.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user