Index: GMAP-MACRO-DICTIONARY.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/GMAP-MACRO-DICTIONARY.txt,v
retrieving revision 1.2
diff -u -p -r1.2 GMAP-MACRO-DICTIONARY.txt
--- GMAP-MACRO-DICTIONARY.txt	15 Jul 2008 16:30:29 -0000	1.2
+++ GMAP-MACRO-DICTIONARY.txt	7 Oct 2010 22:55:16 -0000
@@ -46,6 +46,11 @@ Description:	id for the rendered map ele
 Example:			id=mymap
 Notes:				use if you need to access the map from a script, or if you plan to have multiple maps on a page. As of Gmap 1.0, this is no longer required.
 
+Attribute:    extinfowindow
+Values:       exinfowindow theme name
+Description:  the name of the extinfowindow theme you want to use. if multiple maps are on a page they will all use the theme for the first map.
+Example:      extinfowindow=light
+
 --------
 OVERLAYS
 --------
Index: gmap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap.module,v
retrieving revision 1.104.2.6
diff -u -p -r1.104.2.6 gmap.module
--- gmap.module	8 Jun 2010 17:40:59 -0000	1.104.2.6
+++ gmap.module	7 Oct 2010 22:55:17 -0000
@@ -164,6 +164,11 @@ function gmap_gmap($op, &$map) {
       if (isset($map['feed']) && is_array($map['feed'])) {
         drupal_add_js($path . 'markerloader_georss.js');
       }
+      // ExtInfoWindow
+      if (variable_get('gmap_extinfowindow_active', FALSE)) {
+        $extinfowindow_theme = isset($map['extinfowindow']) ? $map['extinfowindow'] : '';
+        gmap_add_extinfowindow($extinfowindow_theme);
+      }
       break;
     case 'macro_multiple':
       return array('points', 'markers', 'feed', 'circle', 'rpolygon', 'polygon', 'line', 'style');
@@ -1263,3 +1268,82 @@ function gmap_views_plugins() {
     ),
   );
 }
+
+/**
+ * Function that adds the required js and css for extinfowindow pop-ups.
+ *
+ * @param $theme_name
+ *   The name of the theme to use.
+ *   If omitted it will be the extinfowindow theme set on the gmap settings page.
+ */
+function gmap_add_extinfowindow($theme_name = '') {
+  // Due to the way these themes work (css) we can only reliably have one theme
+  // used on a page at any one time.
+  // So if we have already loaded a theme then skip this.
+  $themes = gmap_extinfowindow_themes(FALSE);
+  $css = drupal_add_css();
+  $found = FALSE;
+  foreach ($themes as $theme) {
+    if (array_key_exists($theme['css_path'], $css['all']['module'])) {
+      $found = TRUE;
+    }
+  }
+  if (!$found) {
+    if (!$theme_name) {
+      $theme_name = variable_get('gmap_extinfowindow_theme', 'dark');
+    }
+
+    drupal_add_js(array('gmap' => array('extinfowindow' => variable_get('gmap_extinfowindow_active', FALSE))), 'setting');
+
+    // Add the extinfowindow js
+    drupal_add_js(drupal_get_path('module', 'gmap') . '/thirdparty/extinfowindow/extinfowindow.js');
+
+    // Find the active theme
+    $theme = gmap_extinfowindow_themes(FALSE, $theme_name);
+    // Add the theme css
+    drupal_add_css($theme['css_path']);
+  }
+}
+
+/**
+ * Get the themes for ExtInfoWindow.
+ *
+ * Gets default themes from the gmap module and additional themes from the active theme.
+ * An ext theme in the active theme will override one in the gmap module.
+ *
+ * @param $names
+ *   Whether to return names only or names with their paths.
+ * @param $theme_name
+ *   The name of a specific theme to return.  If omitted all themes will be returned.
+ *
+ * @return
+ *   Depending on parameters it could be:
+ *   - An array of theme names;
+ *   - An array of themes, with their name and the patch to their css;
+ *   - A single theme name string;
+ *   - An array of a single theme's name and path to css.
+ */
+function gmap_extinfowindow_themes($names = TRUE, $theme_name = '') {
+  global $theme;
+  $theme_path = drupal_get_path('theme', $theme);
+  $default_path = drupal_get_path('module', 'gmap') . '/thirdparty/extinfowindow/themes';
+
+  $default_themes = file_scan_directory($default_path, '.css');
+  $themes = file_scan_directory($theme_path . '/extinfowindow', '.css');
+  $themes = array_merge($default_themes, $themes);
+
+  $ext_themes = array();
+  foreach ($themes as $ext_theme) {
+    if ($names) {
+      $ext_themes[$ext_theme->name] = $ext_theme->name;
+    }
+    else {
+      $ext_themes[$ext_theme->name] = array(
+        'name' => $ext_theme->name,
+        'css_path' => $ext_theme->filename,
+      );
+    }
+  }
+
+  return $theme_name ? $ext_themes[$theme_name] : $ext_themes;
+}
Index: gmap_plugin_style_gmap.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap_plugin_style_gmap.inc,v
retrieving revision 1.11.2.5
diff -u -p -r1.11.2.5 gmap_plugin_style_gmap.inc
--- gmap_plugin_style_gmap.inc	30 Sep 2010 09:51:05 -0000	1.11.2.5
+++ gmap_plugin_style_gmap.inc	7 Oct 2010 22:55:18 -0000
@@ -43,6 +43,9 @@ class gmap_plugin_style_gmap extends vie
     $options['tooltipenabled'] = array('default' => 0);
     $options['tooltipfield'] = array('default' => '');
 
+    $options['extinfowindow_enabled'] = array('default' => 0);
+    $options['extinfowindow_theme'] = array('default' => '');
+
     return $options;
   }
 
@@ -224,6 +227,10 @@ class gmap_plugin_style_gmap extends vie
         }
 
         $map['markers'] = $markers;
+
+        if ($this->options['extinfowindow_enabled']) {
+          $map['extinfowindow'] = $this->options['extinfowindow_theme'];
+        }
         $output .= theme($this->theme_functions(), $this->view, $this->options, $map, $title);
       }
     }
@@ -380,6 +387,23 @@ class gmap_plugin_style_gmap extends vie
       '#process' => array('views_process_dependency'),
       '#dependency' => array('edit-style-options-tooltipenabled' => array(TRUE)),
     );
+
+    if (variable_get('gmap_extinfowindow_active', FALSE)) {
+      $form['extinfowindow_enabled'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Use extinfowindow for pop-ups'),
+        '#default_value' => $this->options['extinfowindow_enabled'],
+      );
+      $form['extinfowindow_theme'] = array(
+        '#title' => t('Extinfowindow theme'),
+        '#description' => t("The extinfowindow theme to use for this view."),
+        '#type' => 'select',
+        '#options' => gmap_extinfowindow_themes(),
+        '#default_value' => isset($this->options['extinfowindow_theme']) ? $this->options['extinfowindow_theme'] : variable_get('gmap_extinfowindow_theme', 'dark'),
+        '#process' => array('views_process_dependency'),
+        '#dependency' => array('edit-style-options-extinfowindow-enabled' => array(TRUE)),
+      );
+    }
   }
 
   /**
Index: gmap_settings_ui.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap_settings_ui.inc,v
retrieving revision 1.12.2.6
diff -u -p -r1.12.2.6 gmap_settings_ui.inc
--- gmap_settings_ui.inc	15 Sep 2010 23:40:50 -0000	1.12.2.6
+++ gmap_settings_ui.inc	7 Oct 2010 22:55:18 -0000
@@ -621,6 +621,30 @@ function gmap_admin_settings(&$form_stat
     '#maxlength' => 4,
   );
 
+  // ExtInfoWindow Settings
+  $form['gmap_extinfowindow'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('ExtInfoWindow'),
+    '#description' => t('ExtInfoWindow enables you to theme the pop info window'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+
+  $form['gmap_extinfowindow']['gmap_extinfowindow_active'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable GMap Ext Window'),
+    '#default_value' => variable_get('gmap_extinfowindow_active', FALSE),
+    '#description' => t('Enable/disable the GMap Ext Info Window'),
+  );
+
+  $form['gmap_extinfowindow']['gmap_extinfowindow_theme'] = array(
+    '#type' => 'select',
+    '#title' => t('Theme'),
+    '#default_value' => variable_get('gmap_extinfowindow_theme', 'dark'),
+    '#options' => gmap_extinfowindow_themes(),
+    '#description' => t('The theme to use for the ext window inplementation.')
+  );
+
   // @@@ Convert to element level validation.
   $form['#validate'][] = 'gmap_admin_settings_validate';
 
Index: js/marker.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/js/marker.js,v
retrieving revision 1.4.2.1
diff -u -p -r1.4.2.1 marker.js
--- js/marker.js	8 Apr 2010 13:40:19 -0000	1.4.2.1
+++ js/marker.js	7 Oct 2010 22:55:18 -0000
@@ -61,7 +61,18 @@ Drupal.gmap.addHandler('gmap', function 
   obj.bind('clickmarker', function (marker) {
     // Local/stored content
     if (marker.text) {
-      marker.marker.openInfoWindowHtml(marker.text);
+      // ExtInfoWindow implementation
+      if (Drupal.settings.gmap.extinfowindow) {
+        marker.marker.openExtInfoWindow(
+          obj.map,
+          'opacity_window',
+          marker.text,
+          {beakOffset: 2}
+        );
+      }
+      else {
+        marker.marker.openInfoWindowHtml(marker.text);
+      }
     }
     // AJAX content
     if (marker.rmt) {
@@ -79,7 +90,18 @@ Drupal.gmap.addHandler('gmap', function 
       //  marker.marker.openInfoWindowHtml(Drupal.settings.loadingImage);
       //}
       $.get(uri, {}, function (data) {
-        marker.marker.openInfoWindowHtml(data);
+        // ExtInfoWindow implementation
+        if (Drupal.settings.gmap.extinfowindow) {
+          marker.marker.openExtInfoWindow(
+            obj.map,
+            'opacity_window',
+            data,
+            {beakOffset: 2}
+          );
+        }
+        else {
+          marker.marker.openInfoWindowHtml(data);
+        }
       });
     }
     // Tabbed content
