? geolocation.patch
Index: geolocation/geolocation.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geolocation/geolocation.install,v
retrieving revision 1.2
diff -u -r1.2 geolocation.install
--- geolocation/geolocation.install	14 Jan 2011 17:39:31 -0000	1.2
+++ geolocation/geolocation.install	26 Jan 2011 08:51:01 -0000
@@ -43,6 +43,11 @@
       'not null' => TRUE,
       'default' => 0,
     ),
+    'address' => array(
+      'description' => 'Stores the address if the widget has saved it',
+      'type' => 'text',
+      'not null' => FALSE,
+    ),
   );
   $indexes = array(
     'lat' => array('lat'),
Index: geolocation/modules/geolocation_googlemaps/geolocation_googlemaps.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geolocation/modules/geolocation_googlemaps/geolocation_googlemaps.module,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 geolocation_googlemaps.module
--- geolocation/modules/geolocation_googlemaps/geolocation_googlemaps.module	24 Jan 2011 22:44:31 -0000	1.1.2.3
+++ geolocation/modules/geolocation_googlemaps/geolocation_googlemaps.module	26 Jan 2011 08:53:15 -0000
@@ -19,6 +19,10 @@
         'map_zoomlevel' => '7',
         'map_imageformat' => 'png8',
         'map_maptype' => 'roadmap',
+        'display_address' => 'inline',
+        'address_location' => 'above',
+        'address_css' => '',
+        'address_style' => '',
       ),
     ),
   );
@@ -97,6 +101,43 @@
     '#description' => t('Choose a custom zoom level - the higher the number the closer. <em>High zoom warning:</em> Google might not return images for any combination of Map Type and Zoom Level.'),
     '#default_value' => $settings['map_zoomlevel'],
   );
+  
+  $element['display_address'] = array(
+    '#type' => 'select',
+    '#title' => t('Address Display'),
+    '#options' => array(
+      'none' => 'None',
+      'inline' => 'Inline',
+      'multiline' => 'Multi-Line',
+    ),
+    '#description' => t('Choose how the address gets formatted.'),
+    '#default_value' => $settings['display_address'],
+  );
+  
+  $element['address_location'] = array(
+    '#type' => 'select',
+    '#title' => t('Address Location'),
+    '#options' => array(
+      'above' => 'Above',
+      'below' => 'Below',
+    ),
+    '#description' => t('Choose where the address gets displayed.'),
+    '#default_value' => $settings['address_location'],    
+  );
+  
+  $element['address_css'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Address CSS Class'),
+    '#description' => t('Choose additional css classes added to the address separated by a space.'),
+    '#default_value' => $settings['address_css'],     
+  );
+  
+  $element['address_style'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Inline CSS Style'),
+    '#description' => t('Inline CSS to be added to the address within the style attribute. (example: font-weight: bold; font-size: 13px;)'),
+    '#default_value' => $settings['address_style'],
+  );    
 
   return $element;
 }
@@ -125,16 +166,41 @@
 
     case 'geolocation_googlemaps_static':
       foreach ($items as $delta => $item) {
+        $css = $settings['address_css'];
+        $style = $settings['address_style'];
+        switch($settings['display_address'])
+        {
+          case 'none':
+            $address = '';
+            break;
+          case 'inline':
+            $address = "<div class='$css' style='$style'>" . $item['address'] . "</div>";
+            break;
+          case 'multiline':
+            $address = "<div class='$css' style='$style'>" . implode("<br />", explode(",", $item['address'], 2)) . "</div>";
+            break;
+          default:
+            $address = '';
+            break;
+        }        
+        
+        $prefix = $address;
+        $suffix = '';
+        if($settings['address_location'] == 'below') 
+        {
+          $prefix = '';
+          $suffix = $address;
+        }
+        
         $variables = array(
             'path' => 'http://maps.google.com/maps/api/staticmap?zoom='. $settings['map_zoomlevel'] .'&size='. $settings['map_dimensions'] .'&format='. $settings['map_imageformat'] .'&maptype='. $settings['map_maptype'] .'&markers=size:mid|color:red|' . $item['lat'] . ',' . $item['lng'] . '&sensor=false',
             'alt' => 'Geolocation',
             'attributes' => array('class' => 'geolocation-googlemaps-static'),
             );
         $map_img = theme('image', $variables);
-        $element[$delta]['#markup'] = '<div>' . $map_img . '</div>';
+        $element[$delta]['#markup'] = "$prefix<div>" . $map_img . "</div>$suffix";
       }
       break;
-
   }
   return $element;
 }
