Use OptionsBuilder in all mapper classes.

This commit is contained in:
David Molineus
2015-01-22 09:02:14 +01:00
parent b96cd80669
commit 52440c35dd
15 changed files with 14 additions and 99 deletions

View File

@@ -34,6 +34,6 @@ class AbstractLayerMapper extends AbstractTypeMapper
{
parent::initialize();
$this->addOption('label', 'title');
$this->optionsBuilder->addOption('label', 'title');
}
}

View File

@@ -16,7 +16,6 @@ use Netzmacht\Contao\Leaflet\Model\LayerModel;
use Netzmacht\JavascriptBuilder\Type\AnonymousFunction;
use Netzmacht\JavascriptBuilder\Type\Expression;
use Netzmacht\LeafletPHP\Definition;
use Netzmacht\LeafletPHP\Definition\HasEvents;
use Netzmacht\LeafletPHP\Definition\Layer;
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
use Netzmacht\LeafletPHP\Plugins\MarkerCluster\MarkerClusterGroup;
@@ -50,7 +49,7 @@ class MarkerClusterLayerMapper extends AbstractLayerMapper
{
parent::initialize();
$this
$this->optionsBuilder
->addOptions('showCoverageOnHover', 'zoomToBoundsOnClick', 'spiderfyOnMaxZoom')
->addOption('removeOutsideVisibleBounds')
->addConditionalOption('maxClusterRadius')