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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 whengetPosition()is called on it. Note that (b) will be problematic if you have multiple anchor/Marker objects in the same location.