function template_preprocess_gmap_view_gmap in GMap Module 7
Same name and namespace in other branches
- 6.2 gmap.module \template_preprocess_gmap_view_gmap()
- 6 gmap.module \template_preprocess_gmap_view_gmap()
- 7.2 gmap.module \template_preprocess_gmap_view_gmap()
Preprocess function for theme_gmap_view_gmap().
File
- ./
gmap.module, line 1454 - GMap -- Routines to use the Google Maps API in Drupal.
Code
function template_preprocess_gmap_view_gmap(&$vars) {
$vars['map_object'] = $vars['rows'];
// Rows is actually our map object.
unset($vars['rows']);
$vars['map_element'] = array(
'#type' => 'gmap',
'#gmap_settings' => $vars['map_object'],
);
// Theme the map.
$vars['map'] = drupal_render($vars['map_element']);
}