forked from Snck3rs/contao-leaflet-maps
Add more layers.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* Backend module.
|
||||
*/
|
||||
$GLOBALS['BE_MOD']['content']['leaflet'] = array(
|
||||
'tables' => array('tl_leaflet_map', 'tl_leaflet_layer', 'tl_leaflet_control'),
|
||||
'icon' => 'system/modules/leaflet/assets/img/leaflet.png',
|
||||
'tables' => array('tl_leaflet_map', 'tl_leaflet_layer', 'tl_leaflet_control', 'tl_leaflet_marker'),
|
||||
'icon' => 'system/modules/leaflet/assets/img/leaflet.png',
|
||||
'stylesheet' => 'system/modules/leaflet/assets/css/backend.css',
|
||||
);
|
||||
|
||||
@@ -21,6 +21,7 @@ $GLOBALS['TL_CTE']['includes']['leaflet'] = 'Netzmacht\Contao\Leaflet\LeafletMap
|
||||
$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_marker'] = 'Netzmacht\Contao\Leaflet\Model\MarkerModel';
|
||||
|
||||
|
||||
/*
|
||||
@@ -31,6 +32,7 @@ $GLOBALS['TL_MODELS']['tl_leaflet_control'] = 'Netzmacht\Contao\Leaflet\Model\Co
|
||||
$GLOBALS['LEAFLET_MAPPERS'] = array();
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\MapMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\ProviderLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\MarkersLayerMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\ZoomControlMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\ScaleControlMapper';
|
||||
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\LayersControlMapper';
|
||||
@@ -53,19 +55,51 @@ $GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\ControlEncoder';
|
||||
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\GroupEncoder';
|
||||
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\RasterEncoder';
|
||||
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\VectorEncoder';
|
||||
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\UIEncoder';
|
||||
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\TypeEncoder';
|
||||
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\Contao\Leaflet\Subscriber\EncoderSubscriber';
|
||||
|
||||
|
||||
/*
|
||||
* Leaflet layer types.
|
||||
*
|
||||
* The type is used for the database driven definitions.
|
||||
*/
|
||||
$GLOBALS['LEAFLET_LAYERS'] = array();
|
||||
$GLOBALS['LEAFLET_LAYERS']['default'] = array('children' => true);
|
||||
$GLOBALS['LEAFLET_LAYERS']['provider'] = array('children' => false);
|
||||
$GLOBALS['LEAFLET_LAYERS']['group'] = array('children' => true, 'geojson' => true);
|
||||
|
||||
$GLOBALS['LEAFLET_LAYERS'] = array
|
||||
(
|
||||
'default' => array
|
||||
(
|
||||
'children' => true,
|
||||
'icon' => '',
|
||||
),
|
||||
'provider' => array
|
||||
(
|
||||
'children' => false,
|
||||
'icon' => 'system/modules/leaflet/assets/img/tile.png',
|
||||
),
|
||||
'group' => array
|
||||
(
|
||||
'children' => true,
|
||||
'icon' => 'system/modules/leaflet/assets/img/group.png',
|
||||
),
|
||||
'elements' => array
|
||||
(
|
||||
'children' => true,
|
||||
'filter' => 'whitelist',
|
||||
'layers' => array('markers', 'vectors'),
|
||||
'icon' => 'system/modules/leaflet/assets/img/map.png',
|
||||
),
|
||||
'markers' => array
|
||||
(
|
||||
'children' => false,
|
||||
'icon' => 'system/modules/leaflet/assets/img/markers.png',
|
||||
'markers' => true,
|
||||
),
|
||||
'vectors' => array
|
||||
(
|
||||
'children' => false,
|
||||
'icon' => 'system/modules/leaflet/assets/img/vectors.png',
|
||||
),
|
||||
);
|
||||
|
||||
/*
|
||||
* leaflet controls.
|
||||
@@ -84,6 +118,7 @@ $GLOBALS['LEAFLET_CONTROLS'][] = 'attribution';
|
||||
*/
|
||||
require_once TL_ROOT . '/system/modules/leaflet/config/leaflet_providers.php';
|
||||
|
||||
|
||||
/*
|
||||
* Leaflet assets.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user