Thank you so much for that Larry. I found an example in Mike's tutorial that used GEvent.trigger for a sidebar thar worked great.
Now the last thing I need to do is this: The javascript is called myclick(i), where (i) counts up from 0 to the number of markers-1. I want the function to be: myclick(hotelname), where hotelname is one of the variables in the array. I know that the answer must be in this Javascript for Dummies book, but it is escaping me. help! Thanks! John. The current page is here: http://www.hawaii-hotel-guide.us/hotels/maui ----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Google Maps API" <[email protected]> Sent: Monday, October 06, 2008 1:55 AM Subject: Re: Want to openInfoWindow on mouseover (not on marker) On Oct 5, 6:37 pm, John <[EMAIL PROTECTED]> wrote: > Hello. > > I have a site where I am using PHP/MySQL to create an xml file with > point data. Then I load the xml file using GDownloadURL. I followed > the example in the article by Pamela Fox, "Using PHP/MySQL with Google > Maps". It's a work in progress, but works great so far. > > Here is a link to the page:http://www.hawaii-hotel-guide.us/hotels/maui > > and this is the php code that generates it: > > http://www.hawaii-hotel-guide.us/hotels/maui_php.txt > > Now, I am trying to figure out how to create a simple function (or > call the existing one) that will open the infoWindow on mouseover from > somewhere else on the page, not on the map. Like: <a href="" > onmouseover"openInfoWindow(thisPoint)".....Basically, I want to have > the info window open at a marker on the map when someone mouses over > the corresponding hotel name in the table below. http://code.google.com/apis/maps/documentation/events.html#DOM_Events Add a mouseover listener to the DOM element. If your markers are set up with "click" listeners, it can just do a GEvent.trigger to trigger a click on the appropriate marker (assuming you have a globally available reference). > > I'm a javascript rookie (It took me about 60 hours to get this far!). > If there is an example of this out there i would really appreciate > some direction. > > Also, the page centers the map on a specific point. Is there an > example of how to have the map center itself, based on where the > points are? I could do this by calculating the median of the lat and > lon, but if there is a map function available, I'd rather use that. See Mike Williams' tutorial: Part 14 Fitting the map zoom to the data http://econym.org.uk/gmap/basic14.htm -- Larry --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
