Keyslinger
Keyslinger

Reputation: 5274

Display the info window of a Google map marker

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

Answers (1)

nikc.org
nikc.org

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

Related Questions