public function LeafletMarkerClusterer::getSettingsForm in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/LeafletMarkerClusterer.php \Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature\LeafletMarkerClusterer::getSettingsForm()
Provide a generic map settings form array.
Parameters
array $settings: The current map settings.
array $parents: Form specific optional prefix.
Return value
array A form array to be integrated in whatever.
Overrides MapFeatureBase::getSettingsForm
File
- modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletMarkerClusterer.php, line 34
Class
- LeafletMarkerClusterer
- Provides marker clusterer.
Namespace
Drupal\geolocation_leaflet\Plugin\geolocation\MapFeatureCode
public function getSettingsForm(array $settings, array $parents) {
$settings = $this
->getSettings($settings);
$options = [
'show_coverage_on_hover' => $this
->t('When you mouse over a cluster it shows the bounds of its markers.'),
'zoom_to_bounds_on_click' => $this
->t('When you click a cluster we zoom to its bounds.'),
];
$form['cluster_settings'] = [
'#type' => 'checkboxes',
'#options' => $options,
'#title' => $this
->t('Marker Cluster default settings'),
'#default_value' => $settings['cluster_settings'],
];
return $form;
}