public function MarkerLabel::getSettingsForm in Geolocation Field 8.3
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_google_maps/ src/ Plugin/ geolocation/ MapFeature/ MarkerLabel.php, line 35
Class
- MarkerLabel
- Provides Google Maps.
Namespace
Drupal\geolocation_google_maps\Plugin\geolocation\MapFeatureCode
public function getSettingsForm(array $settings, array $parents) {
$form['color'] = [
'#type' => 'textfield',
'#title' => $this
->t('Color'),
'#description' => $this
->t('The color of the label text. Default color is black.'),
'#default_value' => $settings['color'],
];
$form['font_family'] = [
'#type' => 'textfield',
'#title' => $this
->t('Font Family'),
'#description' => $this
->t('The font family of the label text (equivalent to the CSS font-family property).'),
'#default_value' => $settings['font_family'],
];
$form['font_size'] = [
'#type' => 'textfield',
'#title' => $this
->t('Font Size'),
'#description' => $this
->t('The font size of the label text (equivalent to the CSS font-size property). Default size is 14px.'),
'#default_value' => $settings['font_size'],
];
$form['font_weight'] = [
'#type' => 'textfield',
'#title' => $this
->t('Font Weight'),
'#description' => $this
->t('The font weight of the label text (equivalent to the CSS font-weight property).'),
'#default_value' => $settings['font_weight'],
];
return $form;
}