Fix handling of inactive layers.

This commit is contained in:
David Molineus
2015-01-09 23:48:25 +01:00
parent 2201c5015e
commit 1ebd3ef49b
4 changed files with 28 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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) {