Skip to content
Snippets Groups Projects
Commit ea8b9797 authored by Brandon Bergren's avatar Brandon Bergren
Browse files

Move gmap_views_gmap preprocess function to gmap.module to work around caching...

Move gmap_views_gmap preprocess function to gmap.module to work around caching quirks seen in the wild.
parent 41aa7a96
No related branches found
No related tags found
No related merge requests found
......@@ -1296,3 +1296,14 @@ function gmap_ajax_data_alter(&$object, $views, $view) {
$object->__callbacks = array_merge($object->__callbacks, array('Drupal.gmapAjax.ajaxFixMaps'));
}
/**
* Preprocess function for theme_gmap_view_gmap().
*/
function template_preprocess_gmap_view_gmap(&$vars) {
$vars['map_object'] = $vars['rows'];
// Rows is actually our map object.
unset($vars['rows']);
// Theme the map.
$vars['map'] = theme('gmap', array('#settings' => $vars['map_object']));
}
......@@ -24,13 +24,3 @@ function gmap_views_handlers() {
}
*/
function template_preprocess_gmap_view_gmap(&$vars) {
$vars['map_object'] = $vars['rows'];
// Rows is actually our map object.
unset($vars['rows']);
// Theme the map.
$vars['map'] = theme('gmap', array('#settings' => $vars['map_object']));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment