Question

In the Google Maps API v3, the InfoWindow can be attached to an anchor using the open method. Is there any way to retrieve that anchor object?

--Amr

Was it helpful?

Solution

I don't think this is possible, or at least not convenient, in the current API. The obvious options would be (a) keep track of which InfoWindow goes with which anchor yourself, or (b) call getPosition() on the InfoWindow and find the anchor that returns the same value when getPosition() is called on it. Note that (b) will be problematic if you have multiple anchor/Marker objects in the same location.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top