Bugfixes.

This commit is contained in:
David Molineus
2016-11-09 11:23:26 +01:00
parent cba8939843
commit 422433bc52
4 changed files with 23 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

View File

@@ -271,6 +271,10 @@ $GLOBALS['LEAFLET_LAYERS'] = array
'children' => false,
'icon' => 'system/modules/leaflet/assets/img/tile.png',
),
'overpass' => array(
'children' => false,
'icon' => 'system/modules/leaflet/assets/img/overpass.png',
),
);
/*

View File

@@ -792,9 +792,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime'],
'exclude' => true,
'inputType' => 'text',
'default' => null,
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true),
'sql' => "int(9) NOT NULL default '0'"
'default' => 0,
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'),
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'overpassQuery' => array
(
@@ -815,7 +815,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint'],
'exclude' => true,
'inputType' => 'text',
'default' => null,
'default' => '',
'eval' => array('tl_class' => 'long'),
'sql' => "varchar(255) NOT NULL default ''"
),
@@ -850,7 +850,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessage'],
'exclude' => true,
'inputType' => 'text',
'default' => null,
'default' => '',
'eval' => array('tl_class' => 'long'),
'sql' => "varchar(255) NOT NULL default ''"
),
@@ -859,7 +859,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessageNoLayer'],
'exclude' => true,
'inputType' => 'text',
'default' => null,
'default' => '',
'eval' => array('tl_class' => 'long'),
'sql' => "varchar(255) NOT NULL default ''"
),

View File

@@ -31,6 +31,13 @@ class OverpassLayerMapper extends AbstractLayerMapper
*/
protected static $type = 'overpass';
/**
* The definition class.
*
* @var string
*/
protected static $definitionClass = 'Netzmacht\LeafletPHP\Plugins\OverpassLayer\OverpassLayer';
/**
* {@inheritdoc}
*/
@@ -39,9 +46,9 @@ class OverpassLayerMapper extends AbstractLayerMapper
parent::initialize();
$this->optionsBuilder
->addOption('overpassQuery', 'query')
->addConditionalOption('minZoom')
->addConditionalOption('overpassEndpoint', 'endpoint');
->addOption('query', 'overpassQuery')
->addOption('minzoom', 'minZoom')
->addOption('overpassEndpoint', 'endpoint');
}
/**
@@ -61,9 +68,9 @@ class OverpassLayerMapper extends AbstractLayerMapper
$minZoomIndicatorOptions = $definition->getMinZoomIndicatorOptions();
$minZoomIndicatorOptionsBuilder = new OptionsBuilder();
$minZoomIndicatorOptionsBuilder
->addConditionalOption('minZoomIndicatorPosition', 'position')
->addConditionalOption('minZoomIndicatorMessageNoLayer', 'minZoomMessageNoLayer')
->addConditionalOption('minZoomIndicatorMessage', 'minZoomMessage');
->addOption('position', 'minZoomIndicatorPosition')
->addOption('minZoomMessageNoLayer', 'minZoomIndicatorMessageNoLayer')
->addOption('minZoomMessage', 'minZoomIndicatorMessage');
$minZoomIndicatorOptionsBuilder->build($minZoomIndicatorOptions, $model);