Nikhil Chavan
Nikhil Chavan

Reputation: 1715

how to get associated marker object for a infowindow in google maps api v3 with multiple infowindows

I have a google map on my page, i am displaying multiple markers on my map with infowindow attached to each marker, when i click on a marker its related infowindow opens & displays information for the marker.

I have a button in infowindow which updates related status of marker & upon update i change the markericon.

So, how do i get exact marker object of infowindow in which the button is clicked.

Note that there may multiple infowindows open at a time.

Thanks.

Upvotes: 7

Views: 3873

Answers (1)

Błażej
Błażej

Reputation: 193

to get marker which was clicked, you should use infoWindow.anchor

Upvotes: 2

Related Questions