I'm using a basic script borrowed from another developer... the map 
supports multiple markers, which I like.
The issue I am having is that I need any existing "infowindow(s)" that are 
opened to be closed on "mouseover" of any marker.

I have tried different approaches, but all has failed. Any help would be 
great!

Thanks!

Here is the code

var map ;
  function initialize() {      
    var latlng = new google.maps.LatLng(-34.397, 145.644);
    var myOptions = {
      zoom: 5,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP // can be SATELLITE  , 
HYBRID, ROADMAP or TERRAIN
    };
    map = new google.maps.Map(document.getElementById("map"), myOptions);
    
    var marker = add_marker(-34.397, 150.644,"Some title!","html for info 
box"); // pass in as Latitude, then Longitude
    marker.setMap(map);
    
    var html_box = "<a href=\"foo bar\">tesT</a>";
    var marker = add_marker(-33.397, 140.644,"Some title!",html_box); // 
pass in as Latitude, then Longitude
    marker.setMap(map);
  }
  
  
  function add_marker(lat,lng,title,box_html) {
    var infowindow = new google.maps.InfoWindow({
        content: box_html
    });

    var marker = new google.maps.Marker({
          position: new google.maps.LatLng(lat,lng),
          map: map,
          title: title
    });

    google.maps.event.addListener(marker, 'mouseover', function() {
      infowindow.open(map,marker);
    });
    return marker;
  }

-- 
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/-/vUkNUy8otToJ.
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