mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 19:43:50 +01:00
Implement boundsMode fit.
This commit is contained in:
@@ -148,15 +148,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
),
|
||||
'markers extends default' => array(
|
||||
'+expert' => array('pointToLayer'),
|
||||
'+active' => array('deferred', 'affectBounds')
|
||||
'+config' => array('deferred', 'boundsMode')
|
||||
),
|
||||
'group extends default' => array(
|
||||
'+title' => array('groupType'),
|
||||
'+active' => array('affectBounds')
|
||||
'+active' => array('boundsMode')
|
||||
),
|
||||
'vectors extends default' => array(
|
||||
'+expert' => array('onEachFeature', 'pointToLayer'),
|
||||
'+active' => array('deferred', 'affectBounds'),
|
||||
'+config' => array('deferred', 'boundsMode'),
|
||||
),
|
||||
'reference extends default' => array(
|
||||
'+title' => array('reference', 'standalone')
|
||||
@@ -335,7 +335,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => true,
|
||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true),
|
||||
'eval' => array('tl_class' => 'w50 m12', 'submitOnChange' => true, 'isBoolean' => true),
|
||||
'sql' => "char(1) NOT NULL default '1'"
|
||||
),
|
||||
'groupType' => array
|
||||
@@ -530,14 +530,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
|
||||
'boundsMode' => 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 ''"
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['boundsMode'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getBoundsModes'),
|
||||
'eval' => array('tl_class' => 'w50', 'includeBlankOption' => true),
|
||||
'sql' => "varchar(6) NOT NULL default ''"
|
||||
),
|
||||
'tileUrl' => array
|
||||
(
|
||||
|
||||
@@ -94,7 +94,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'metapalettes' => array(
|
||||
'default' => array(
|
||||
'title' => array('title', 'alias'),
|
||||
'zoom' => array('center', 'zoom', 'adjustZoomExtra', 'adjustBounds'),
|
||||
'zoom' => array('center', 'zoom', 'adjustZoomExtra', 'adjustBounds', 'dynamicLoad'),
|
||||
'locate' => array('locate'),
|
||||
'layers' => array('layers'),
|
||||
'interaction' => array(
|
||||
@@ -419,6 +419,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'eval' => array('tl_class' => 'clr w50', 'multiple' => true, 'helpwizard' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'dynamicLoad' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['dynamicLoad'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => true,
|
||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'locate' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['locate'],
|
||||
|
||||
@@ -176,18 +176,44 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate'),
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Marker', 'saveCoordinates')
|
||||
),
|
||||
'wizard' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getGeocoder')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'long clr',
|
||||
'nullIfEmpty' => true,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'long clr',
|
||||
'nullIfEmpty' => true,
|
||||
'doNotSaveEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'latitude' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['latitude'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "float NULL"
|
||||
),
|
||||
'longitude' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['longitude'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "float NULL"
|
||||
),
|
||||
'altitude' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['altitude'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "float NULL"
|
||||
),
|
||||
'active' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'],
|
||||
|
||||
Reference in New Issue
Block a user