Reputation: 5274
I have succeeded in loading a Google map using the gMap jQuery plugin and making it display several markers passed to it in a JSON object using the pattern demonstrated here under "Map with marker and info window". So far, so good.
Now I want to have a link on the same page which, when clicked, displays the info window for a marker on the map.
How is this done?
Upvotes: 0
Views: 1000
Reputation: 16962
You need to store a reference to the marker when you create it and then call marker.openInfoWindow(htmlContent)
on the click
-event of the link.
Upvotes: 1