### Eclipse Workspace Patch 1.0
#P DrupalCVS Gmap
Index: gmap_plugin_style_gmap.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap_plugin_style_gmap.inc,v
retrieving revision 1.9
diff -u -r1.9 gmap_plugin_style_gmap.inc
--- gmap_plugin_style_gmap.inc	3 Apr 2009 15:34:50 -0000	1.9
+++ gmap_plugin_style_gmap.inc	3 Sep 2009 13:22:53 -0000
@@ -33,6 +33,8 @@
     $options['lonfield'] = array('default' => '');
     $options['markerfield'] = array('default' => '');
 
+    $options['tooltipfield'] = array('default' => '');
+
     return $options;
   }
 
@@ -66,11 +68,13 @@
 
     $lat_field = 'gmap_lat';
     $lon_field = 'gmap_lon';
+    $tooltip_field = 'gmap_tooltip';
 
     // Determine fieldname for latitude and longitude fields.
     if ($this->options['datasource'] == 'fields') {
       $lat_field = $this->view->display_handler->get_handler('field', $this->options['latfield'])->field_alias;
       $lon_field = $this->view->display_handler->get_handler('field', $this->options['lonfield'])->field_alias;
+      $tooltip_field = $this->view->display_handler->get_handler('field', $this->options['tooltipfield'])->field_alias;
     }
 
     // Determine fieldname for marker field.
@@ -100,6 +104,12 @@
         foreach ($records as $label => $row) {
         $lat = (float)$row->{$lat_field};
         $lon = (float)$row->{$lon_field};
+
+        $tooltip = "";
+        if (!empty($tooltip_field)) {
+            $tooltip = $row->{$tooltip_field};
+        }
+
         if (!empty($lat) && !empty($lon)) {
           if ($this->options['markers'] == 'nodetype') {
             if (isset($markertypes[$row->gmap_node_type])) {
@@ -133,6 +143,7 @@
             'markername' => $markername,
             'offset' => $offsets[$markername],
             'text' => $this->row_plugin->render($row),
+            'opts' => array('title' => $tooltip),
           );
           $offsets[$markername]++;
         }
@@ -195,6 +206,15 @@
       '#process' => array('views_process_dependency'),
       '#dependency' => array('edit-style-options-datasource' => array('fields')),
     );
+    $form['tooltipfield'] = array(
+      '#title' => t('Tooltip field'),
+      '#description' => t('Format must be text'),
+      '#type' => 'select',
+      '#options' => $options,
+      '#default_value' => $this->options['tooltipfield'],
+      '#process' => array('views_process_dependency'),
+      '#dependency' => array('edit-style-options-datasource' => array('fields')),
+    );
 
     $form['markers'] = array(
       '#type' => 'select',
