You are here

function template_preprocess_gmap_view_gmap in GMap Module 7.2

Same name and namespace in other branches
  1. 6.2 gmap.module \template_preprocess_gmap_view_gmap()
  2. 6 gmap.module \template_preprocess_gmap_view_gmap()
  3. 7 gmap.module \template_preprocess_gmap_view_gmap()

Preprocess function for theme_gmap_view_gmap().

@todo possible move this to GmapView class

File

./gmap.module, line 1490
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'],
    '#view' => $vars['view'],
  );

  // Theme the map.
  $vars['map'] = drupal_render($vars['map_element']);
}