Caveat: the example I am presenting is v2 and one of my first maps so
very messy. However; I think it may give you some ideas on how to
achieve what you are attempting. It is based on an xml file that
contains the references to 3 related markers.

http://greg-koppel.site88.net/maps/JLH.html

If you want more details, post back.

On Oct 20, 2:59 pm, shadrack <shadke...@hotmail.com> wrote:
> Chad,
> Thanks.  I'm using setIcon() to change the icon image on mouseover or
> click.  This worked at line 133 just to test the idea of changing icon
> images.  However, this method won't work in the end because the map
> keeps the icon changed even when clicking on other icons.
>
> http://www.julieshad.com/ag/map_v3.3.html
>
> I'd like to reference the gmarkers array on line 161 to test changing
> the icons on certain markers, and then I can do the binding and such
> to make sure two markers are changed with one click.  I tried this on
> line 166 but it didn't seem to work.  I tried it again on line 175
> (when you click on the connection link on the left hand message box)
> and it DID work, but again the icons remain yellow instead of
> switching back...and I want them to change on the initial click or
> mouseover, not the secondary clicking of the link on the left hand
> side.
>
>   The array does work because I'm referencing it on a different
> functionAdditionally, I want to have the markers go back to the
> original icon and a new pair of markers to change icons when clicking
> away on a separate pair of markers.
>
> Thanks for any additional help. I'm glad the setIcon function works so
> smoothly.
>
> Shad
>
> On Oct 20, 2:05 pm, Chad Killingsworth
>
>
>
> <chadkillingswo...@missouristate.edu> wrote:
> > 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.- Hide 
> > > > >quoted text -
>
> - Show quoted text -

-- 
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