### Eclipse Workspace Patch 1.0
#P DrupalCVS gmap
Index: gmap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap.module,v
retrieving revision 1.101
diff -u -r1.101 gmap.module
--- gmap.module	17 Apr 2009 18:31:59 -0000	1.101
+++ gmap.module	5 Sep 2009 06:34:19 -0000
@@ -123,6 +123,7 @@
 
         drupal_add_js($path .'icon.js');
         drupal_add_js($path .'marker.js');
+        drupal_add_js($path .'highlight.js');
 
         $mm = variable_get('gmap_mm_type', 'gmap');
         // If you really really want to override the marker manager, implement
@@ -224,6 +225,12 @@
           'help' => t('Used for advanced javascript work, this will enable the <em>clickshape</em> event.'),
           'internal' => TRUE,
         ),
+        'highlight' => array(
+          'title' => t('Highlight marker on rollover'),
+          'default' => FALSE,
+          'help' => t('Highlight marker by creating circle on mouse rollover event.'),
+          'previewable' => TRUE,
+        ),        
       );
       break;
 
@@ -283,6 +290,7 @@
     drupal_add_js($gmap_path .'/thirdparty/'. $mms[$mm]['filename']);
   }
   drupal_add_js($gmap_path .'/js/marker.js');
+  drupal_add_js($gmap_path .'/js/highlight.js');
   drupal_add_js($gmap_path .'/js/'. $mm .'_marker.js');
   drupal_add_js(array('gmap_markermanager' => $mms[$mm]), 'setting');
 // @@@
Index: js/marker.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/js/marker.js,v
retrieving revision 1.4
diff -u -r1.4 marker.js
--- js/marker.js	11 Feb 2009 19:12:12 -0000	1.4
+++ js/marker.js	5 Sep 2009 06:34:19 -0000
@@ -22,6 +22,11 @@
     GEvent.addListener(m, 'click', function () {
       obj.change('clickmarker', -1, marker);
     });
+    if (obj.vars.behavior.highlight) {
+      GEvent.addListener(m, 'mouseover', function () {
+        obj.change('mouseovermarker', -1, marker);
+      });    	
+    }
     if (obj.vars.behavior.extramarkerevents) {
       GEvent.addListener(m, 'mouseover', function () {
         obj.change('mouseovermarker', -1, marker);
@@ -101,6 +106,10 @@
       obj.bounds = new GLatLngBounds();
     }
   });
+  
+  obj.bind('mouseovermarker', function (marker) {
+	  highlightCurrentMarker(obj.map, marker);	  
+  });
 
   // @@@ TODO: Some sort of bounds handling for deletemarker? We'd have to walk the whole thing to figure out the new bounds...
 });
Index: js/highlight.js
===================================================================
RCS file: js/highlight.js
diff -N js/highlight.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ js/highlight.js	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,51 @@
+/* $Id: highlight.js,v 1.0 2009/05/09 19:12:12 srobert72 Exp $ */
+
+/**
+ * @file
+ * Common marker highlighting routines.
+ */
+
+/*global $, Drupal */
+
+/**
+ * Highlights marker on rollover.
+ * Removes highlight on previous marker.
+ *
+ * Creates a "circle" using 20-sided GPolygon at the given point
+ * Circle polygon object is global variable as there is only one highlighted marker at a time
+ * and we want to remove the previously placed polygon before placing a new one.
+ * 
+ * Original code "Google Maps JavaScript API Example"
+ */
+var highlightCircle;
+highlightCurrentMarker = function (map, currentMarker) {
+  var markerPoint = currentMarker.marker.getPoint();
+
+  var polyPoints = Array();
+
+  if (highlightCircle) {
+    map.removeOverlay(highlightCircle);
+  }
+
+  var mapNormalProj = G_NORMAL_MAP.getProjection();
+  var mapZoom = map.getZoom();
+  var clickedPixel = mapNormalProj.fromLatLngToPixel(markerPoint, mapZoom);
+
+  var polySmallRadius = 20;
+
+  var polyNumSides = 20;
+  var polySideLength = 18;
+
+  for (var a = 0; a<(polyNumSides+1); a++) {
+    var aRad = polySideLength*a*(Math.PI/180);
+    var polyRadius = polySmallRadius; 
+	var pixelX = clickedPixel.x + polyRadius * Math.cos(aRad);
+    var pixelY = clickedPixel.y + polyRadius * Math.sin(aRad);
+    var polyPixel = new GPoint(pixelX,pixelY);
+    var polyPoint = mapNormalProj.fromPixelToLatLng(polyPixel,mapZoom);
+    polyPoints.push(polyPoint);
+  }
+  // Using GPolygon(points,  strokeColor?,  strokeWeight?,  strokeOpacity?,  fillColor?,  fillOpacity?)
+  highlightCircle = new GPolygon(polyPoints,"#000000",2,0.0,"#FF0000",.5);
+  map.addOverlay(highlightCircle);
+};
\ No newline at end of file
