mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2026-01-13 10:55:17 +01:00
Improve handling of bounds calculation. Layers have to whitelist, vectors/markers can set themselves to ignore.
This commit is contained in:
@@ -145,14 +145,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
),
|
||||
'markers extends default' => array(
|
||||
'+expert' => array('pointToLayer'),
|
||||
'+active' => array('deferred')
|
||||
'+active' => array('deferred', 'affectBounds')
|
||||
),
|
||||
'group extends default' => array(
|
||||
'+title' => array('groupType'),
|
||||
'+active' => array('affectBounds')
|
||||
),
|
||||
'vectors extends default' => array(
|
||||
'+expert' => array('onEachFeature', 'pointToLayer'),
|
||||
'+active' => array('deferred'),
|
||||
'+active' => array('deferred', 'affectBounds'),
|
||||
),
|
||||
'reference extends default' => array(
|
||||
'+title' => array('reference', 'standalone')
|
||||
@@ -173,6 +174,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'iconCreateFunction',
|
||||
'disableDefaultStyle'
|
||||
),
|
||||
'+active' => array(
|
||||
'affectBounds'
|
||||
)
|
||||
),
|
||||
),
|
||||
|
||||
@@ -500,5 +504,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'affectBounds' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['affectBounds'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user