I have hyperlink out of google map. Where user do mouse over the
hyperlink and infowindows opens in google map. It works fine for me
but When I apply same for more than one hyperlink in a page, It keep
opening infowindow in google map for earch hyperlink . I want all the
infowindow to be closed and open just current mouse over infowindow. I
call showinfo method in mouse over. Please help me in closing the
infowindow.
function showinfo(LocationName,address,image)
{
var infoWindowContent = '<p style="font-size:14pt;font-weight:
bold;" > '+LocationName+'</p><p>'+address+'</p>';
geocoder.geocode( { 'address': address}, function(results,
status) {
if (status == google.maps.GeocoderStatus.OK)
{
marker = new
google.maps.Marker({
position: results[0].geometry.location,
map: map , icon: image
});
map.setCenter(results[0].geometry.location);
mapBounds.extend(results[0].geometry.location);
var infoWindow1 = new google.maps.InfoWindow();
makeMarker({position:
results[0].geometry.location, content: infoWindowContent , icon:
image });
infoWindow1.setOptions({maxWidth: 200 });
infoWindow1.setContent(infoWindowContent);
infoWindow1.open(map, marker);
}
else
{
alert("Geocode was not successful for the
following reason: " + status);
}
});
}
function makeMarker(options){
var pushPin = new google.maps.Marker({map:map});
pushPin.setOptions(options);
google.maps.event.addListener(pushPin, 'click', function(){
infoWindow.setOptions(options);
infoWindow.open(map, pushPin);
});
markerArray.push(pushPin);
return pushPin;
}
--
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.