On Dec 10, 1:34 pm, "[email protected]" <paul.lee. [email protected]> wrote: > Hi, > I'm experimenting with googlemaps and I'm impressed by what I have > seen so far. I have a few questions to ask though. > > I'm trying to create a map which has a few markers (less than 5) on > it, each denoted by an icon: the algorithm that places the icons on > screen is in a for.. loop. Now, I can place the icons/markers on the > map and I am trying to make it so that when the user puts his > mouseover the icon, you get an InfoWindowHTML pop-up, and when you > click on the icon, you are taken to another website. > > My interim page is at http://paullee.com/secondchance/secondchance.php > > However, I have a number of problems: the first is that the 'click' > event only ever seems to store the > last URL extracted from the Ajax obtained XML file. So, no matter what > icon I click on, I get redirected to the same, last entry XML url. > The other point is that the mouseover event doesn't work, so no > infowindow pop-up. > > Is there something obviously wrong?
I don't see anything happening on mouseover in firefox 3.0.9. It looks like you have run afoul of pitfall #3 on this page of Mike Williams' tutorial: Part 1 Markers with info windows http://econym.org.uk/gmap/basic1.htm Your marker2 retains the contents of the last marker processed. You either need a createMarker function to hold function closure on the marker variables or you need to use some other way to associate the infoWindow contents with the marker. -- Larry > > Best wishes -- You received this message because you are subscribed to the Google Groups "Google Maps API" 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-api?hl=en.
