Yes i got this solution from the Google examples before, but it doesn't satisfy my requirement. My requirement is the info window will show the information which are provided for that. but it shows a same information for all marker. but my solution will show marker specific message in info window and will take it from a array.
On May 14, 11:52 pm, Barlymasher <[email protected]> wrote: > I think there is an easier way to do it, but that could just be me: > > function initialize() { > > .... > > all your stuff here to create the Map Markers and Windows > ... > > for(i=0;i< locations.length; i++){ > > placeInfoWindow(locations[i], infoWindow[i]); > } > > } > > // this function will take a create the current Marker and InfoWindow > that you are looping through above > > function placeInfoWindow(marker, thisWindow) { > > google.maps.event.addListener(marker, 'click', function() > { > thisWindow.open(map,marker); > > }); > > } > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" 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 > athttp://groups.google.com/group/google-maps-js-api-v3?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
