Ongoing development.

This commit is contained in:
David Molineus
2014-12-29 16:23:08 +01:00
parent e5d11e8ed6
commit ee9d293d2e
8 changed files with 60 additions and 20 deletions

View File

@@ -4,7 +4,7 @@
* Backend module.
*/
$GLOBALS['BE_MOD']['content']['leaflet'] = array(
'tables' => array('tl_leaflet_map'),
'tables' => array('tl_leaflet_map', 'tl_leaflet_layer'),
'icon' => 'system/modules/leaflet/assets/img/leaflet.png',
);
@@ -17,7 +17,8 @@ $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_map'] = 'Netzmacht\Contao\Leaflet\Model\MapModel';
$GLOBALS['TL_MODELS']['tl_leaflet_layer'] = 'Netzmacht\Contao\Leaflet\Model\LayerModel';
/*
@@ -27,7 +28,7 @@ $GLOBALS['TL_MODELS']['tl_leaflet_map'] = 'Netzmacht\Contao\Leaflet\Model\MapMod
*/
$GLOBALS['LEAFLET_MAPPERS'] = array();
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\MapMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Layer\ProviderLayerMapper';
/*
* Leaflet encoders.
@@ -48,6 +49,12 @@ $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 tile layer providers.
*/
require_once __DIR__ . '/leaflet_providers.php';
/*
* Leaflet assets.
@@ -60,17 +67,17 @@ $GLOBALS['LEAFLET_ENCODERS'][] = 'Netzmacht\Contao\Leaflet\Subscriber\EncoderSub
* - file: An file path relative to the Contao Root.
* - source: Inline css/javascript.
*/
$GLOBALS['LEAFLET_ASSETS']['contao'] = array(
$GLOBALS['LEAFLET_ASSETS']['leaflet'] = array(
'css' => array(
array('system/modules/leaflet/assets/leaflet/leaflet/leaflet.css', 'file')
),
'javascript' => array(
array()
array('system/modules/leaflet/assets/leaflet/leaflet/leaflet.js', 'file')
)
);
$GLOBALS['LEAFLET_ASSETS']['leaflet'] = array(
'css' => array(
array('http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css', 'url')
),
$GLOBALS['LEAFLET_ASSETS']['leaflet-providers'] = array(
'javascript' => array(
array('http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js?3', 'url')
array('system/modules/leaflet/assets/leaflet/leaflet-providers/leaflet-providers.js', 'file')
)
);