With the map I am currently constructing, everything works fine. I
have constructed a number of markers with functioning infowindows.
However, when I click on an marker and the infowindow opens and the
click on another completely different marker, it opens and does not
close the previous info window.
How may I go about doing this in the coding? I have searched at great
length and have had issues.
Presently this is the coding for one single marker out of the 12 I
currently have (and will go up well past 100 in the future)
--
var myLatLng = new google.maps.LatLng(lat,lng);
var Argentina = new google.maps.LatLng(-33.6,-64.383333);
var marker1 = new google.maps.Marker({
position: Argentina,
map: map,
title:"Argentina"
google.maps.event.addListener(marker1, 'click', function() {
infowindow1.open(map,marker1);
map.set_center(marker1);
map.set_zoom(16);
});
var infowindow1 = new google.maps.InfoWindow({
content: ArgentinaWindow });
var ArgentinaWindow = '<b>Argentina</b><br/><br/>';
--
what I am doing wrong? do i need to construct this entirely
differently or can I make close infowindow event work with my present
coding and slight modification? any help would be greatly appreciated
Thanks,
Jacob
--
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.