mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 20:43:52 +01:00
Fix handling of inactive layers.
This commit is contained in:
@@ -47,7 +47,7 @@ class LayersControlMapper extends AbstractControlMapper
|
||||
$arguments[2] = array();
|
||||
|
||||
/** @var ControlModel $model */
|
||||
$collection = $model->findLayers();
|
||||
$collection = $model->findActiveLayers();
|
||||
|
||||
if ($collection) {
|
||||
foreach ($collection as $layer) {
|
||||
|
||||
@@ -127,7 +127,7 @@ class MapMapper extends AbstractMapper
|
||||
*/
|
||||
private function buildLayers(Map $map, MapModel $model, DefinitionMapper $mapper, LatLngBounds $bounds = null)
|
||||
{
|
||||
$collection = $model->findLayers();
|
||||
$collection = $model->findActiveLayers();
|
||||
|
||||
if ($collection) {
|
||||
foreach ($collection as $layer) {
|
||||
|
||||
Reference in New Issue
Block a user