0

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?

| improve this question | | | | |
0

The hook_views_pre_render() works.

function my_misc_views_pre_render(&$view) {
  if($view->name == 'classrooms_map') {
    $view->style_plugin->options['map'] = ($view->exposed_data['type'] == 'All') ? 'all' : $view->exposed_data['type'];
  }
}
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.