Triggering marker.openInfoWindowHtml from outside of a map
16 views
Skip to first unread message
stewamax
unread,
Sep 8, 2009, 8:51:34 AM9/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google AJAX APIs
I use the maps API to display a map with a selection of custom-built
markers at various locations added using Marker Manager. Mousing over
a marker opens an InfoWindow with a photo of the location plus its
name. Clicking the marker replaces the photo with a zoomed-in
MapBlowup. All works fine.
I have now been asked to display a table (a normal HTML list or table)
outside of the map containing a list of some of the more obscure
locations such that if the user clicks (or perhaps mouses over) one of
these location names, the corresponding marker on the map comes into
‘focus’ and displays its InfoWindow.
This would be trivial job on a conventional static map – just use
hotspot rollovers – but I am at a loss how to do this on my Google
map. I think I need to simulate the effect of a marker mouseover such
that (e.g.) my
google.maps.Event.addListener(marker, "mouseover", function() {
marker.openInfoWindowHtml(html_text);})
is triggered by selecting or mousing over the appropriate item in the
list.
Any suggestions on the best way to do this pls?
Jeremy Geerdes
unread,
Sep 8, 2009, 11:27:41 AM9/8/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-ajax...@googlegroups.com
You actually have the right idea. Set mouseover and mouseout listeners
on the tr elements (or some element within them) that will trigger the
infowindow to open.
Jeremy R. Geerdes
Effective website design & development
Des Moines, IA