public function Geofield::optionsForm in Openlayers 7.3
@inheritDoc
Overrides Base::optionsForm
File
- modules/
openlayers_geofield/ src/ Plugin/ Control/ Geofield/ Geofield.php, line 23 - Control: Geofield.
Class
- Geofield
- Class Geofield.
Namespace
Drupal\openlayers_geofield\Plugin\Control\GeofieldCode
public function optionsForm(array &$form, array &$form_state) {
$form['options']['draw'] = array(
'#type' => 'checkboxes',
'#title' => 'Draw actions',
'#default_value' => $this
->getOption('draw', array()),
'#options' => array(
'Point' => 'Point',
'MultiPoint' => 'MultiPoint',
'LineString' => 'LineString',
'MultiLineString' => 'MultiLineString',
'Polygon' => 'Polygon',
'MultiPolygon' => 'MultiPolygon',
'Triangle' => 'Triangle',
'Square' => 'Square',
'Circle' => 'Circle',
'Box' => 'Box',
),
);
$form['options']['actions'] = array(
'#type' => 'checkboxes',
'#title' => 'Edit options',
'#default_value' => $this
->getOption('actions', array()),
'#options' => array(
'Edit' => 'Select and edit a feature',
'Move' => 'Move the feature',
'Clear' => 'Clear the map',
),
);
$form['options']['options'] = array(
'#type' => 'checkboxes',
'#title' => 'Options',
'#default_value' => $this
->getOption('options', array()),
'#options' => array(
'Snap' => 'Snap the feature between each others',
),
);
}