function gmap_views_pre_render in GMap Module 6.2
Same name and namespace in other branches
- 6 gmap.module \gmap_views_pre_render()
- 7.2 gmap.module \gmap_views_pre_render()
- 7 gmap.module \gmap_views_pre_render()
Implementation of hook_views_pre_render().
File
- ./
gmap.module, line 1303 - GMap -- Routines to use the Google Maps API in Drupal.
Code
function gmap_views_pre_render(&$view) {
static $gmap_processed;
// Add js only for gmap style views with ajax and not already processed.
if ($view->plugin_name != 'gmap' && !$view->use_ajax || $gmap_processed) {
return;
}
// Mark the view as already processed.
$gmap_processed = TRUE;
// Add js with new views callback.
drupal_add_js(drupal_get_path('module', 'gmap') . '/js/gmap_views_ajax.js', 'module');
}