You are here

function ip_geoloc_views_pre_render in IP Geolocation Views & Maps 8

Implements hook_views_pre_render().

File

./ip_geoloc.module, line 248
IPGV&M is a mapping engine for Views that contain locations of entities and/or visitors. Google Maps, Leaflet and OpenLayers2 maps are all supported and available through this module. Using a number of optional sources IPGV&M also retrieves…

Code

function ip_geoloc_views_pre_render(ViewExecutable $view) {
  if (isset($view) && strstr(get_class($view
    ->getStyle()), 'IpGeoLocPluginStyleMap')) {

    // $view->element['#attached']['library'][] = 'ip_geoloc/multi_location_js_style_map';
    // drupal_add_js(IP_GEOLOC_GOOGLE_MAPS, ['type' => 'external', 'group' => JS_LIBRARY]);
    // drupal_add_js(drupal_get_path('module', 'ip_geoloc') . '/js/ip_geoloc_gmap_multi_visitor.js');
    // if (!isset($map_options)) {
    //   $map_options = IP_GEOLOC_RECENT_VISITORS_MAP_OPTIONS;
    // }
    // $settings = [
    //   'ip_geoloc_locations' => $locations,
    //   'ip_geoloc_multi_location_map_div' => $div_id,
    //   'ip_geoloc_multi_location_map_options' => drupal_json_decode($map_options),
    // ];
    // drupal_add_js($settings, 'setting');
  }
}