If it's always the same 2 markers, you could bind their icon properties together. Something like:
marker1.bindTo('icon', marker2); Then when you change the icon on Marker1 (such as on a mouseover event), Marker2 will also change icons. Chad Killingsworth On Oct 20, 3:54 pm, shadrack <shadke...@hotmail.com> wrote: > I do only want two open at the same time, so I don't think I'll > implement that code. > > However, you bring a good point about crowding. I don't have many > markers now, but they will expand > so I expect infowindows may crowd each other. > > So, I have a conceptual idea that I don't really know how to implement > in code. If I developed a different color > icon (one highlighted yellow or something and the other normal---so > two icons possible for each marker), then > how could I activate the yellow icon to show when mouseover...AND the > marker that it's related to turn yellow > as well. Could I just add the alternative marker icon in the xml and > somehow reference that to show up when > mousing over? > > In general, I want to visually connect two markers when the user > mouses over or clicks on a marker. > > I can clarify if necessary. Thanks for your time, > > Shad > > On Oct 19, 6:23 pm, Chris Broadfoot <c...@google.com> wrote: > > > > > > > > > Hi Shad, > > > Won't it suffice to remove this line? (and turn infowindow into a local > > variable) > > > if (infowindow) infowindow.close(); > > > ... unless you want _up to two_ open at the same time - as opposed to an > > unlimited number of InfoWindows open at the same time? > > > BTW - from a user perspective, having multiple InfoWindows open at once is > > usually not very helpful (often, they will overlap, right?) and creates > > visual clutter as well as requiring a click of the 'X' to close it. > > > Cheers > > Chris > > > On Wed, Oct 20, 2010 at 11:36 AM, shadrack <shadke...@hotmail.com> wrote: > > > Hi, > > > > On this page (http://julieshad.com/ag/map_v3.3.html), if you click on > > > a marker a message box will be filled on the left hand side. If you > > > then click on the link "This ___ is connected to _____", the current > > > infowindow will close and another will open with the message box > > > displaying information regarding the newly opened infowindow/marker. > > > > What I'd like to do is have the new infowindow open and the messagebox > > > change and filled with the relevant information to the newly opened > > > window AND keep the initial infowindow open, so there are two > > > infowindows open at the same time...visually showing the connection > > > between the two places on the map. You can see my attempt at this > > > around line 147 and 162 where I use two indices and try to open > > > windows of both. I've commented out my attempts because they didn't > > > work. Can anyone help me out on this? I've googled this concept and > > > haven't found info that was relevant to my attempts. > > > > Thanks for your time, > > > > Shad > > > > -- > > > 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<google-maps-js-api-v3%2B > > > unsubscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en. -- 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.