forked from Snck3rs/contao-leaflet-maps
Add standalone feature to the reference map.
This commit is contained in:
@@ -147,7 +147,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'+active' => array('deferred'),
|
||||
),
|
||||
'reference extends default' => array(
|
||||
'+title' => array('reference')
|
||||
'+title' => array('reference', 'standalone')
|
||||
)
|
||||
),
|
||||
|
||||
@@ -324,6 +324,15 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
),
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'",
|
||||
),
|
||||
'standalone' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => false,
|
||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => false, 'isBoolean' => true),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'onEachFeature' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['onEachFeature'],
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['title_legend'] = 'Layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active_legend'] = 'Activation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['expert_legend'] = 'Expert settings';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['config_legend'] = 'Configuration';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][0] = 'Manage maps';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][1] = 'Manage leaflet maps';
|
||||
@@ -39,6 +40,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][0] = 'Activate
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][1] = 'Activate layer on the map.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'][0] = 'Reference';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'][1] = 'Choose the reference layer.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'][0] = 'Standalone';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'][1] = 'Integrate reference as a copy of the referenced layer.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster'][0] = 'Marker cluster';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster'][1] = 'Choose a marker cluster layer so that markers get clustered.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['deferred'][0] = 'Deferred loading';
|
||||
|
||||
@@ -40,6 +40,8 @@ class ReferenceLayerMapper extends AbstractLayerMapper
|
||||
return null;
|
||||
}
|
||||
|
||||
return $mapper->handle($reference, $bounds, $this->getElementId($model, $elementId));
|
||||
$elementId = $model->standalone ? $this->getElementId($model, $elementId) : null;
|
||||
|
||||
return $mapper->handle($reference, $bounds, $elementId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user