Index: gmap_views.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/Attic/gmap_views.module,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 gmap_views.module
--- gmap_views.module	31 Jan 2007 00:19:49 -0000	1.1.2.1
+++ gmap_views.module	28 Feb 2007 20:16:55 -0000
@@ -11,7 +11,7 @@
  * Implementation of hook_views_style_plugins().
  */
 function gmap_views_views_style_plugins() {
-  return array(
+  $formatters = array(
     'gmap' => array(
       'name' => t('Gmap View'),
       'theme' => 'views_view_gmap',
@@ -19,6 +19,28 @@ function gmap_views_views_style_plugins(
       'validate' => 'gmap_views_validate',
     )
   );
+  
+  // re-run all the plugin info hooks so we can get them too
+  $modules = module_implements('views_style_plugins');
+  $plugins = array();
+  foreach($modules as $module) {
+    if ($module == 'gmap_views') { continue; } // no recusion!
+    $module_plugins = module_invoke($module, 'views_style_plugins');
+    $plugins = array_merge($plugins, $module_plugins);
+  }
+  
+
+  foreach ($plugins as $type => $details) {
+    $formatters['gmap_' . $type] = array(
+      'name' => 'Gmap + ' . $details['name'],
+      'theme' => 'views_view_gmap_plus',
+      'needs_fields' => true,
+      'validate' => 'gmap_views_validate',
+    );
+  }
+  
+  
+  return $formatters;
 }
 
 /**
@@ -78,4 +100,21 @@ function theme_views_view_gmap($view, $r
   $thismap['#settings']['markers'] = $markers;
   $output .= theme('gmap',$thismap);
   return $output;
+}
+
+/**
+ * Stick a gmap on top of another kind of views plugin
+ */
+function theme_views_view_gmap_plus($view, $results, $type) {
+
+  // first, just make the gmap up
+  $gmap = theme('views_view_gmap', $view, $results);
+  
+  // now get the data for what our other plugin is, and what it's theme function is
+  $other_plugin = substr($view->{$type . '_type'}, 5); // five letters in gmap_
+  $plugins = _views_get_style_plugins();
+  $theme_function = $plugins[$other_plugin]['theme'];
+  
+  // concatenate the gmap and other plugin type
+  return $gmap . views_theme($theme_function, $view, $results, $type);
 }
\ No newline at end of file
