forked from Snck3rs/contao-leaflet-maps
Implement as dynamic setting of the map bounds.
This commit is contained in:
@@ -91,7 +91,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'metapalettes' => array(
|
||||
'default' => array(
|
||||
'title' => array('title', 'alias'),
|
||||
'zoom' => array('center', 'zoom', 'adjustZoomExtra'),
|
||||
'zoom' => array('center', 'zoom', 'adjustZoomExtra', 'adjustBounds'),
|
||||
'controls' => array('zoomControl', 'controls'),
|
||||
'layers' => array('layers'),
|
||||
'interaction' => array(
|
||||
@@ -370,5 +370,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
|
||||
'eval' => array('tl_class' => 'clr lng', 'allowHtml'=>true, 'style' => 'min-height: 40px;'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'adjustBounds' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'options' => array('load', 'deferred'),
|
||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions'],
|
||||
'eval' => array('tl_class' => 'w50', 'multiple' => true, 'helpwizard' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -116,7 +116,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'riseOffset',
|
||||
'customIcon',
|
||||
),
|
||||
'active' => array('active')
|
||||
'active' => array('active', 'affectBounds')
|
||||
),
|
||||
),
|
||||
'metasubpalettes' => array(
|
||||
@@ -286,5 +286,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
'eval' => array('maxlength' => 5, 'rgxp' => 'digit', 'tl_class' => 'clr w50', 'nullIfEmpty' => true),
|
||||
'sql' => "int(5) NULL"
|
||||
),
|
||||
'affectBounds' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['affectBounds'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -119,7 +119,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
'data' => array(),
|
||||
'popup' => array(':hide','addPopup'),
|
||||
'config' => array(':hide', 'style', 'className', 'clickable'),
|
||||
'active' => array('active')
|
||||
'active' => array('active', 'affectBounds')
|
||||
),
|
||||
|
||||
'polyline extends default' => array(
|
||||
@@ -348,5 +348,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
|
||||
),
|
||||
'sql' => "mediumblob NULL"
|
||||
),
|
||||
'affectBounds' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['affectBounds'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -64,6 +64,13 @@ $GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra'][0] = 'Adjust extra z
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustZoomExtra'][1] = 'Enable if you want to adjust minimum and maximum zoom as well';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers'][0] = 'Default layers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layers'][1] = 'Inital visible layers of the map. For optional layers use the layers control.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds'][0] = 'Adjust bounds';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBounds'][1] = 'If enabled the map will fit to bounds to objects being marked to affect the bounds.';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['load'][0] = 'At map initialization';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['load'][1] = 'Calculate bounds when the map is initialized. All static and already loaded deferred featured are included.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['deferred'][0] = 'After loading deferred feature';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['adjustBoundsOptions']['deferred'][1] = 'Recalculate bounds when a deferred feature is load.';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][0] = 'Disable';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoomValues'][''][1] = 'Disable zoom function.';
|
||||
|
||||
@@ -48,3 +48,5 @@ $GLOBALS['TL_LANG']['tl_leaflet_marker']['icon'][0] = 'Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['icon'][1] = 'Select a custom icon.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'][0] = 'Activate marker';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'][1] = 'Only activated markers are rendered on the map.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['affectBounds'][0] = 'Affect map bounds';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_marker']['affectBounds'][1] = 'If the map support it the marker will be used to affect the initial map bounds.';
|
||||
|
||||
@@ -53,3 +53,5 @@ $GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'][0] = 'Bounds';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'][1] = 'Each field defines a corner of the bounds as comma separated value (Latitude, longitude [, altitude]).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['style'][0] = 'Style';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['style'][1] = 'Choose a style. If none defined, the default style of leaflet is used.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['affectBounds'][0] = 'Affect map bounds';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_vector']['affectBounds'][1] = 'If the map support it the vector will be used to affect the initial map bounds.';
|
||||
|
||||
Reference in New Issue
Block a user