You should create one instance of an InfoWindow to be used in all of
the marker click handlers. Here's a response Esa sent to a similar
question awhile back:
--
In v3 there is a constructor and actually you have to construct an
instance of InfoWindow() in order to use one.
This is a custom method for handling InfoWindow by
marker.attachInfoWindow("Hello World");
http://koti.mbnet.fi/ojalesa/boundsbox/attachinfowindow.htm
It also provides the event handler that closes the bubble by a click
on map.
--
Thanks Esa!
-Susannah
On Nov 11, 2:02 pm, "joe.fearnley" <[email protected]> wrote:
> This seemed to have worked differently in version 2. I created this
> page:
>
> http://joef.org/google_maps_test.html
>
> It seemed in version 2, when you clicked on one marker (and it was set
> up this way) the info window showed up. Then if you clicked on a
> second, its info window would open and the first would go away.
>
> Basically I need to plot several markers on a map. Then when one is
> clicked on, its info window opens and the others close. I can't figure
> out how to make this happen.
>
> Joe
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---