Index: gmap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap.module,v
retrieving revision 1.101
diff -u -p -r1.101 gmap.module
--- gmap.module	17 Apr 2009 18:31:59 -0000	1.101
+++ gmap.module	15 May 2009 07:22:46 -0000
@@ -69,6 +69,7 @@ function gmap_theme() {
     'gmap_address' => array('arguments' => array('element')),
     'gmap_align' => array('arguments' => array('element')),
     'gmap_style' => array('arguments' => array('element')),
+    'gmap_popup' => array('arguments' => array('marker')),
     'gmap' => array('arguments' => array('element')),
   );
 }
@@ -658,6 +659,13 @@ function theme_gmap_style($element) {
 }
 
 /**
+ * Theme a gmap marker popup.
+ */
+function theme_gmap_popup($marker) {
+  return '<div class="gmap-popup">' . $marker['text'] . '</div>';
+}
+
+/**
  * Overlay editor #process function.
  */
 function process_gmap_overlay_edit($element) {
@@ -884,10 +892,9 @@ function theme_gmap($element) {
   gmap_map_cleanup($map);
 
   // Add a class around map bubble contents.
-  // @@@ Bdragon sez: Becw, this doesn't belong here. Theming needs to get fixed instead..
   if (isset($map['markers'])) {
     foreach ($map['markers'] as $i => $marker) {
-      $map['markers'][$i]['text'] = '<div class="gmap-popup">' . $marker['text'] . '</div>';
+      $map['markers'][$i]['text'] = theme('gmap_popup', $marker);
     }
   }
 
