You are here

function openlayers_map_form_interactions_submit in Openlayers 7.3

Map interactions config form submit handler.

File

modules/openlayers_ui/src/Plugin/export_ui/OpenlayersMaps.inc, line 610
CTools Export UI plugin definition for maps.

Code

function openlayers_map_form_interactions_submit($form, &$form_state) {
  $map = \Drupal\openlayers\Openlayers::load('map', $form_state['item']);
  $interactions_enabled = array_filter($form_state['values']['options']['interactions']);
  $map
    ->setOption('interactions', array_keys($interactions_enabled));
  $form_state['item'] = $map
    ->getExport();
}