diff --git a/module/assets/js/contao-leaflet.js b/module/assets/js/contao-leaflet.js index 7eb75f6..a678a6a 100644 --- a/module/assets/js/contao-leaflet.js +++ b/module/assets/js/contao-leaflet.js @@ -3,6 +3,8 @@ L.Contao = L.Class.extend( { maps: {}, + icons: {}, + addMap: function (id, map) { this.maps[id] = map; @@ -19,9 +21,32 @@ L.Contao = L.Class.extend( { return this.maps[id]; }, + addIcon: function(id, icon) { + this.icons[id] = icon; + this.fire('icon:added', { id: id, icon: icon}); + + return this; + }, + + getIcon: function(id) { + if (typeof (this.icons[id]) === 'undefined') { + return null; + } + + return this.icons[id]; + }, + pointToLayer: function(feature, latlng) { var marker = L.marker(latlng, feature.properties.options); + if (feature.properties && feature.properties.icon) { + var icon = this.getIcon(feature.properties.icon); + + if (icon) { + marker.setIcon(icon); + } + } + this.applyFeatureMethods(marker, feature); this.fire('marker:created', { marker: marker, feature: feature, latlng: latlng }); diff --git a/module/config/config.php b/module/config/config.php index 959619f..da37800 100644 --- a/module/config/config.php +++ b/module/config/config.php @@ -25,9 +25,10 @@ $GLOBALS['TL_CTE']['includes']['leaflet'] = 'Netzmacht\Contao\Leaflet\LeafletMap /* * Models. */ -$GLOBALS['TL_MODELS']['tl_leaflet_map'] = 'Netzmacht\Contao\Leaflet\Model\MapModel'; -$GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\LayerModel'; $GLOBALS['TL_MODELS']['tl_leaflet_control'] = 'Netzmacht\Contao\Leaflet\Model\ControlModel'; +$GLOBALS['TL_MODELS']['tl_leaflet_icon'] = 'Netzmacht\Contao\Leaflet\Model\IconModel'; +$GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\LayerModel'; +$GLOBALS['TL_MODELS']['tl_leaflet_map'] = 'Netzmacht\Contao\Leaflet\Model\MapModel'; $GLOBALS['TL_MODELS']['tl_leaflet_marker'] = 'Netzmacht\Contao\Leaflet\Model\MarkerModel'; @@ -45,6 +46,7 @@ $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\ScaleCo $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\LayersControlMapper'; $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\AttributionControlMapper'; $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\UI\MarkerMapper'; +$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Type\ImageIconMapper'; /* * Leaflet encoders. @@ -121,6 +123,7 @@ $GLOBALS['LEAFLET_CONTROLS'][] = 'layers'; $GLOBALS['LEAFLET_CONTROLS'][] = 'scale'; $GLOBALS['LEAFLET_CONTROLS'][] = 'attribution'; +$GLOBALS['LEAFLET_ICONS'] = array('image', 'div'); /* * Leaflet tile layer providers. diff --git a/module/dca/tl_leaflet_icon.php b/module/dca/tl_leaflet_icon.php index 187b0f1..2e19062 100644 --- a/module/dca/tl_leaflet_icon.php +++ b/module/dca/tl_leaflet_icon.php @@ -5,7 +5,6 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array 'config' => array( 'dataContainer' => 'Table', 'enableVersioning' => true, - 'ptable' => 'tl_leaflet_layer', 'sql' => array ( 'keys' => array @@ -23,12 +22,11 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array 'fields' => array('title'), 'flag' => 1, 'headerFields' => array('title', 'type'), - 'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'generateRow'), ), 'label' => array ( - 'fields' => array('title'), - 'format' => '%s', + 'fields' => array('title', 'type'), + 'format' => '%s [%s]', ), 'global_operations' => array ( @@ -87,23 +85,32 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array ) ), + 'palettes' => array( + '__selector__' => array('type') + ), + 'metapalettes' => array( 'default' => array( 'title' => array('title', 'alias', 'type'), - 'content' => array('tooltip', 'alt',), + ), + 'image extends default' => array( 'config' => array( - ':hide', - 'iconUrl', - 'iconRetinaUrl', + '', + 'iconImage', + 'iconRetinaImage', 'iconAnchor', 'popupAnchor', 'iconClassName', + ), + 'shadow' => array( 'shadowImage', 'shadowRetinaImage', 'shadowAnchor', ), - 'active' => array('active') - ), + 'active' => array( + 'active' + ) + ) ), 'fields' => array @@ -136,6 +143,22 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''" ), + 'type' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['type'], + 'exclude' => true, + 'inputType' => 'select', + 'eval' => array( + 'mandatory' => true, + 'tl_class' => 'w50', + 'includeBlankOption' => true, + 'submitOnChange' => true, + 'chosen' => true, + ), + 'options' => &$GLOBALS['LEAFLET_ICONS'], + 'reference' => &$GLOBALS['TL_LANG']['leaflet_icon'], + 'sql' => "varchar(32) NOT NULL default ''" + ), 'active' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['active'], @@ -144,58 +167,58 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''" ), - 'iconUrl' => array + 'iconImage' => array ( - 'label' => &$GLOBALS['TL_LANG']['tl_content']['iconUrl'], + 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array( 'filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => true, - 'tl_class' => 'clr w50', + 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg' ), 'sql' => "binary(16) NULL", ), - 'iconRetinaUrl' => array + 'iconRetinaImage' => array ( - 'label' => &$GLOBALS['TL_LANG']['tl_content']['iconRetinaUrl'], + 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['iconRetinaImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array( 'filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => false, - 'tl_class' => 'w50', + 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg' ), 'sql' => "binary(16) NULL", ), 'shadowImage' => array ( - 'label' => &$GLOBALS['TL_LANG']['tl_content']['shadowImage'], + 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array( 'filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => false, - 'tl_class' => 'clr w50', + 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg' ), 'sql' => "binary(16) NULL", ), 'shadowRetinaImage' => array ( - 'label' => &$GLOBALS['TL_LANG']['tl_content']['shadowRetinaImage'], + 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['shadowRetinaImage'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array( 'filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => false, - 'tl_class' => 'w50', + 'tl_class' => 'clr', 'extensions' => 'gif,png,svg,jpg' ), 'sql' => "binary(16) NULL", diff --git a/module/dca/tl_leaflet_marker.php b/module/dca/tl_leaflet_marker.php index 328d1a9..5074968 100644 --- a/module/dca/tl_leaflet_marker.php +++ b/module/dca/tl_leaflet_marker.php @@ -84,7 +84,6 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array 'default' => array( 'title' => array('title', 'alias', 'coordinates'), 'content' => array('tooltip', 'alt', 'addPopup'), - 'icon' => array(':hide', 'customIcon'), 'config' => array( ':hide', 'clickable', @@ -93,23 +92,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array 'zIndexOffset', 'opacity', 'riseOnHover', - 'riseOffset' + 'riseOffset', + 'customIcon', ), 'active' => array('active') ), ), 'metasubpalettes' => array( 'addPopup' => array('popupContent'), - 'customIcon' => array( - 'icon', - 'retinaIcon', - 'iconAnchor', - 'popupAnchor', - 'iconClassName', - 'shadowImage', - 'shadowRetinaImage', - 'shadowAnchor', - ) + 'customIcon' => array('icon') ), 'fields' => array @@ -206,64 +197,20 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon'], 'exclude' => true, 'inputType' => 'checkbox', - 'eval' => array('tl_class' => 'w50', 'submitOnChange' => true), + 'eval' => array('tl_class' => 'clr w50 m12', 'submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''" ), 'icon' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_content']['icon'], 'exclude' => true, - 'inputType' => 'fileTree', + 'inputType' => 'select', + 'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'getIcons'), 'eval' => array( - 'filesOnly' => true, - 'fieldType' => 'radio', 'mandatory' => true, - 'tl_class' => 'clr w50', - 'extensions' => 'gif,png,svg,jpg' - ), - 'sql' => "binary(16) NULL", - ), - 'retinaIcon' => array - ( - 'label' => &$GLOBALS['TL_LANG']['tl_content']['retinaIcon'], - 'exclude' => true, - 'inputType' => 'fileTree', - 'eval' => array( - 'filesOnly' => true, - 'fieldType' => 'radio', - 'mandatory' => false, 'tl_class' => 'w50', - 'extensions' => 'gif,png,svg,jpg' ), - 'sql' => "binary(16) NULL", - ), - 'shadowImage' => array - ( - 'label' => &$GLOBALS['TL_LANG']['tl_content']['shadowImage'], - 'exclude' => true, - 'inputType' => 'fileTree', - 'eval' => array( - 'filesOnly' => true, - 'fieldType' => 'radio', - 'mandatory' => false, - 'tl_class' => 'clr w50', - 'extensions' => 'gif,png,svg,jpg' - ), - 'sql' => "binary(16) NULL", - ), - 'shadowRetinaImage' => array - ( - 'label' => &$GLOBALS['TL_LANG']['tl_content']['shadowRetinaImage'], - 'exclude' => true, - 'inputType' => 'fileTree', - 'eval' => array( - 'filesOnly' => true, - 'fieldType' => 'radio', - 'mandatory' => false, - 'tl_class' => 'w50', - 'extensions' => 'gif,png,svg,jpg' - ), - 'sql' => "binary(16) NULL", + 'sql' => "int(10) unsigned NOT NULL default '0'", ), 'draggable' => array ( @@ -301,58 +248,5 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array 'eval' => array('mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'clr w50'), 'sql' => "int(4) NOT NULL default '0'" ), - 'iconAnchor' => array - ( - 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['iconAnchor'], - 'exclude' => true, - 'inputType' => 'text', - 'save_callback' => array( - array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate') - ), - 'eval' => array( - 'maxlength' => 255, - 'tl_class' => 'w50', - 'nullIfEmpty' => true, - ), - 'sql' => "varchar(255) NULL" - ), - 'shadowAnchor' => array - ( - 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['shadowAnchor'], - 'exclude' => true, - 'inputType' => 'text', - 'save_callback' => array( - array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate') - ), - 'eval' => array( - 'maxlength' => 255, - 'tl_class' => 'w50', - 'nullIfEmpty' => true, - ), - 'sql' => "varchar(255) NULL" - ), - 'popupAnchor' => array - ( - 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupAnchor'], - 'exclude' => true, - 'inputType' => 'text', - 'save_callback' => array( - array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate') - ), - 'eval' => array( - 'maxlength' => 255, - 'tl_class' => 'w50', - 'nullIfEmpty' => true, - ), - 'sql' => "varchar(255) NULL" - ), - 'iconClassName' => array - ( - 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['iconClassName'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), - 'sql' => "varchar(255) NOT NULL default ''" - ), ), ); diff --git a/module/languages/en/tl_leaflet_icon.php b/module/languages/en/tl_leaflet_icon.php new file mode 100644 index 0000000..422228e --- /dev/null +++ b/module/languages/en/tl_leaflet_icon.php @@ -0,0 +1,29 @@ + 'title')); + $builder = OptionsBuilder::fromCollection( + $collection, 'id', + function($model) { + return sprintf('%s [%s]', $model['title'], $model['type']); + } + ); + + return $builder->getOptions(); + } + } diff --git a/src/Netzmacht/Contao/Leaflet/Mapper/Type/AbstractIconMapper.php b/src/Netzmacht/Contao/Leaflet/Mapper/Type/AbstractIconMapper.php new file mode 100644 index 0000000..3b0aa85 --- /dev/null +++ b/src/Netzmacht/Contao/Leaflet/Mapper/Type/AbstractIconMapper.php @@ -0,0 +1,25 @@ + + * @copyright 2015 netzmacht creative David Molineus + * @license LGPL 3.0 + * @filesource + * + */ + +namespace Netzmacht\Contao\Leaflet\Mapper\Type; + + +use Netzmacht\Contao\Leaflet\Mapper\AbstractTypeMapper; + +class AbstractIconMapper extends AbstractTypeMapper +{ + /** + * Class of the model being build. + * + * @var string + */ + protected static $modelClass = 'Netzmacht\Contao\Leaflet\Model\IconModel'; +} diff --git a/src/Netzmacht/Contao/Leaflet/Mapper/Type/ImageIconMapper.php b/src/Netzmacht/Contao/Leaflet/Mapper/Type/ImageIconMapper.php new file mode 100644 index 0000000..6bccafd --- /dev/null +++ b/src/Netzmacht/Contao/Leaflet/Mapper/Type/ImageIconMapper.php @@ -0,0 +1,132 @@ + + * @copyright 2015 netzmacht creative David Molineus + * @license LGPL 3.0 + * @filesource + * + */ + +namespace Netzmacht\Contao\Leaflet\Mapper\Type; + + +use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper; +use Netzmacht\Contao\Leaflet\Model\IconModel; +use Netzmacht\LeafletPHP\Definition; +use Netzmacht\LeafletPHP\Definition\Type\Icon; +use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds; + +class ImageIconMapper extends AbstractIconMapper +{ + /** + * Class of the definition being created. + * + * @var string + */ + protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Type\Icon'; + + /** + * Layer type. + * + * @var string + */ + protected static $type = 'image'; + + protected function buildConstructArguments(\Model $model, DefinitionMapper $mapper, LatLngBounds $bounds = null) + { + $arguments = parent::buildConstructArguments($model, $mapper, $bounds); + + if ($model->iconImage) { + $file = \FilesModel::findByUuid($model->iconImage); + + if ($file) { + $arguments[] = $file->path; + } + } + + return $arguments; + } + + + protected function doBuild( + Definition $definition, + \Model $model, + DefinitionMapper $mapper, + LatLngBounds $bounds = null + ) { + if ($definition instanceof Icon) { + $this->addIcon($definition, $model); + $this->addShadow($definition, $model); + } + } + + /** + * @param Icon $definition + * @param IconModel $model + */ + private function addIcon(Icon $definition, IconModel $model) + { + if ($model->iconImage) { + $file = \FilesModel::findByUuid($model->iconImage); + + if ($file) { + $definition->setIconUrl($file->path); + + $file = new \File($file->path); + $definition->setIconSize(array($file->width, $file->height)); + + if (!$model->iconAnchor) { + $definition->setIconAnchor(array($file->width / 2, $file->height)); + } + + if (!$model->popupAnchor) { + $definition->setPopupAnchor(array(0, 10 - $file->height)); + } + } + } + + if ($model->iconAnchor) { + $definition->setIconAnchor(array_map('intval', explode(',', $model->iconAnchor))); + } + + if ($model->iconRetinaImage) { + $file = \FilesModel::findByUuid($model->iconRetinaImage); + + if ($file) { + $definition->setIconRetinaUrl($file->path); + } + } + } + + private function addShadow(Icon $definition, $model) + { + if ($model->shadowImage) { + $file = \FilesModel::findByUuid($model->shadowImage); + + if ($file) { + $definition->setShadowUrl($file->path); + + $file = new \File($file->path); + $definition->setShadowSize(array($file->width, $file->height)); + + if (!$model->shadowAnchor) { + $definition->setShadowAnchor(array($file->width / 2, $file->height)); + } + } + } + + if ($model->shadowAnchor) { + $definition->setShadowAnchor(array_map('intval', explode(',', $model->shadowAnchor))); + } + + if ($model->shadowRetinaImage) { + $file = \FilesModel::findByUuid($model->shadowRetinaImage); + + if ($file) { + $definition->setShadowRetinaUrl($file->path); + } + } + } +} diff --git a/src/Netzmacht/Contao/Leaflet/Mapper/UI/MarkerMapper.php b/src/Netzmacht/Contao/Leaflet/Mapper/UI/MarkerMapper.php index 6ad46a2..7bc8112 100644 --- a/src/Netzmacht/Contao/Leaflet/Mapper/UI/MarkerMapper.php +++ b/src/Netzmacht/Contao/Leaflet/Mapper/UI/MarkerMapper.php @@ -14,7 +14,9 @@ namespace Netzmacht\Contao\Leaflet\Mapper\UI; use Netzmacht\Contao\Leaflet\Mapper\AbstractMapper; use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper; +use Netzmacht\Contao\Leaflet\Model\IconModel; use Netzmacht\LeafletPHP\Definition; +use Netzmacht\LeafletPHP\Definition\Type\Icon; use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds; use Netzmacht\LeafletPHP\Definition\UI\Marker; @@ -69,6 +71,20 @@ class MarkerMapper extends AbstractMapper if ($model->addPopup) { $definition->bindPopup($model->popupContent); } + + if ($model->customIcon) { + $iconModel = IconModel::findBy( + array('id=?', 'active=1'), + array($model->icon), + array('return' => 'Model') + ); + + if ($iconModel) { + /** @var Icon $icon */ + $icon = $builder->handle($iconModel); + $definition->setIcon($icon); + } + } } } } diff --git a/src/Netzmacht/Contao/Leaflet/Model/IconModel.php b/src/Netzmacht/Contao/Leaflet/Model/IconModel.php new file mode 100644 index 0000000..cae83a9 --- /dev/null +++ b/src/Netzmacht/Contao/Leaflet/Model/IconModel.php @@ -0,0 +1,24 @@ + + * @copyright 2015 netzmacht creative David Molineus + * @license LGPL 3.0 + * @filesource + * + */ + +namespace Netzmacht\Contao\Leaflet\Model; + + +/** + * @property mixed|null iconImage + * @property mixed|null iconAnchor + * @property mixed|null popupAnchor + * @property mixed|null iconRetinaImage + */ +class IconModel extends \Model +{ + protected static $strTable = 'tl_leaflet_icon'; +} diff --git a/src/Netzmacht/Contao/Leaflet/Subscriber/BootSubscriber.php b/src/Netzmacht/Contao/Leaflet/Subscriber/BootSubscriber.php index c94b033..da58151 100644 --- a/src/Netzmacht/Contao/Leaflet/Subscriber/BootSubscriber.php +++ b/src/Netzmacht/Contao/Leaflet/Subscriber/BootSubscriber.php @@ -16,6 +16,11 @@ use Netzmacht\Contao\Leaflet\Event\GetJavascriptEvent; use Netzmacht\Contao\Leaflet\Event\InitializeDefinitionMapperEvent; use Netzmacht\Contao\Leaflet\Event\InitializeEventDispatcherEvent; use Netzmacht\Contao\Leaflet\Event\InitializeLeafletBuilderEvent; +use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper; +use Netzmacht\Contao\Leaflet\Model\IconModel; +use Netzmacht\Javascript\Output; +use Netzmacht\LeafletPHP\Definition\Type\Icon; +use Netzmacht\LeafletPHP\Leaflet; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** @@ -34,7 +39,7 @@ class BootSubscriber implements EventSubscriberInterface InitializeDefinitionMapperEvent::NAME => 'initializeDefinitionMapper', InitializeEventDispatcherEvent::NAME => 'initializeEventDispatcher', InitializeLeafletBuilderEvent::NAME => 'initializeLeafletBuilder', - GetJavascriptEvent::NAME => 'loadAssets' + GetJavascriptEvent::NAME => array(array('loadAssets'), array('loadIcons')), ); } @@ -114,4 +119,43 @@ class BootSubscriber implements EventSubscriberInterface { $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/leaflet/assets/js/contao-leaflet.js|static'; } + + /** + * Load icons. + * + * @throws \Netzmacht\Javascript\Exception\EncodeValueFailed + */ + public function loadIcons() + { + $collection = IconModel::findBy('active', true); + + if ($collection) { + /** @var DefinitionMapper $mapper */ + $buffer = ''; + $mapper = $GLOBALS['container']['leaflet.definition.mapper']; + /** @var Leaflet $builder */ + $builder = $GLOBALS['container']['leaflet.definition.builder']; + $encoder = $builder->getBuilder()->getEncoder(); + + foreach ($collection as $model) { + /** @var Icon $icon */ + $icon = $mapper->handle($model); + + $buffer .= sprintf( + 'ContaoLeaflet.addIcon(\'%s\', L.icon(%s));' . "\n", + $model->alias ?: ('icon_' . $model->id), + $encoder->encodeValue($icon->getOptions()) + ); + } + + if ($buffer) { + $file = new \File('assets/leaflet/js/icons.js'); + $file->write($buffer); + $file->close(); + + // TODO: Cache it. + $GLOBALS['TL_JAVASCRIPT'][] = 'assets/leaflet/js/icons.js|static'; + } + } + } }