? gmap.patch
? thirdparty/extinfowindow
Index: gmap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap.module,v
retrieving revision 1.92
diff -u -p -r1.92 gmap.module
--- gmap.module	5 Dec 2008 17:35:51 -0000	1.92
+++ gmap.module	17 Apr 2010 19:16:27 -0000
@@ -242,7 +242,7 @@ function gmap_gmap($op, &$map) {
 
 /**
  * Set up the HTML header for GMap.
- * If you are going to include a custom JS file that extends GMap, you probabaly
+ * If you are going to include a custom JS file that extends GMap, you probably
  * want to call this first to ensure that the core js files have been added.
  */
 function _gmap_doheader() {
@@ -251,6 +251,24 @@ function _gmap_doheader() {
     return;
   }
   $gmap_path = drupal_get_path('module', 'gmap');
+  
+  /**
+   * ExtInfoWindow
+   */
+  if(variable_get('gmap_extinfowindow_active', FALSE)){
+    
+    drupal_add_js(array('gmap' => array('extinfowindow' => variable_get('gmap_extinfowindow_active', FALSE))), 'setting');
+    
+    //add the extinfowindow js
+    drupal_add_js($gmap_path . '/thirdparty/extinfowindow/extinfowindow.js');
+    
+    //find the active theme
+    $theme = variable_get('gmap_extinfowindow_theme','dark');
+    //add the theme css
+    drupal_add_css($gmap_path . '/thirdparty/extinfowindow/themes/' . $theme . '/' . $theme .'.css');
+  }
+  
+  
   drupal_add_css($gmap_path .'/gmap.css');
   drupal_add_js($gmap_path .'/js/gmap.js');
   $mm = variable_get('gmap_mm_type', 'gmap');
@@ -1160,3 +1178,23 @@ function gmap_views_plugins() {
     ),
   );
 }
+
+
+/**
+ * Get the themes for ExtInfoWindow
+ *
+ * @return
+ * An array with themes for ExtInfoWindow.
+ */
+function gmap_extinfowindow_themes(){
+  
+  $path = drupal_get_path('module','gmap') . '/';    
+  $themes = file_scan_directory($path . 'thirdparty/extinfowindow/themes','.css');
+    
+  $ext_themes = array();    
+  foreach($themes as $theme){
+      $ext_themes[$theme->name] = $theme->name; 
+  }  
+        
+  return $ext_themes;
+}
\ No newline at end of file
Index: js/marker.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/js/marker.js,v
retrieving revision 1.2
diff -u -p -r1.2 marker.js
--- js/marker.js	15 Jul 2008 16:30:30 -0000	1.2
+++ js/marker.js	17 Apr 2010 19:16:28 -0000
@@ -44,11 +44,33 @@ Drupal.gmap.addHandler('gmap', function(
   // Default marker actions.
   obj.bind('clickmarker',function(marker) {
     if (marker.text) {
-      marker.marker.openInfoWindowHtml(marker.text);
+      //check if extinfowindow is enabled
+      if(Drupal.settings.gmap.extinfowindow){
+          marker.marker.openExtInfoWindow(
+            obj.map,
+            "opacity_window",
+            marker.text,
+            {beakOffset: 2}
+          );
+        }
+      else{
+        marker.marker.openInfoWindowHtml(marker.text);
+      }
     }
     if (marker.rmt) {
-      $.get(obj.vars.rmtcallback + '/' + marker.rmt, {}, function(data){
-        marker.marker.openInfoWindowHtml(data);
+      $.get(obj.vars.rmtcallback + '/' + marker.rmt, {}, function(data){        
+        //check if extinfowindow is enabled
+        if(Drupal.settings.gmap.extinfowindow){
+          marker.marker.openExtInfoWindow(
+            obj.map,
+            "opacity_window",
+            data,
+            {beakOffset: 2}
+          );
+        }
+        else{
+          marker.marker.openInfoWindowHtml(data);
+        }
       });
     }
     else if (marker.tabs) {
