From ea8b9797b1831b675220eac5d397e69a0b2b1e0c Mon Sep 17 00:00:00 2001
From: Brandon Bergren <bdragon@rtk0.net>
Date: Tue, 30 Nov 2010 22:08:55 +0000
Subject: [PATCH] Move gmap_views_gmap preprocess function to gmap.module to
 work around caching quirks seen in the wild.

---
 gmap.module    | 11 +++++++++++
 gmap.views.inc | 10 ----------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/gmap.module b/gmap.module
index 169d03f..144cc50 100644
--- a/gmap.module
+++ b/gmap.module
@@ -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']));
+}
diff --git a/gmap.views.inc b/gmap.views.inc
index 0b43011..7fa08ef 100644
--- a/gmap.views.inc
+++ b/gmap.views.inc
@@ -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']));
-}
-- 
GitLab