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

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.

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

Related

Google map javascript on marker setPosition() sometimes marker disappears and reappears on any mouse event on map

marker setPosition() method sometimes marker disappears and reappears on any mouse event on map specially scroll event
I found answer to this use map.panBY(0,0) after re-centering the map on setPosition()

google maps markers add easeout effect at setMap(null)

I have a Googlemap with multiple markers on that I refresh when moving around or zoom in/out the map. So far so good. The problem is that if a marker is refreshed, I mean repainted on the map, then it blinks for an instance, as it first gets deleted as an old marker and then painted as a new marker. I use setMap(null) to hide markers. Is there a way to avoid this blinking? Is there a way f.e. to add easingout effect at setMap(null) using jQuery or something?
Write your code to not do that. Don't delete all the existing markers, only delete those that no longer appear in the updated data and add new ones.

Google Maps Overlay Infowindow Div

I am hoping someone can point me in the right direction. I have a google map v3 with fusion table that I am looking to create a custom box with the content that would normally be displayed in an infowindow.
Much like http://www.instaearth.me or
http://chrismcaleenan.com/map/?page_id=7
So the user clicks on the marker and the content is loaded into a box/window/div that is not attached to the marker itself.
Does anyone know of any samples / tutorials where someone shows this being done.
Thanks
The FusionTablesLayer has a FusionTablesMouseEvent which is returned on a click (if you add a click event listener to the FusionTablesLayer). That Object contains the data in the row associated with that geographic object (icon, polyline or polygon), and you can use it to populate an HTML div on your page.
working example, zoom in past zoom level 2 to see the FusionTable code work, at zoom 0, 1 it uses the KmlLayer

How to bind an infowindow as a property of a marker (google maps API v3)

Anyone know how to bind an infowindow as a property of a marker?
when I delete a marker, the infowindow goes with it also deleted.
I had a similar problem, my way around it was to suppress the built in info windows. From there I had the click event call a specific window from an array of info windows. That was my hackish way around making my own info windows without working with the given window.

Personalize the Google Maps badge

I would like to personalize the position badge on a Google Map (with API). I know it's possible to change the appeareance of the badge with CSS or image. But how I can do that ?
This is what I want :
The small rectangle is the normal view, and the big rectangle is the clicked view (with informations). Thanks !!!
The 'big rectangle' and 'small rectangle' are both infowindows. Styling infowindows has been asked here before:
Styling Google Maps InfoWindow
You'd need to have an event listener, so initially the small infowindows are all displayed on load. Then when you click on a point or on an infowindow, you then show the large infowindow.

Resources