mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-02 13:03:43 +01:00
Add option to replace default attribution control.
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Netzmacht\Contao\Leaflet\Mapper\Control;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\Control\Attribution;
|
||||
use Netzmacht\LeafletPHP\Definition\Map;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
|
||||
|
||||
/**
|
||||
@@ -61,6 +62,10 @@ class AttributionControlMapper extends AbstractControlMapper
|
||||
return;
|
||||
}
|
||||
|
||||
if ($model->disableDefault && $parent instanceof Map) {
|
||||
$parent->setAttributionControl(false);
|
||||
}
|
||||
|
||||
$attributions = deserialize($model->attributions, true);
|
||||
|
||||
foreach ($attributions as $attribution) {
|
||||
|
||||
Reference in New Issue
Block a user