How to programatically change a view's style_options when user clicking the exposed filter apply button? In a Leaflet Map view, the exposed filter is a list(text) field. On user clicking the Apply button of the exposed filter form, I need to programatically change the value of $handler->display->display_options['style_options']['map'], I mean to change the Leaflet map style (which is defined in the module leaflet_more_maps).

How to make it?
The hook_views_pre_render() works.

function my_misc_views_pre_render(&amp;$view) {
  if($view-&gt;name == 'classrooms_map') {
    $view-&gt;style_plugin-&gt;options['map'] = ($view-&gt;exposed_data['type'] == 'All') ? 'all' : $view-&gt;exposed_data['type'];
  }
}