Could you not have a single event listener for the Map 'mousemove'
event, check the coordinates of the mouse and if it's within a polygon
then show that polygon's infowindow otherwise close the infowindow (if
it's open).

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

Scroll down to Map events.

Martin.

On 25 Sep, 10:02, "Hugh H." <[email protected]> wrote:
> Hi:
>
> I have this site showing neighborhoods in a city and a infoWindow
> opening/closing when the user rollover/rollout them
>
> The problem: when the mouse is over one neighborhood, the infoWindow
> overlaps part of it and the nearer ones preventing them to receive the
> mouseover event. Really annoying in cities where they're very close
>
> I guess the problem is due the infoWindow captures mouseover event so
> I've tried to remove infoWindow listeners without success:
>
> function openInfoWin(i) {
>   var contentString = '<div id="content"><strong><span
> class="VB11435E89">'+cityName+', '+nhData[i][1]+'</span></strong></
> div>';
>   infoWin = new google.maps.InfoWindow({content:contentString,
> disableAutoPan:false, position:nhCentroid[i]});
>   infoWin.open(map);
>   google.maps.event.clearListeners(infoWin, 'mouseover');
>
> }
>
> http://www.fashiontraveler.com/new_york-districts-map.htm
>
> Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to