forked from Snck3rs/contao-leaflet-maps
Bugfixes.
This commit is contained in:
BIN
module/assets/img/overpass.png
Normal file
BIN
module/assets/img/overpass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 780 B |
@@ -271,6 +271,10 @@ $GLOBALS['LEAFLET_LAYERS'] = array
|
|||||||
'children' => false,
|
'children' => false,
|
||||||
'icon' => 'system/modules/leaflet/assets/img/tile.png',
|
'icon' => 'system/modules/leaflet/assets/img/tile.png',
|
||||||
),
|
),
|
||||||
|
'overpass' => array(
|
||||||
|
'children' => false,
|
||||||
|
'icon' => 'system/modules/leaflet/assets/img/overpass.png',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -792,9 +792,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
|||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['cacheLifeTime'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => 0,
|
||||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50', 'nullIfEmpty' => true),
|
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'w50'),
|
||||||
'sql' => "int(9) NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||||
),
|
),
|
||||||
'overpassQuery' => array
|
'overpassQuery' => array
|
||||||
(
|
(
|
||||||
@@ -815,7 +815,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
|||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['overpassEndpoint'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => '',
|
||||||
'eval' => array('tl_class' => 'long'),
|
'eval' => array('tl_class' => 'long'),
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'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'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessage'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => '',
|
||||||
'eval' => array('tl_class' => 'long'),
|
'eval' => array('tl_class' => 'long'),
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'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'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['minZoomIndicatorMessageNoLayer'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'text',
|
'inputType' => 'text',
|
||||||
'default' => null,
|
'default' => '',
|
||||||
'eval' => array('tl_class' => 'long'),
|
'eval' => array('tl_class' => 'long'),
|
||||||
'sql' => "varchar(255) NOT NULL default ''"
|
'sql' => "varchar(255) NOT NULL default ''"
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ class OverpassLayerMapper extends AbstractLayerMapper
|
|||||||
*/
|
*/
|
||||||
protected static $type = 'overpass';
|
protected static $type = 'overpass';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The definition class.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected static $definitionClass = 'Netzmacht\LeafletPHP\Plugins\OverpassLayer\OverpassLayer';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@@ -39,9 +46,9 @@ class OverpassLayerMapper extends AbstractLayerMapper
|
|||||||
parent::initialize();
|
parent::initialize();
|
||||||
|
|
||||||
$this->optionsBuilder
|
$this->optionsBuilder
|
||||||
->addOption('overpassQuery', 'query')
|
->addOption('query', 'overpassQuery')
|
||||||
->addConditionalOption('minZoom')
|
->addOption('minzoom', 'minZoom')
|
||||||
->addConditionalOption('overpassEndpoint', 'endpoint');
|
->addOption('overpassEndpoint', 'endpoint');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,9 +68,9 @@ class OverpassLayerMapper extends AbstractLayerMapper
|
|||||||
$minZoomIndicatorOptions = $definition->getMinZoomIndicatorOptions();
|
$minZoomIndicatorOptions = $definition->getMinZoomIndicatorOptions();
|
||||||
$minZoomIndicatorOptionsBuilder = new OptionsBuilder();
|
$minZoomIndicatorOptionsBuilder = new OptionsBuilder();
|
||||||
$minZoomIndicatorOptionsBuilder
|
$minZoomIndicatorOptionsBuilder
|
||||||
->addConditionalOption('minZoomIndicatorPosition', 'position')
|
->addOption('position', 'minZoomIndicatorPosition')
|
||||||
->addConditionalOption('minZoomIndicatorMessageNoLayer', 'minZoomMessageNoLayer')
|
->addOption('minZoomMessageNoLayer', 'minZoomIndicatorMessageNoLayer')
|
||||||
->addConditionalOption('minZoomIndicatorMessage', 'minZoomMessage');
|
->addOption('minZoomMessage', 'minZoomIndicatorMessage');
|
||||||
|
|
||||||
$minZoomIndicatorOptionsBuilder->build($minZoomIndicatorOptions, $model);
|
$minZoomIndicatorOptionsBuilder->build($minZoomIndicatorOptions, $model);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user