On Mar 24, 5:14 pm, SaintSkeeta <[email protected]> wrote:
> Hi there,
>
> I was wondering how I would go about getting the ID of the marker
> who's info window is currently open on the map.
> I figure I have two options.
>  - If I can find this in javascript, my front end developer can find
> the open info window and place the ID of the associated marker into a
> hidden text field that I, the backend developer, can read when the
> user clicks a submit button.
>  - If I can find this in my backend C# code when that submit button is
> clicked, by maybe looping through all of the info windows and checking
> the 'opened' attribute on them to find out which one is opened.
>
> However these are theoretical, so I'm not sure if there is the
> appropriate attributes and functions available in the API. I can't
> find them at the moment, so any help would be much appreciated.

What does your current code look like (please post a link to your
current map, not a code dump...)

The way I have usually seen that done is to use function closure so
the marker click handler can have access to the infowindow information
(a "createMarker" function).  That click handler could set a global
variable (or a hidden form field) with the id.

  -- Larry

>
> Cheers.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to