Ongoing development.

This commit is contained in:
David Molineus
2015-01-05 12:25:46 +01:00
parent 74a4d79aa0
commit be9060795d
25 changed files with 472 additions and 33 deletions

View File

@@ -4,7 +4,7 @@
* Backend module.
*/
$GLOBALS['BE_MOD']['content']['leaflet'] = array(
'tables' => array('tl_leaflet_map', 'tl_leaflet_layer'),
'tables' => array('tl_leaflet_map', 'tl_leaflet_layer', 'tl_leaflet_control'),
'icon' => 'system/modules/leaflet/assets/img/leaflet.png',
'stylesheet' => 'system/modules/leaflet/assets/css/backend.css',
);
@@ -18,8 +18,9 @@ $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_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';
/*
@@ -30,6 +31,10 @@ $GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\Laye
$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\Control\ZoomControlMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\ScaleControlMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Control\LayersControlMapper';
/*
* Leaflet encoders.
@@ -50,12 +55,34 @@ $GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\RasterEncoder';
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\LeafletPHP\Encoder\VectorEncoder';
$GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\Contao\Leaflet\Subscriber\EncoderSubscriber';
$GLOBALS['LEAFLET_LAYERS'][] = 'provider';
/*
* 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);
/*
* leaflet controls.
*
* Supported leaflet control types. Register your type for the database driven definition here.
*/
$GLOBALS['LEAFLET_CONTROLS'] = array();
$GLOBALS['LEAFLET_CONTROLS'][] = 'zoom';
$GLOBALS['LEAFLET_CONTROLS'][] = 'layers';
$GLOBALS['LEAFLET_CONTROLS'][] = 'scale';
$GLOBALS['LEAFLET_CONTROLS'][] = 'attribution';
/*
* Leaflet tile layer providers.
*/
require_once __DIR__ . '/leaflet_providers.php';
require_once TL_ROOT . '/system/modules/leaflet/config/leaflet_providers.php';
/*
* Leaflet assets.