On a map there are multiple markers.  Currently, what I have is for
each marker to pop up an InfoWindow on mouse clicks.  This seems to
work, but the InfoWindow stays up even on mouse clicks to other
markers.  So, if you click on every marker, you have all the
InfoWindows open until you click the "x" button to close each one.

Here's the example:      http://www.mentoreng.com/testing/public/map.html

Is there a way to open an InfoWindow on one marker, close it if
another one is opened?

As well, my other problem is that when I attach a mouseover and
mouseout event after the click event.  The mouseover and mouseout
events work well in showing and closing the InfoWindow.  But I would
like to have the ability to have a click event to make the InfoWindow
"stick" or stay open until another InfoWindow opens from another
marker that the user wants to make it "sticky".

In short here's the functionality I'm trying to get:

1) Mouseover on Marker1 - show InfoWindow1
2) Mouseout on Marker1 - close InfoWindow1
3) a) click on Marker1 - show InfoWindow1 (sticky)
   b) click on marker1 again - close InfowWindow1 (same as clicking on
the "x" button on the InfoWindow)

4) Mouseover on Marker2 - show InfowWindow2 (InfoWindow1 on Marker1 is
still showing via #3a)
5) Mouseout on Marker2 - close InfoWindow2 (InfoWindow1 on Marker1 is
still showing via #3a)
6) a) click on Marker2 - show InfoWindow2 (sticky) (InfoWindow1 on
Marker1 closes)
   b) click on Marker2 again - close InfoWindow2

If there are more than 2 markers, only one InfoWindow can stay open on
click event for a marker.  But when an InfoWindow is sticky opened via
a click event on a marker, another non-sticky InfoWindow can show when
hovering over another marker.

Is that possible?

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to