Hi,

The following code got the infowindow to be suppressed, bit no pop-ups 
appear. What am I doing wrong, please? I get no javascript errors. Here is 
my code:

function initialize() {
  var calgary = new google.maps.LatLng(51.012645,-114.132210);
  var myOptions = {
  mapTypeControl:false,
  navigationControl:false,
  scaleControl:false,
  scaleControlOptions:false,
  streetViewControl:false,
  panControlOptions:false,
    zoom: 21,
    center: calgary
    };


  var map = new google.maps.Map(document.getElementById("map_canvas"), 
myOptions);


 var nyLayer = new google.maps.KmlLayer(
      'http://www.mtroyal.ca/MRUCampusMaps/libwithssd.kml',
      {suppressInfoWindows: true});
nyLayer.setMap(map);
google.maps.event.addListener(nyLayer, 'click', function(kmlEvent) {
  var text = kmlEvent.featureData.description;
 
  });


 var ayLayer = new google.maps.KmlLayer(
      'http://www.mtroyal.ca/MRUCampusMaps/withoutfinalfda.kml',
      {suppressInfoWindows: true});
ayLayer.setMap(map);

  google.maps.event.addListener(ayLayer, 'click', function(kmlEvent) {
   
  var text = kmlEvent.featureData.description;
  
  });


var byLayer = new google.maps.KmlLayer(
      'http://www.mtroyal.ca/MRUCampusMaps/libvector6.kmz',
      {suppressInfoWindows: true});
byLayer.setMap(map);

  google.maps.event.addListener(byLayer, 'click', function(kmlEvent) {
    
  var text = kmlEvent.featureData.description;
  
  });

 


var infowindow = new google.maps.InfoWindow({
    maxWidth: 500
});


var savedLocation = null;


function savePosition() {
    savedLocation = map.getCenter();
}
function returnToSavedPosition() {
    if (savedLocation)
        map.setCenter(savedLocation);
}

google.maps.event.addListener(infowindow, 'closeclick', function() {
  returnToSavedPosition();
});

}
</script>
</head>
<body onload="initialize()">



  <div id="map_canvas"></div>
</body>

</html>

Help please,

Nat

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