Each marker you must push into custom marker
var eachcustom = {
                MARKER: googlemarker, // marker of google map
                CONTENT: data  // string
               };

Each custom marker, you push into array. Declare that array and infowindow 
on global

var info = new google.maps.InfoWindow({
                content: ""
            });
var markerlist = new Array();
markerlist.push(eachcustom );

Now, you have a datasource(markerlist) to access when requested. Next step, 
you must add listener for each custom marker in markerlist.

google.maps.event.addListener(markerlist[i].MARKER , 'mouseover', function 
(event) { _overMarker((markerlist[i]); });
google.maps.event.addListener(markerlist[i].MARKER , 'mouseout', function 
(event) { _outMarker((markerlist[i]); });

or you can add listener for each custom marker when them created

google.maps.event.addListener(eachcustom.MARKER , 'mouseover', function 
(event) { _overMarker(eachcustom); });
google.maps.event.addListener(eachcustom.MARKER , 'mouseout', function 
(event) { _outMarker(eachcustom); });

function _overMarker(mak)
{
this.info.close();
this.info.setContent(mak.CONTENT);
this.info.open(googlemap, mak.MARKER);
}

function _outMarker(mak)
{
this.info.close();
}




-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/141G3qZfQ0MJ.
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-js-api-v3?hl=en.

Reply via email to