mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2026-10-14 06:36:03 +02:00
Pass map to child elements.
This commit is contained in:
1 parent
2dd0eb632d
commit
0c1df3b6d9
1 file changed
+2
-2
@@ -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